Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rqt topic monitor does't show correct values #274

Open
deebot opened this issue Jun 15, 2022 · 0 comments
Open

Rqt topic monitor does't show correct values #274

deebot opened this issue Jun 15, 2022 · 0 comments

Comments

@deebot
Copy link

deebot commented Jun 15, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant