Just out of curiosity, I happened to check ROS cross-distribution communication.
Topic and Services are confirmed using latest container with host network.
ROS 1
Scenario | ROS Master | Can communicate? |
---|---|---|
kinetic/melodic | kinetic | YES |
melodic/noetic | kinetic | YES |
noetic/kinetic | kinetic | YES |
kinetic/melodic | melodic | YES |
melodic/noetic | melodic | YES |
noetic/kinetic | melodic | YES |
kinetic/melodic | noetic | YES |
melodic/noetic | noetic | YES |
noetic/kinetic | noetic | YES |
-
ros-ROSDISTRO-roscpp-tutorials
package is used for verification.
ROS 2 (Updated)
Scenario | Can communicate? |
---|---|
foxy/galactic | YES |
galactic/rolling(humble) | YES |
rolling(humble)/foxy | YES |
-
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
is enabled always to specify rmw implementation. -
export ROS_DOMAIN_ID=5
is specified. - docker command
docker run -it --privileged --name ros2_distro ros:distro
. (need to replacedistro
intofoxy
,galactic
,humble
androlling
) - Bind different IPC namespace and network interface to each container. (no argument
--net=host
nor--ipc=host
to docker command.)
might be dependent on rmw implementation, but cross-distribution communication is not supported as official, see https://answers.ros.org/question/341372/can-nodes-from-different-ros-2-distributions-communicate-compatibly/.