ROS1, using ROS2 Bridge to talk to multiple robots

asked 2019-10-24 13:26:47 -0600

Shawn Schaerer gravatar image

I want to talk to different machines over a network and would like to use ROS2 / DDS. Our robots are ROS1 and need to stay that way for now. To solve this I want to use ros1<-->ros1_bridge<-->ros1_bridge<-->ros1

Has anyone tried this to add ros2 / DDS between robots?

edit retag flag offensive close merge delete


This is possible, but will require you to have both ROS1 and ROS2 on the robot which can cause some problems especially with sourcing. We have managed to implement the ros1-bridge on a robot running a ROS1 stack with a small ROS2 install next to it. All the ROS1 topics will become available in the ROS2 global data-space. So if you give all robots a 2-way ros1-bridge then they will indeed all see each other topics (assuming you properly set the ROS_DOMAIN_ID values etc.). What will also be very important is namespaces. If you don't properly name topics or don't properly shield topics from being passed to the global dataspace the robots will start publishing on each others topics (you don't want robot 1 to publish a cmd_vel to robot 2 !!!!). Your "question" is not very descriptive so maybe come with a more properly described use-case or ...(more)

MCornelis gravatar image MCornelis  ( 2019-10-25 08:30:34 -0600 )edit

Thanks you answered my question.

Shawn Schaerer gravatar image Shawn Schaerer  ( 2019-10-25 10:14:23 -0600 )edit

I would probably suggest to include multimaster_fkie in such a setup (ie: one per robot), which should include infrastructure to properly deal with some of the "problems" that @MCornelis describes.

Then consider the bridge as just that: a bridge or perhaps even a tunnel, and have it only bridge topics that have been configured to be forwarded by multimaster_fkie.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-26 04:55:11 -0600 )edit

Have you tried this and does it have dds qos?

Shawn Schaerer gravatar image Shawn Schaerer  ( 2019-10-26 08:40:17 -0600 )edit

The message exchange over the bridge will use ROS 2 infrastructure, so yes, that part will have DDS QoS attached. Everything local to the robots (ie: the robot-local ROS graph) will of course not have DDS involved at all, so no QoS there (but that is probably also not needed).

I've not verified how this will interact with ROS 1 service clients blocking, waiting for a response and the bridge failing to deliver the message.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-26 08:44:58 -0600 )edit