You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/automotive/openadkit2_safetyisolation/3_container_spliting.md
+95-55Lines changed: 95 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,24 @@ touch docker/cycloneDDS.xml
81
81
82
82
This will create a duplicate Compose configuration (docker-compose-2ins.yml) and an empty CycloneDDS configuration file to be shared across containers.
83
83
84
+
To ensure a smooth experience during testing and simulation, it’s a good idea to pull all required container images before moving on.
85
+
86
+
This avoids interruptions in later steps when you run `docker compose up` or `docker compose run`, especially during the cross-instance DDS validation or full scenario launch.
87
+
88
+
Run the following command in your project directory:
89
+
90
+
```bash
91
+
docker compose -f docker-compose.yml pull
92
+
```
93
+
94
+
{{% notice info %}}
95
+
Each image is around 4–6 GB, so pulling them may vary depending on your network speed.
96
+
{{% /notice %}}
97
+
98
+
This command will download all images defined in the docker-compose-2ins.yml file, including:
99
+
-***odinlmshen/autoware-simulator:v1.0***
100
+
-***odinlmshen/autoware-planning-control:v1.0***
101
+
-***odinlmshen/autoware-visualizer:v1.0***
84
102
85
103
#### Step 2: Configure CycloneDDS for Peer-to-Peer Communication
TIMEOUT=300 CONF_FILE=$CONF_FILE_FAIL docker compose -f "$SCRIPT_DIR/docker-compose-2ins.yml" up simulator --abort-on-container-exit
317
-
TIMEOUT=300 CONF_FILE=$CONF_FILE_FAIL docker compose -f "$SCRIPT_DIR/docker-compose-2ins.yml" up simulator --abort-on-container-exit
318
-
TIMEOUT=300 CONF_FILE=$CONF_FILE_FAIL docker compose -f "$SCRIPT_DIR/docker-compose-2ins.yml" up simulator --abort-on-container-exit
319
-
{{< /tab >}}
320
-
{{< /tabpane >}}
321
-
322
-
Once both machines are running their respective launch scripts, the Visualizer will generate a web-accessible interface using the machine’s public IP address.
323
-
You can open this link in a browser to observe the demo behavior, which will closely resemble the output from the [previous learning path](http://learn.arm.com/learning-paths/automotive/openadkit1_container/4_run_openadkit/).
Unlike the previous setup, the containers are now distributed across two separate instances, allowing for real-time cross-node communication.
328
-
Behind the scenes, this setup demonstrates how DDS handles low-latency, peer-to-peer data exchange in a distributed ROS 2 environment.
329
-
330
-
To facilitate demonstration and observation, the simulator is configured to run `three times` sequentially, allowing you to validate the DDS communication across multiple execution cycles.
294
+
#### Step 5: Verifying Cross-Instance DDS Communication with ROS 2
295
+
296
+
To confirm that ROS 2 nodes can exchange messages across two separate EC2 instances using DDS, this test will walk you through a minimal publisher–subscriber setup using a custom topic.
297
+
298
+
##### On Planning-Control Node (Publisher)
299
+
300
+
On the first EC2 instance, you will publish a custom message to the /hello topic using ROS 2.
301
+
This will simulate outbound DDS traffic from the planning-control container.
302
+
303
+
Set the required environment variables and launch the planning-control container.
title: Executing the Multi-Instance with DDS-Based Communication
3
+
weight: 5
4
+
5
+
### FIXED, DO NOT MODIFY
6
+
layout: learningpathall
7
+
---
8
+
9
+
### Demonstrating the Distributed OpenAD Kit in Action
10
+
11
+
In this session, you’ll bring all the previous setup together and execute the full [OpenAD Kit](https://autoware.org/open-ad-kit/) demo across two Arm-based instances.
12
+
13
+
OpenAD Kit is an open-source reference design for autonomous driving workloads on Arm.
14
+
It demonstrates how Autoware modules can be deployed on scalable infrastructure — whether on a single machine or split across multiple compute nodes.
15
+
16
+
#### Preparing the Execution Scripts
17
+
18
+
This setup separates the simulation/visualization environment from the planning-control logic, allowing you to explore how ROS 2 nodes communicate over a distributed system using DDS (Data Distribution Service).
19
+
20
+
To start the system, you need to configure and run separate launch commands on each machine.
21
+
22
+
On each instance, copy the appropriate launch script into the openadkit_demo.autoware/docker directory.
docker compose -f "$SCRIPT_DIR/docker-compose-2ins.yml" up visualizer -d
55
+
echo "Waiting 10 seconds for visualizer to start..."
56
+
sleep 10
57
+
58
+
# Run simulator scenario 3 times
59
+
for i in {1..3}; do
60
+
echo "Running simulator demo round $i..."
61
+
docker compose -f "$SCRIPT_DIR/docker-compose-2ins.yml" run --rm simulator
62
+
echo "Round $i complete. Waiting 5 seconds before next run..."
63
+
sleep 5
64
+
done
65
+
echo "All simulator runs complete."
66
+
{{< /tab >}}
67
+
{{< /tabpane >}}
68
+
69
+
You can also find the prepared launch scripts—`opad_planning.sh` and `opad_sim_vis.sh` —inside the `openadkit_demo.autoware/docker` directory on both instances.
70
+
71
+
These scripts encapsulate the required environment variables and container commands for each role.
72
+
73
+
#### Running the Distributed OpenAD Kit Demo
74
+
75
+
On the Planning-Control node, execute:
76
+
77
+
```bash
78
+
./opad_planning.sh
79
+
```
80
+
81
+
On the Simulation and Visualization node, execute:
82
+
83
+
```bash
84
+
./opad_sim_vis.sh
85
+
```
86
+
87
+
Once both machines are running their respective launch scripts, the Visualizer will generate a web-accessible interface using the machine’s public IP address.
88
+
You can open this link in a browser to observe the demo behavior, which will closely resemble the output from the [previous learning path](http://learn.arm.com/learning-paths/automotive/openadkit1_container/4_run_openadkit/).
Unlike the previous setup, the containers are now distributed across two separate instances, enabling real-time, cross-node communication.
93
+
Behind the scenes, this architecture demonstrates how DDS manages low-latency, peer-to-peer data exchange in a distributed ROS 2 environment.
94
+
95
+
To support demonstration and validation, the simulator is configured to run `three times` sequentially, giving you multiple opportunities to observe how data flows between nodes and verify that communication remains stable across each cycle.
96
+
97
+
Now that you’ve seen the distributed system in action, consider exploring different QoS settings, network conditions, or even adding a third node to expand the architecture further.
0 commit comments