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
I am running turlesim node and publishing angular and linear velocities on /turtle1/cmd_vel topic to control the turtle.
I am publishing on the above mentioned topic using a publisher written in python and also using static publishing using terminal. The rqt topic monitor only shows values from one publisher.
However when I echo the topic it shows the correct values.
How to reproduce the issue.
Terminal1: Open rqt
$ rqt
Terminal2: Run turtlesim node
$ ros2 run turtlesim turtlesim_node
Terminal3: First publisher will publish on /turtle1/cmd_vel . The code is publishing following values
msg.linear.x = -2.0
msg.linear.y = -2.0
msg.linear.z =0.0
msg.angular.x = 0.0
msg.angular.y = 2.0
msg.angular.z = 1.0
Grab the publisher code from here build it and run it using the command below.
$ ros2 run my_py_pkg turtle_twist
Terminal4: Run another publisher which will also publish on the /turtle1/cmd_vel topic.
I am running turlesim node and publishing angular and linear velocities on /turtle1/cmd_vel topic to control the turtle.
I am publishing on the above mentioned topic using a publisher written in python and also using static publishing using terminal. The rqt topic monitor only shows values from one publisher.
However when I echo the topic it shows the correct values.
How to reproduce the issue.
Terminal1: Open rqt
$ rqt
Terminal2: Run turtlesim node
$ ros2 run turtlesim turtlesim_node
Terminal3: First publisher will publish on /turtle1/cmd_vel . The code is publishing following values
msg.linear.x = -2.0
msg.linear.y = -2.0
msg.linear.z =0.0
msg.angular.x = 0.0
msg.angular.y = 2.0
msg.angular.z = 1.0
Grab the publisher code from here build it and run it using the command below.
$ ros2 run my_py_pkg turtle_twist
Terminal4: Run another publisher which will also publish on the /turtle1/cmd_vel topic.
$ ros2 topic pub /turtle1/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 4.0,y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.0}}"
Terminal 5: Run echo command to monitor the topic.
$ ros2 topic echo /turtle1/cmd_vel
Observation
The rqt only shows values from one of the publisher. However echo command shows the values alternating from both the publishers.
May be there is need to update the rqt code to handle situation when two publishers are publishing to a same topic.
The text was updated successfully, but these errors were encountered: