Build a ROS 2 and Zenoh simulation environment on an Arm server
Introduction
Start the ROS 2 development containers
Configure Zenoh for ROS 2
Observe Zenoh router discovery behavior
Start the robot simulation and Navigation2
Visualize and navigate the robot with RViz
Control the Neobotix ROX robot with ROS 2
Observe ROS 2 simulation resource usage on an Arm server
Enable Zenoh shared-memory transport
Next Steps
Build a ROS 2 and Zenoh simulation environment on an Arm server
Introduction
Start the ROS 2 development containers
Configure Zenoh for ROS 2
Observe Zenoh router discovery behavior
Start the robot simulation and Navigation2
Visualize and navigate the robot with RViz
Control the Neobotix ROX robot with ROS 2
Observe ROS 2 simulation resource usage on an Arm server
Enable Zenoh shared-memory transport
Next Steps
Open a bash shell in the robot container
After starting the browser-accessible ROS 2 environment, configure Zenoh for the environment.
Start by opening a bash shell in the robot container.
First, get the container ID for the robot container. From an SSH session on the Arm server, run:
docker ps
The output is similar to:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
471c961e54d8 odinlmshen/ros2-zenoh-arm:jazzy-desktop "/bin/bash -c /entry…" 4 days ago Up 4 days 0.0.0.0:7447->7447/tcp, 0.0.0.0:7447->7447/udp, [::]:7447->7447/tcp, [::]:7447->7447/udp, 0.0.0.0:6080->80/tcp, [::]:6080->80/tcp ros_zenoh-robot-1
4b574fe60afe odinlmshen/ros2-zenoh-arm:jazzy-desktop "/bin/bash -c /entry…" 4 days ago Up 4 days 0.0.0.0:6081->80/tcp, [::]:6081->80/tcp ros_zenoh-control-1
Copy the container ID for ros_zenoh-robot-1, such as 471c961e54d8.
Next, open a bash shell in the running robot container:
docker exec -it 471c961e54d8 /bin/bash
Whenever you need a new container shell, repeat docker ps, copy the appropriate container ID, and run the docker exec command.
Copy the router and session configurations
rmw_zenoh uses two configuration files with different responsibilities:
ROUTER_CONFIG.json5configures the Zenoh routerSESSION_CONFIG.json5configures the normal ROS 2 and Zenoh sessions
Keep the installed templates unchanged. Copy them to ~/container_data/ so you can modify the working copies later. This directory is a Docker volume, so the files persist when the container restarts and are also accessible from the host.
Using the open bash shell in the robot container, copy each installed template to the corresponding working file:
cp /opt/ros/jazzy/share/rmw_zenoh_cpp/config/DEFAULT_RMW_ZENOH_ROUTER_CONFIG.json5 \
~/container_data/ROUTER_CONFIG.json5
cp /opt/ros/jazzy/share/rmw_zenoh_cpp/config/DEFAULT_RMW_ZENOH_SESSION_CONFIG.json5 \
~/container_data/SESSION_CONFIG.json5
The two commands look similar, but the source files are different. Copy DEFAULT_RMW_ZENOH_ROUTER_CONFIG.json5 to ROUTER_CONFIG.json5 and DEFAULT_RMW_ZENOH_SESSION_CONFIG.json5 to SESSION_CONFIG.json5.
Load the workshop environment
Source the workshop environment so ROS 2 uses the new configuration files:
source ~/workshop_env.bash
The output includes both exported paths, and is similar to:
ZENOH_ROUTER_CONFIG_URI=/home/ubuntu/container_data/ROUTER_CONFIG.json5
ZENOH_SESSION_CONFIG_URI=/home/ubuntu/container_data/SESSION_CONFIG.json5
From this point, run source ~/workshop_env.bash whenever you open a new bash shell in the robot container.
What you’ve accomplished and what’s next
You’ve created separate router and session configurations and confirmed both exported paths in the ROS 2 environment.
Next, you’ll use three ROS 2 processes to observe the router’s role in discovery.