groove-x / mqtt_bridge

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

Convert ROS service to MQTT #48

Closed CaptD closed 3 years ago

CaptD commented 3 years ago

First of all, thanks to the developers for this great work. It provides a useful bridge between ROS topic and MQTT.

I have no problem compiling and running the demo. But I do have a question about conversion between ROS service and MQTT. There are two methods in my mind:

  1. convert a ROS service to a topic and set its QoS to be 2

or

  1. convert a ROS service to two topics bidirectionally, and use their member variables to reproduce "request - response" logic. Considering the network status is unstable, and I don't want a service being called twice after reconnecting, such as reset an actuator. What is the best practice? Do you have any suggestion?

Thanks.

pavloblindnology commented 3 years ago

You can extend mqtt_bridge with a custom Bridge plugin for services.

ledmonster commented 3 years ago

@CaptD Interesting. Thank you for providing a new idea. But currently, I can't work on new functionalities. as @pavloblindnology says, please implement a custom Bridge plugin on your project.