rotop - top command for ROS 2

I’d like to introduce top command wrapper for ROS 2, named rotop . GitHub - iwatake2222/rotop: top command for ROS 2

It’s always annoying that ComponentContainer in top command doesn’t show enough information, especially when you develop a project with lots of ComponentContainers like Autoware.
rotop translates a very long ROS 2 commands and options displayed in top into a readable string.

rotop has the following features:

  • Replace a long displayed name for ROS 2 command and Python command, especially for component container
    • Normal top command : “component_container
      • :sob: It doesn’t tell enough information
    • Normal top -c or htop : “/very/long/path/component_container very-long-options
      • :sob: It’s too long to see
    • My rotop command: “{node_name}, {name_space}
      • :smile: It’s easy to read
  • Filter function
  • csv file logger
  • Graph plotter

Get Started

pip3 install rotop

rotop
rotop --gui


I also work on other projects:

16 Likes

:100: :+1: for making this tool available.

This obviously happens quite a bit in an international community (ie: words/acronyms having surprising meanings in other languages), but “rot op” means “get out” (or really: “f*** off”) in my language (ie: Dutch).

I’m still trying to figure out whether that name makes sense for a top-like tool :slight_smile:

4 Likes

@iwatake2222 great work :exclamation: thanks for sharing this.

following up to @gavanderhoorn 's language situation, how about ros2 top? that would be great if we can use just like that with other sub-commands.

1 Like

Great contribution indeed, thanks for sharing!

Also, pretty nice (other) projects. Promising work overall!

+1 to the ros2 top suggestion.

Excellent contribution!

I wrote a similar package in ROS 1 (2016), which I recently updated for ROS 2. One notable difference is that mine publishes to a message which can be dumped into bag files, and can also be visualized via script via matplotlib.

I agree. Great contribution.

One suggestion. The CPU usage probably needs to be scaled by the number of CPU cores or whatever the ‘System Monitor’ tool does otherwise the nodes look like they are taking up a huge CPU percent when in actuality the node is taking a large percentage of one core.

1 Like

@tomoyafujita
Thank you for the suggestion!
I’ll work on implementing ros2 top in ros2ci. Before that, I need to improve my code though.

3 Likes

Cool!
I’ll modify my code using psutil.