I think there is a bug/mistake in the Ros2 branch; while ros2 topics are subscribed to I don't think mqtt topics are subscribed because the initialization of the bridges happens before the mqtt client is connected so the subscription message is never sent. See lines 74 to 80 of https://github.com/groove-x/mqtt_bridge/blob/ros2/mqtt_bridge/app.py:
# configure bridges
bridges = []
for bridge_args in bridge_params:
bridges.append(create_bridge(**bridge_args,ros_node=mqtt_node))
# start MQTT loop
mqtt_client.loop_start()
This can be fixed by moving the last 2 lines to above line 74. Am I missing something or does anyone else agree that this is a bug/issue?
Hi,
I think there is a bug/mistake in the Ros2 branch; while ros2 topics are subscribed to I don't think mqtt topics are subscribed because the initialization of the bridges happens before the mqtt client is connected so the subscription message is never sent. See lines 74 to 80 of https://github.com/groove-x/mqtt_bridge/blob/ros2/mqtt_bridge/app.py:
This can be fixed by moving the last 2 lines to above line 74. Am I missing something or does anyone else agree that this is a bug/issue?