Last active
August 11, 2024 00:58
Revisions
-
cardboardcode revised this gist
Aug 11, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## **Minimal Proof:** Inter-ROS2 Distro Communication This is a **minimal proof** that different ROS 2 distribution can communicate succesfully with each other. -
cardboardcode created this gist
Aug 11, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,50 @@ ## **What Is This?** This is a **minimal proof** that different ROS 2 distribution can communicate succesfully with each other. In this example, a ROS 2 Humble `talker` node is able to communicate to a ROS 2 Jazzy `listener` node between their individualized docker containers. ## **Run** :gear: 1. Run ROS 2 Humble `talker` node: ```bash docker run -it --rm \ --name humble_publisher_c \ -v /dev/shm:/dev/shm \ osrf/ros:humble-desktop-full bash -c \ "ros2 run demo_nodes_cpp talker" ``` 2. Run ROS 2 Jazzy `listener` node in a new terminal: ```bash docker run -it --rm \ --name jazzy_subscriber_c \ -v /dev/shm:/dev/shm \ osrf/ros:jazzy-desktop-full bash -c \ "ros2 run demo_nodes_cpp listener" ``` ## **Verify** :white_check_mark: One terminal should show: ``` [INFO] [1723337403.404742853] [talker]: Publishing: 'Hello World: 1' [INFO] [1723337404.404783647] [talker]: Publishing: 'Hello World: 2' [INFO] [1723337405.404901389] [talker]: Publishing: 'Hello World: 3' [INFO] [1723337406.404994499] [talker]: Publishing: 'Hello World: 4' [INFO] [1723337407.405056425] [talker]: Publishing: 'Hello World: 5' ... ``` The other terminal should show: ```bash [INFO] [1723337403.404988153] [listener]: I heard: [Hello World: 1] [INFO] [1723337404.404993844] [listener]: I heard: [Hello World: 2] [INFO] [1723337405.405100274] [listener]: I heard: [Hello World: 3] [INFO] [1723337406.405191427] [listener]: I heard: [Hello World: 4] [INFO] [1723337407.405250046] [listener]: I heard: [Hello World: 5] ... ```