读的文章中有这样一句话:
Measuring publication rates There are also two commands for measuring the speed at
which messages are published and the bandwidth consumed by those messages:
rostopic hz topic-name
rostopic bw topic-name
These commands subscribe to the given topic and output statistics in units of messages
per second and bytes per second, respectively.
Even if you don’t care much about the specific rates, these commands can be useful
for debugging, because they provide an easy way to verify that messages are indeed
being published regularly on particular topics.
于是我就试了两个命令
:~$ rostopic hz /turtle1/cmd_vel subscribed to [/turtle1/cmd_vel] no
new messages no new messages no new messages no new messages no new
messages no new messages no new messages no new messages no new
messages no new messages no new messages no new messages no new
messages no new messages no new messages no new messages no new
messages no new messages
^Cno new messages
:~$ rostopic bw /turtle1/cmd_vel
subscribed to [/turtle1/cmd_vel]
不知道为什么会是这样的运行结果。
在尝试使用ROS的`rostopichz`和`rostopicbw`命令来测量`turtle1/cmd_vel`话题的发布速率和带宽时,遇到了没有新消息输出的情况。这可能表明消息未按预期发布,或者是调试中的一个环节出现了问题。这两个命令对于验证消息是否正常发布到特定话题非常有用。
4326

被折叠的 条评论
为什么被折叠?



