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 *mqtt_client* is best configured with a ROS parameter *yaml* file. The configuration shown below (also see [`params.yaml`](launch/params.yaml)) allows an exchange of messages as follows:
59
59
60
-
- ROS messages received locally on topic `/ping` are sent to the broker on MQTT topic `pingpong`
61
-
- MQTT messages received from the broker on MQTT topic `pingpong` are published locally on ROS topic `/pong`
60
+
- ROS messages received locally on ROS topic `/ping` are sent to the broker on MQTT topic `pingpong`;
61
+
- MQTT messages received from the broker on MQTT topic `pingpong` are published locally on ROS topic `/pong`;
62
+
- MQTT messages received sent by other non-ROS clients and received from the broker on MQTT topic `primitive` are published locally as primitive ROS messages (`bool`, `int`, `float`, `string`) on ROS topic `/primitive`.
[ INFO] [1665521116.600988342]: Connecting to broker at 'tcp://localhost:1883' ...
99
+
[ INFO] [1665521116.701596581]: Connected to broker at 'tcp://localhost:1883'
95
100
```
96
101
97
102
Note that the *mqtt_client* successfully connected to the broker and also echoed which ROS/MQTT topics are being bridged.
98
103
99
-
In order to test the communication, publish any message on ROS topic `/ping` and wait for a response on ROS topic `/pong`. To this end, open two new terminals and execute the following commands.
104
+
In order to test the communication among `mqtt_client`, publish any message on ROS topic `/ping` and wait for a response on ROS topic `/pong`. In order to test the communication between other MQTT clients and the `mqtt_client`, directly publish any message on MQTT topic `primitive` and wait for a response on ROS topic `/primitive`. To this end, open four new terminals and execute the following commands.
0 commit comments