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

msgpack not working with AWS #1

Closed ShawnSchaerer closed 6 years ago

ShawnSchaerer commented 7 years ago

found that msgpack would fail when sending data to topics using AWS and mosquito client locally. I had to change the code to

msg_dict = self._deserialize(mqtt_msg.payload)

msg_dict = json.loads(mqtt_msg.payload)

in _create_ros_message(self, mqtt_msg):

Have you seen this? I am willing to do a PR on this

ledmonster commented 6 years ago

@ShawnSchaerer Sorry for replying late. You can use json as a serializer/deserializer by specifying it in config file (or rosparam) like following.

serializer: json:dumps
deserializer: json:loads

Or you can just comment out this setting. Json is a default serializer for mqtt_bridge.