groove-x / mqtt_bridge

mqtt_bridge provides a functionality to bridge between ROS and MQTT in bidirectional
MIT License
160 stars 146 forks source link

QUESTION : Is it possible to have multiple nodes ? #15

Closed ogensyts closed 6 years ago

ogensyts commented 6 years ago

Hi,

First of all, I want to thank the developpers who made this. Awesome functionnality and works very well.

My question is : For example, I have two wifi connected robots which I want to use mqtt_bridge with. For now, everything works for the single node that I use, but I wonder if it is possible to have 2 nodes connected to ROS with mqtt_bridge?

Regards, ogensyts

ogensyts commented 6 years ago

Yes you can.

Create 2 launch files with different node names and proceed normally. You just have to organize your mqtt topics accordingly.

Example of mqtt topics structure: For robot 1: robot1/position/x robot1/position/y robot1/position/z

For robot 2: robot2/position/x robot2/position/y robot2/position/z