New tool: ros2sysmon - monitor nodes, topics, ifs, and more in one utility

This handy utility monitors key data from your ROS2 system. It brings together what exist individually in tools like ros2 topics, ros2 nodes, tf_utilities and more in one display. It’s fully terminal based so in your terminal emulator and even via ssh. It’s highly configurable via a json config file.

I hope you try it and post questions or issues in GitHub or here. I am interested in your installation experience, whether the numbers displayed are accurate, and also whether it itself is not a resource hog. Any other feedback of course is welcome as well.

Take a look here: GitHub - pitosalas/ros2sysmon

p.s. I know there must be something like this out there (in fact more than one) but I got tired of looking and it seemed like a fun little project. I hope someone tries it. And post issues if you want and I will look at them. It is open source (MIT).

13 Likes

Wow, this looks quite nice!

Except the frequency stats. Subscribing all topics is a really really bad idea.

The solutions are not straightforward, but generally circle around topic statistics (builtin, but need to be enabled per pub/sub or via a hack), or tracing (ros2_tracing). Recently, Kat mentioned ROS 2 Graph Monitor which uses the first approach with hack. Maybe the two projects could cooperate? Yours as a nice TUI, and Polymath’s as the data source…

2 Likes

Thanks…That’s exactly the kind of feedback I was looking for.

Can you say more about why it’s a really bad idea… It is set up to do it every n seconds or only when you type “r”. That may still be a bad idea. Maybe do one at a time for 3 seconds: subscribe, measure, unsubscribe?

There can be (and there are) “lazy” nodes that start producing data only when there is a subscriber on their topics. So you would actually change the behavior of the system. One nice example of this are image_transport publishers. Imagine you have an image topic and subscribe image_raw, image_raw/compressed, image_raw/compressedDepth and any other topics from transport plugins you have installed. The robot PC would go crazy (plus yelling at you that RGB8 images can’t be encoded into compressedDepth).

Plus, if the camera runs on a different PC, you really don’t want to transmit raw images over the network, which is usually slow.

Our current system has 150+ topics…

I will add a fearure where it only check# hz on speicofe$ topics, including not checking sny

2 Likes

I just tried it on Humble, very nice!

About resource usage, I noticed on mode 2 that some nodes spike the CPU usage to nearly 100% occasionally, but it never shows on the overall CPU usage (it stays below 2%). Is it because the single node occupies just one core and the overall CPU usage refers to the total usage considering all the cores? Or because the overall CPU usage is an average of a longer time span? Or other?
Just to understand how to use that info

How to freeze the Topic list? I have many topics and I have to scroll, but every several seconds the Topic list is refreshed and the scrolling is also reset.

Actually I need the feature to jump between node list and topic list, pretty much like current ros2 node info and ros2 topic info -v then get the topic name, then by the same topic name, check which other node is publishing and subscribing and then jump to the other node. I need to type a lot to do it currently.

New release, version 0.2:

You can now control which topics are displayed and which topics compute hz. You can also now control which panels appear on page 1 and 2. Both of these configurations are done in default_config.yaml. You can modify these easily if you install into your ros2_ws/src.

  config_topics:
    - name: "/tf"
      target_frequency: 30.0
      measure_hz: true
      display: true
    - name: "/scan"
      target_frequency: 20.0
      measure_hz: true
      display: true
      display: true
    - name: "/cmd_vel"
      target_frequency: 1.0
      measure_hz: false
      display: true
    - name: "*"
      measure_hz: false
      display: false

display:
  show_colors: true
  show_progress_bars: true
  time_format: "%H:%M:%S"
  panel_layout:
    screen_1: ["topics", "tfs"]
    screen_2: ["nodes", "processes"]
    hidden: []

Thanks for trying the tool. Feel free to post further questions or requests here, or in the issues tracker in GitHub:

1 Like

New release 0.2 includes the ability to choose what topics are shown and of those, which ones are measuring hz. It also lets you choose which panels (topics, tf, nodes, processes) appear on page 1 or page 2. Check it out!