-
Notifications
You must be signed in to change notification settings - Fork 14
Implement MQTT protocol #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Im definitely in favor of this. The type of data being sent is perfect for MQTT |
|
I just did a checkout of this and I'm in love with it. I already use MQTT with ROS and other projects so it makes sense to me why it should be supported. Runs great and exactly as I would expect it to. This should be adopted as an option to meet with the Mass Robotics AMR Interop spec. As an additional argument in favor of MQTT it can be encrypted end to end and locked with User and Password making it more secure than no security as is the case with ROS and the original TCP/IP version of this standard. One suggestion I would make is to have each subscriber and publisher nest one level down for the statusReport topic. Example: {uuid}/statusReport as opposed to /statusReport. This make it cleaner for organizational purposes, allows you to limit the number of messages every subscriber will have to parse through. The identity report should be one topic every device posts to on power on or on a power off so the Fleet Manager can know the UUID of every device. Then subscribe to all topics under that /{uuid} using wildcards. example: mqtt_client.subscribe("2c99c66f-e6ff-2b04-7529-8b5916c62cc4/*") will subscribe to all topics starting with that uuid. In this example there is only one topic the device posts, but in theory there could be many more and you shouldnt have to reference a table to capture them all as a fleet manager. |
|
I made a fork here: https://github.com/cs-resgreen/AMR_Interop_Standard that implements the above suggestion NOTE: the wildcard operator is # not * read the usage here under the heading Topics/Subscriptions: https://mosquitto.org/man/mqtt-7.html |
2507abd to
53193d3
Compare
|
Glad I suggested it, it seems to be well received! |
|
Conflicts have been resolved. I hope it will be merged. |
We hope that MQTT will be adopted in addition to WebSockets.
MQTT is publish/subscribe type, so when one client publishes, all clients can subscribe to it.
(I saw in this article that it was one of the last candidates for protocol transport messaging. )
I have implemented MQTT, and I hope it will be useful for you to consider the adoption of MQTT. I have extended MaasRobotics-AMR-Receiver to subscribe to MQTT as well.
or