ros2 / ros2cli

ROS 2 command line interface tools
Apache License 2.0
173 stars 159 forks source link

Make possible for ros2 topic hz to monitor the rates of multiple topics simultaneously as ros1 rostopic hz does. #830

Open martinakos opened 1 year ago

martinakos commented 1 year ago

Feature request

Feature description

Make possible for ros2 topic hz to monitor the rates for of multiple topics simultaneously as ros1 rostopic hz does.

In ROS1 I can do:

rostopic hz /topic1 /topic2 /topic3

In ROS2 Humble I can only check the rate for one topic at a time:

ros2 topic hz /topic1

fujitatomoya commented 1 year ago

yeah, i think it is nice to have.

the following is output from rostopic hz from ROS 1 just a reference.

root@4b5f2b7e1de8:~# rostopic hz /chatter /rosout
subscribed to [/chatter]
subscribed to [/rosout]
 topic      rate   min_delta   max_delta    std_dev    window
=============================================================
/chatter   9.995   0.09971     0.1004      0.0001937   10
/rosout    9.996   0.09978     0.1004      0.0001766   10

 topic      rate   min_delta   max_delta    std_dev    window
=============================================================
/chatter   9.998   0.0997      0.1004      0.0001685   20
/rosout    9.998   0.09967     0.1004      0.0001661   20
....<snip>
yaswanth1701 commented 8 months ago

Hi @fujitatomoya This feature sounds cool, If it's not implemented yet, I would like to give it a try. Can I ?

fujitatomoya commented 8 months ago

i think @iuhilnehc-ynos created https://github.com/ros2/ros2cli/pull/831 already. it would be nice if you can do review for that 👍

yaswanth1701 commented 8 months ago

i think @iuhilnehc-ynos created #831 already. it would be nice if you can do review for that 👍

I haven't done a review before for PR but I will give it a try, thanks!

felixdivo commented 7 months ago

Just a side note: If once accepts new dependencies, it might make sense to not reinvent table printing here and use something proven. For example: rich or others.

clalancette commented 7 months ago

Just a side note: If once accepts new dependencies, it might make sense to not reinvent table printing here and use something proven. For example: rich or others.

We are careful with adding new dependencies. At the very least, the dependency needs to be available as a system package on Debian and Ubuntu (and preferably RHEL-9). Even then, we still have to deal with what happens on Windows. If we think the dependencies will make a significant difference, we can consider it, but someone needs to make the argument for it.

felixdivo commented 7 months ago

So, rich would be available on Ubuntu. I don't find it for Debian. Cons are the usual ones for new dependencies. Pros are

Similar pro arguments probably hold for other tools to. I like rich because it contains other nice CLI building blocks too, like pretty progress bars, for example. It is well maintained and from my experience very stable.