Migrate mqtt_bridge from ROS to ROS2

asked 2021-07-17 06:39:37 -0500

toSeek_toLearn gravatar image

Has anyone already migrated [ mqtt_bridge ] from ROS to ROS2? This package is in ROS python3, Noetic. If someone can please recommend some migration tools that can help me automate this process? What manual steps need to be taken to achieve this migration? This may not be the most smart question but I am fairly new to ROS, so please excuse me in advance.

edit retag flag offensive close merge delete

Comments

2

I had and have the same problem. I can tell you that at the end I wrote my mqtt_bridge for ROS2. In python it didn't take more than 3-4 hours. It is really an easy task. Waiting for migration could take years. Google for 'mqtt client python' and implement your ROS2 node. You can find many tutorials, which are very easy to understand. Then write your node. I suggest you to do the same.

Andromeda gravatar image Andromeda  ( 2021-07-17 13:01:25 -0500 )edit

Hey Could you please suggest the blog you referred to or recommend on that you believe is good. Thank you in advance.

ashk98 gravatar image ashk98  ( 2022-06-21 03:43:51 -0500 )edit

I suggest you to look to paho library. You can use paho for writing a subscriber to your MQTT topic. Then you create a ROS node and put your mqtt paho-based subscriber inside it. I don't have a specific tutorial or link for that

Andromeda gravatar image Andromeda  ( 2022-06-21 15:00:27 -0500 )edit

I followed your advice and first created a ros node and then mqtt paho based subscriber. I had a question: do we have to change the message format for mqtt to be able to read the ros topic?

ashk98 gravatar image ashk98  ( 2022-06-23 10:00:23 -0500 )edit