You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The topic is converted into geometry_msgs/Twist, however I received weird value even though I'm sending twist with no speed. This is the value I receive using rostopic echo
The mqtt_client is primarily meant to bridge ROS messages from one ROS system to another ROS system via MQTT. What you are trying to do, however, is bridging messages from ROS to MQTT or from MQTT to ROS.
It's expected that this currently only works for primitive message types. For non-primitive message types such as Twist, the ROS messages are serialized to a binary payload that is then sent via MQTT. This binary payload is not directly human-readable and has to be deserialized by another mqtt_client to then publish as a ROS message on the receiver side.
In principle, you can always come up with a JSON representation of any ROS message, so why not send JSON equivalents of the ROS messages via MQTT? Although this would most likely increase the payload size, it could definitely be a very helpful feature for the mqtt_client, see #9!
As of today, this feature is not yet available on the main branch. There is, however, a pull request #51 that implements this feature. Please refer to the PR discussion on how to use it and why it hasn't been merged yet.
I have a webapp (non-ros) sending twist message to the broker. Here is how I define the twist message in js
Here is my mqtt_client param
The topic is converted into geometry_msgs/Twist, however I received weird value even though I'm sending twist with no speed. This is the value I receive using rostopic echo
I'm running ROS Noetic of Ubuntu 20.04
The text was updated successfully, but these errors were encountered: