NEWAI chat: ask your fleet anything, in plain language. Chat with your fleet Read more →

How to monitor ROS 2 across a fleet of robots

What to watch in ROS 2 on every robot in a fleet (nodes, topic rates, diagnostics, TF, tracking error), the DDS traps, and why the monitor only listens.

Illustration for "Monitoring ROS 2 across a fleet": a robot dog, a mobile robot, with the label "/camera_wrist 11 Hz · below"

On one robot, monitoring ROS 2 is easy. You SSH in, run ros2 node list, ros2 topic hz /camera/image_raw, look at rqt, and you know what's going on.

On twenty robots at four sites, behind cellular routers, that stops working. Nobody runs ros2 topic hz on twenty machines every morning. And the problems you care about don't show up when someone happens to be looking. They show up at 4 a.m. on robot 14, as a camera publishing at 11 Hz instead of 30.

The robots also changed. A ROS graph used to be a set of fixed programs passing messages. Now one of those nodes runs a learned model that decides from what the cameras see, many times a second. When the camera topic slows down, the model doesn't crash. It makes decisions from older images. The model gets updated, the site changes, and the robot is far from the team. So the ROS graph is not only plumbing anymore. It's the evidence of what the robot saw and did.

This post is how we think about monitoring ROS 2 across a fleet: what to watch, the DDS realities that bite, and how to tell which robot is the odd one out.

The short answer: On every robot, watch for missing nodes, the rate of every important topic against that robot's own normal, /diagnostics, error counts in /rosout, the age of TF transforms and, for arms, tracking error between planned and actual motion. The monitor should only listen, never publish. Then compare robots running the same graph, because the one that's different usually points straight at the problem.

Rule one: the monitor only listens

Before what to watch, how to watch.

A monitor should never publish, never call services, never set parameters, and never become a node that something else depends on. That sounds obvious. In practice I see monitors that publish heartbeats into the robot's graph, monitors that call get_parameters on every node every few seconds, and monitors that subscribe to every camera topic with reliable QoS.

  • Publishing changes the system you're observing. A message on the wrong topic, with the wrong type or a name collision, can reach a controller. On a robot that moves near people, observability must have no way to cause motion.
  • Subscribing has a cost. Every subscriber to a raw image topic makes DDS deliver another copy of every frame. On a small board, subscribing to three 1080p cameras just to count their rate can cost more CPU than the node publishing them. Count messages without deserializing images, and subscribe with best-effort QoS so a slow monitor never makes the publisher wait.
  • Discovery traffic is real. Every new participant adds discovery traffic. A monitor that creates a participant per topic, or restarts often, adds load to the same network the robot uses.

The best monitor is one the robot's graph barely notices.

What to watch

Here is the list I'd put on every robot. Each item says why it matters, because a list of metrics without a reason becomes a dashboard nobody reads.

Nodes: is everything that should run, running?

  • Keep an expected node list per robot type. In version control, next to the launch files. The check is simple: which expected nodes are missing right now. A missing node is the most common "robot does nothing useful" cause, and it's often silent, because nothing else crashes.
  • Watch for restarts. A node that disappears and reappears every few minutes is crashing and being respawned. respawn=True in a launch file hides crashes very well. Count appearances.
  • Watch lifecycle state. For managed nodes, a node stuck in inactive exists in ros2 node list but doesn't work. Present is not the same as active.

Topic rates: compared with what's normal for this robot

  • Measure the rate of every topic that matters. Cameras, joint states, odometry, lidar, the policy's action topic, controller state.
  • Compare with this robot's normal, not a global number. A wrist camera configured for 15 fps on one robot and 30 on another is not a problem. A camera that was at 30 yesterday and is at 11 today is.
  • Separate zero from slow. Zero means a node died or a device disconnected. Slow means something is struggling: USB bandwidth, CPU, a dirty lens making auto-exposure lengthen the frame time, Wi-Fi. Different causes, different alerts.
  • Watch message age, not only rate. A topic can publish at 30 Hz with timestamps that are 400 ms old because a node somewhere is buffering. If messages carry a header stamp, compare it with the receive time (on the same machine, so clocks agree).

/diagnostics: use what the drivers already tell you

  • Read it. Many drivers already publish detailed status through diagnostic_updater: motor temperatures, voltage, connection state, frequency checks. Most teams never look at it outside the lab.
  • Escalate STALE. A diagnostic that stops updating is often more serious than one in ERROR. ERROR means the driver is alive and telling you. STALE means the thing that would tell you is gone.
  • Track transitions. OK to WARN and back fifty times an hour is a signal of its own, usually a value sitting right at a threshold.

/rosout: logs from every node, in one place

  • Count errors and warnings per node. Changes in the count are more useful than reading every line. A node that went from two warnings an hour to two hundred is telling you something.
  • Group by pattern. "Lookup would require extrapolation into the future" five thousand times is one problem, not five thousand.
  • Keep them with the robot's other logs. When something goes wrong, you want /rosout, journald and container logs on one timeline.

TF: the tree that holds everything together

  • Check that the transforms you need exist. A missing base_link to camera_link transform breaks perception silently in many stacks.
  • Check their age. A dynamic transform that stopped updating is worse than a missing one, because everything downstream keeps using an old pose.
  • Watch for extrapolation errors in /rosout. They usually mean timing problems between nodes, or clocks that disagree between machines.

Joint states, trajectories and tracking error

For arms, this is the closest ROS gets to "is the robot doing what it was told?"

  • Measure planned vs actual. Compare the commanded trajectory (or controller feedback's desired position) with /joint_states. Report the tracking error and the max over each move.
  • Measure settle time. How long after a trajectory ends until the joints are within tolerance. A slowly growing settle time is often a mechanical problem: a worn gearbox, a loose belt, a servo getting hot.
  • Pick thresholds per joint and per robot. A tracking error of 0.1 rad is a big number for a precise arm and normal on a cheap one during fast moves. Start from what the robot does on a good day and alert on departures from that.
  • Watch wrench if you have a force-torque sensor. Force spikes during moves that should be free mean a collision or a part where it shouldn't be.

DDS realities

DDS has sharp edges, and a fleet finds all of them. These are the ones I see most.

  • Robots on the same network see each other. Two robots on the same site LAN with the default ROS_DOMAIN_ID of 0 discover each other's topics. Robot A's planner can receive robot B's joint states. Give every robot its own domain ID, or restrict discovery to the local machine (ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST on recent distros, ROS_LOCALHOST_ONLY=1 on older ones) when the whole graph runs on one computer. Do this before the second robot arrives, not after.
  • Containers break shared memory quietly. Fast DDS uses shared memory between processes on the same host. Put nodes in separate containers without sharing /dev/shm or the IPC namespace, and discovery works, ros2 topic list shows everything, but large messages never arrive. Run ROS containers with host networking and host IPC, or turn shared memory transport off deliberately. And your monitor has to work the same way the robot does.
  • Multicast and Wi-Fi don't get along. DDS discovery uses multicast by default. Many access points rate-limit or drop it. If your robots discover each other unreliably over Wi-Fi, use a discovery server or unicast peers instead of fighting the network.
  • Pick one RMW for the fleet and pin it. Fast DDS and Cyclone DDS mostly interoperate, but "mostly" is not what you want in production. Set RMW_IMPLEMENTATION explicitly in your launch environment, and keep it the same on every robot of a type.
  • QoS mismatches fail silently. A subscriber asking for reliable delivery from a best-effort publisher gets nothing. No error in the default logs, just no data. When a topic "exists but has no messages", check QoS with ros2 topic info -v first.

Baselines per robot

Global thresholds don't work for a fleet, because no two robots are configured exactly alike. One has a different camera. One runs a slower compute board. One sits next to a window, and its camera rate drops every evening when the light changes.

What works is learning each robot's normal: per topic, per metric, ideally per hour of day. Then alert on sustained departures from that robot's own normal. That catches "robot 14's camera went from 30 to 11" without firing every evening on the robot by the window.

Give a baseline a few days to learn before you trust it, and re-learn it after a release that is supposed to change behavior.

Compare robots running the same graph

The most useful view in fleet monitoring is a diff. Take eight robots running the same release on the same robot type. They should have the same nodes, the same topics and similar rates.

  • Diff the graph. Robot 5 has one node fewer than the other seven. That's your answer before anyone opens a log.
  • Diff the rates. Robot 3's lidar runs at 8 Hz while its peers run at 10. Check its network interface and its CPU.
  • Diff the configuration. Camera resolution, checkpoint, which compute device a model runs on, agent version, OS version. A surprising number of "robot 3 is weird" problems are "robot 3 has a different config file than we thought".
  • Diff by version. If robots on the new release show higher tracking error than robots on the old one, that's a release effect, not a robot problem. Phased rollouts make this comparison possible. See phased rollouts and automatic rollback.

We wrote a whole post on this way of thinking: finding the robot that's different.

A short checklist

  1. Expected node list per robot type, in version control.
  2. Rate for every topic that matters, compared with each robot's own baseline.
  3. Zero and slow as separate alerts.
  4. /diagnostics collected, STALE escalated.
  5. /rosout counted per node and grouped by pattern.
  6. TF transforms checked for presence and age.
  7. Tracking error and settle time per joint for arms.
  8. One domain ID per robot (or localhost-only discovery), one pinned RMW per fleet.
  9. A monitor that never publishes and costs almost nothing.
  10. Peer comparison across robots running the same graph.

If you're still deciding how to build the stack underneath, start with the production software stack for AI-powered robots.

How we do it at PhysicalFleet

The PhysicalFleet agent observes ROS 1 and ROS 2 with nothing installed in your workspace: nodes, topics with rates, services, /rosout and diagnostics, on Fast DDS or Cyclone DDS, any domain, including robots running in containers. It never publishes. It also reads joint states, trajectories, controller feedback, TF and wrench, and measures planned vs actual tracking error. Each robot gets its own learned baseline, and fleet insights flag a robot that's missing a node or topic, an outlier against its peers, and config differences between robots that should be the same. More on the observability page.

If you run ROS 2 on more than a handful of robots, I'd love to hear what breaks first for you.

Common questions

Why can two ROS 2 robots on the same network see each other's topics?

Because DDS discovery is open by default, and robots on the same LAN with the default ROS_DOMAIN_ID of 0 discover each other's nodes. Robot A's planner can end up receiving robot B's joint states. Give each robot its own domain ID, or limit discovery to the local machine when the whole graph runs on one computer, and do it before the second robot arrives.

Why don't large ROS 2 messages arrive between Docker containers?

Fast DDS uses shared memory between processes on the same host. If the containers don't share /dev/shm or the IPC namespace, discovery still works and the topics show up, but large messages like images never arrive. Run ROS containers with host networking and host IPC, or turn the shared memory transport off on purpose.

Why does my ROS 2 topic exist but receive no messages?

Check QoS first, with ros2 topic info -v. A subscriber that asks for reliable delivery from a best-effort publisher gets nothing, and the default logs show no error. If QoS matches, look at whether the publisher is actually alive and whether containers are sharing memory correctly.

What does a STALE diagnostic mean in ROS 2?

It means the diagnostic stopped updating. That's often more serious than ERROR, because ERROR means the driver is alive and telling you something is wrong, while STALE means the thing that would tell you is gone. Escalate it instead of treating it as quiet.

Should I use Fast DDS or Cyclone DDS for a robot fleet?

Either can work. What matters is picking one and pinning it, with RMW_IMPLEMENTATION set explicitly and the same on every robot of a type. The two mostly interoperate, but mixed RMW implementations across a fleet cause bugs that only show up at one site.

#ROS 2#robot monitoring#DDS#fleet monitoring#observability#robotics
Eitan ChudnovskyCo-founder, PhysicalFleet

From the lab bench. To the entire fleet.

Connect your first machine in minutes, develop it in the lab and run your whole fleet in production from one place.

Free for up to 3 machines · Then pay as you go