No output from ros2 topic hz

asked 2019-05-31 02:08:12 -0600

wan_da gravatar image

updated 2019-05-31 02:12:31 -0600

When I run ros2 topic hz for certain topics, there will be no output and the terminal will lock.

For example, I have launched turtlebot3_world.launch.py and run teleop_keyboard, and also am running rqt_graph (I'm not sure if all these will be relevant but I'm just stating the current circumstances). Then when I run

user@ubuntu:~/ros2_ws$ ros2 topic hz /scan
average rate: 4.995
    min: 0.199s max: 0.201s std dev: 0.00046s window: 6
average rate: 4.995
    min: 0.199s max: 0.201s std dev: 0.00060s window: 11

And it goes on outputting the average publish rate. This happens for /clock, /cmd_vel, /imu, /joint_states, /odom, /tf, /tf_static.

However, for /parameter_events, /robot_description, /rosout, this happens:

user@ubuntu:~/ros2_ws$ ros2 topic hz /rosout

^Cuser@ubuntu:~/ros2_ws$

The terminal remains locked and no average publishing rate is outputted (I had to Ctrl-C the process).

May I know why this is so? Is it because it is not publishing any msgs at all?

edit retag flag offensive close merge delete

Comments

ros2 topic hz ... shows nothing when ros2 topic echo ..., shows nothing. So yes, it's because of no messages. BTW ros2 topic hz /rosout shows something on my pc because there are messages.

Orhan gravatar image Orhan  ( 2019-05-31 02:27:09 -0600 )edit

ok. thank you very much

wan_da gravatar image wan_da  ( 2019-05-31 08:10:04 -0600 )edit