Ros2top - top-like utility for ROS2

Hi everyone!

Repo: GitHub - AhmedARadwan/ros2top

I’ve always found it hard to track each node’s resource usage, so I thought it might be a good idea to build a tool that works for ROS 2 and essentially any Python or C++ process to monitor resource usage in real time. The goal? Quickly see which processes are consuming the most resources and gain better visibility into a running system.

This is an initial release: it relies on the node registering itself to become visible and tracked by the ros2top utility.

What it does so far:

  • Shows per-node CPU, RAM, GPU, and GPU Mem usage.
  • Get active nodes based on registration.
  • Offers a simple terminal UI interface similar to htop to monitor everything in one place.

How it works:

  • Node imports/includes ros2top and register itself.
  • ros2top then polls resource stats.
  • It displays a list of processes, so you can spot hot resource consumers at a glance.

Why it might help:

  • Instead of juggling htop, nvtop, ros2 node info, etc., you get everything in one screen.
  • Ideal for multi‑node systems where it’s easy to lose track of who’s using what.

I’d love to hear your thoughts:

  • Does this sound helpful in your debugging or monitoring workflow?
  • Any ideas for features, UI improvements, or integrations?
  • Thoughts on automatic registration vs. manual config?

This is very early-stage, but I hope it can evolve into a valuable tool for the ROS 2 community. Feedback, suggestions, or even contributions are all welcome! :blush:

5 Likes

May it be integrated as an extension to ROS 2 CLI?

Like

ros2 top <parameters>

Yea it would be great but it has to be integrated with the node class as well to do the node registration part.

Just FYI.

there has been similar thing, GitHub - iwatake2222/rotop: top command for ROS 2

1 Like

Oh nice. There is no GPU usage though.

I’m not sure about the include requirement. Seems heavy to me. I suppose it would be nice if ros2 nodes or launch reported their pid(s) or similar to enable tools like this. The other approach is to filter processes that are run by ros2 launch or ros2 run, which usually works.

Regardless, I applaud the effort. I have had similar needs before, except published to a ros topic.

1 Like

It would be really nice to include network utilization and if possible network delay. On my last project i had problems with network bandwidth, but it took me so long to find this out.

What’s network delay?

That’s a great idea! It would be really beneficial to have these metrics stored somewhere, like in a topic or a file.

People often need to access historical metrics to troubleshoot issues that occur. Having a way to track these metrics is incredibly helpful, especially since team members might not be present when these problems happen.

Also starred your repo, @Ahmed_Ali! Keep up the good work!

1 Like