Skip to content
PPHYSICAL AI GUIDESTART HERE →

Field guide

Robot Network Failures: ROS 2 QoS, Stale Data, and Watchdogs

How to evaluate robot message freshness, ROS 2 QoS compatibility, deadline events, and recovery after network loss without mistaking delivery for safe control.

By Physical AI Guide Editorial TeamPublished Updated

The short answer

A robot network test should establish what the controller does with missing, delayed, repeated, and obsolete information, not merely whether two nodes can exchange messages. ROS 2 Quality of Service, or QoS, helps define communication behavior. It does not replace an application freshness rule, a recovery policy, or a validated physical safety response.

The distinction matters when a camera stream pauses but the last image remains visible, a command arrives after its task was cancelled, or a restarted component receives information retained from an earlier operating state. A delivery success can coexist with an invalid decision.

This guide uses the official ROS 2 Jazzy documentation as its technical reference. It offers a communication-contract worksheet and a bounded evaluation plan, not a tested ROS installation, a measured network benchmark, or a safety-certified configuration. The recommendations below are editorial engineering guidance. Actual limits and motion responses must come from the application’s requirements and qualified system review.

For an investigation after a communication failure, our robot incident recording and replay guide explains how to preserve capture coverage, clock assumptions, and original versus newly generated outputs.

Separate five questions before choosing QoS

The ROS 2 QoS settings guide describes policies for delivery, history, durability, timing, and publisher liveliness. These are different dimensions of a communication contract.

Ask five questions for every input that influences motion:

  1. Compatibility: Can this publisher and subscription connect with their requested and offered profiles?
  2. Delivery: Which samples may be lost, retried, or retained?
  3. Freshness: Is the information still valid when the decision uses it?
  4. Authority: Does the message belong to the current task, controller, and operating session?
  5. Outcome: Did the intended application response and physical result actually occur?

The first two are directly shaped by QoS. The other three require application and system evidence. Our physical AI developer stack guide maps the wider interfaces, controllers, planning tools, and deployment responsibilities around this contract.

Before tuning delivery policies for sensor streams, use the camera and point-cloud bandwidth budget to check whether their actual data buffers and rates can fit across the intended link. Payload sizing and freshness acceptance answer different questions.

What the main ROS 2 QoS policies actually tell you

Policy Meaning in the Jazzy documentation What still needs checking
Reliability Best effort may lose samples; reliable delivery may retry Whether the information arrives soon enough to remain useful
History and depth Keep last retains up to a configured number of samples; keep all is subject to middleware resource limits Other buffers, callback delay, and the age of the sample actually used
Durability Transient local retains samples for late joiners; volatile does not attempt that persistence Whether retained state belongs to the current task or session
Deadline Expected maximum interval between messages Whether the application handles the missed interval in time
Lifespan Maximum interval from publication to reception before a sample is expired and silently dropped Sensor capture age and delay after reception
Liveliness and lease duration Whether the publisher indicates it is alive within the lease Whether the relevant sensor, task, and controller are progressing correctly

These definitions come from the official QoS policy reference. They are not interchangeable health indicators.

For example, a lifespan check is not automatically a capture-to-actuation age check. The documented interval begins at publication and ends at reception. Your freshness contract may also need to cover acquisition, preprocessing, application queues, inference, and controller execution. That is a system requirement beyond the stated lifespan definition.

Likewise, automatic liveliness is not proof that one particular sensor pipeline is producing new measurements. The Jazzy reference says publishing on any one of a node’s publishers can renew the liveliness of all that node’s publishers. Treat a heartbeat as evidence of exactly the mechanism being monitored, not evidence that the whole robot is healthy.

Compatibility can explain a silent robot interface

The Jazzy documentation uses a request-versus-offered model. A subscription requests the minimum quality it accepts; the publisher offers the maximum quality it provides. A connection requires compatibility across all policies that affect matching.

A particularly useful debugging case is reliability:

Publisher offers Subscription requests Reliability-compatible?
Best effort Best effort Yes
Best effort Reliable No
Reliable Best effort Yes
Reliable Reliable Yes

This table is reproduced in substance from the official compatibility rules. A yes in this table is not proof of an overall match. Incompatible durability, deadline, or liveliness requirements can still prevent communication.

Do not diagnose every missing message as packet loss. First record both endpoint profiles, the middleware implementation, and any reported incompatible-QoS event. The documentation exposes offered and requested incompatible-QoS events, as well as deadline and liveliness events. Application callbacks decide how to handle them.

Defaults also need recording. Jazzy documents the normal publisher/subscription default as keep-last history, depth 10, reliable delivery, and volatile durability, with other policies using their stated defaults. It separately warns that a system-default profile uses the underlying middleware’s choices. A profile name is not a substitute for the effective configuration of the deployed system.

Why reliable delivery is not always the freshest stream

The official lossy-network demo pairs an image publisher with an image viewer. Under its simulated packet-loss setup, the documentation describes the reliable configuration slowing as packets are resent. With best effort enabled, the demonstration instead shows missing frames.

That is a useful illustration of a tradeoff, not a universal performance ranking. The same QoS reference explains that the sensor-data profile prioritizes timely readings over receiving every sample, using best effort and a smaller queue.

For a particular robot, evaluate the consequences of both loss and delay:

  • Does losing a frame leave the controller without an acceptable estimate?
  • Does retrying older information make the next decision too old?
  • Can application or device queues retain obsolete samples even when the transport queue is small?
  • Does the consumer explicitly reject an expired observation?
  • Is the fault response appropriate when no acceptable replacement arrives?

Do not copy a camera policy onto every command channel. Sensor streams, state snapshots, task requests, and motion commands have different consequences when information is lost or repeated. The Jazzy guide specifically warns that persistent service requests could cause outdated requests to reach a restarted service server and produce side effects. It recommends volatile durability for services.

Our voice-command lifecycle guide addresses the adjacent application problem: accepting or cancelling a request is distinct from demonstrating a safe physical outcome.

For action-based task control, use the ROS 2 cancellation acceptance worksheet to distinguish cancel request scope, per-goal acknowledgements, and terminal results.

Write a freshness and recovery contract

Before fault injection, fill out one contract per consequential interface. The following is a proposed review worksheet, not a ROS-provided standard.

Contract field What to record
Message role Observation, estimate, task request, state snapshot, or motion command
Producer and consumer Exact components, software versions, and authority boundaries
Effective QoS Policies on both ends, middleware, and relevant resource limits
Timestamp meaning Capture, publication, reception, or application-use time; clock assumptions
Acceptance rule Maximum valid age, required identity, current task/session, and validity checks
Fault detection Missing samples, expired samples, incompatible QoS, missed deadlines, or no task progress
Response Which component rejects, pauses, refuses new work, or requests bounded assistance
Recovery rule Conditions for resuming, clearing old state, and authorizing a new command
Evidence Logs connecting fault injection, detection, application response, and observed outcome

Avoid selecting arbitrary timeout values because they appear responsive. The allowed interval depends on the task and the time needed to reach the required state. Record the source of the requirement, not just the chosen number.

A proposed application watchdog can monitor time since the last accepted input and invoke a defined response when the freshness contract is violated. Its own execution path needs scrutiny: if the same overloaded processing path delays both data handling and the watchdog, the monitor may not respond when intended. Record which component supervises the watchdog and how the response was exercised. Do not describe this proposed software mechanism as an independent safety function without the required system evidence.

Cross-machine timestamps also need an explicit clock model. If clocks cannot be compared reliably, label capture-to-use age unknown rather than presenting an apparently precise subtraction. Local elapsed-time monitoring can answer a different question, such as time since the last accepted input, but should not be relabeled as measured end-to-end age.

A bounded network-fault evaluation plan

Start with a non-motion harness or a simulation where the consequences are controlled. Any physical testing needs a separately reviewed procedure, supervision, and independent protective measures appropriate to the application. The following sequence is a test-design recommendation, not a set of commands to run on a working robot network.

1. Preserve an unimpaired baseline

Freeze the software versions, endpoint profiles, middleware, topology, workload, and sampling configuration. Record sent, received, accepted, and rejected information separately. Also record the application result. An image viewer continuing to display a window is not proof that new usable frames are arriving.

2. Prove that the impairment reaches the real transport

The official demo warns that its loopback impairment section will not work as intended with same-host communication using shared memory in the named Connext DDS and Fast-DDS configurations. Degrading the loopback network path does not degrade a shared-memory path.

Record which transport actually carries the test traffic and how you confirmed that the intended impairment affects it. A fault injector reporting success is not proof that the robot’s data path experienced the fault. Do not alter a shared production interface merely to reproduce a tutorial.

3. Test distinct failure classes

Use a declared matrix rather than one vague disconnected-network test:

  • packet loss while the producer remains active;
  • delayed delivery and a slow consumer;
  • producer silence or process failure;
  • incompatible endpoint configuration;
  • restart of a producer or consumer;
  • reconnection after the original task has ended.

For each case, state the expected detection and response before collecting results. Keep deliberately incompatible profiles distinct from transport failures. A refusal to communicate can be the correct result of a configuration mismatch, but the application still needs to report and handle that state.

4. Observe the consumer’s decision

Log when a sample arrives, whether it passes validity checks, and whether it influences an action. A message can be successfully received and correctly rejected. Conversely, a stream can resume while the application still holds invalid task state.

For commands, a proposed contract should identify the current task or session and specify duplicate and obsolete-request handling. These are application design requirements, not automatic guarantees conferred by reliable QoS.

5. Test recovery as carefully as detection

Reconnection should not be treated as permission to resume every interrupted action. Check whether old buffers were cleared or revalidated, whether the current state was reacquired, and whether the responsible controller authorized the next step. If human help is needed, include it in the intervention and handoff record.

What evidence should a deployment review request?

Ask for a trace that joins four layers:

  1. Communication: effective profiles, matching state, message sequence, and fault exposure.
  2. Application: acceptance or rejection, reason, task/session identity, and decision timing.
  3. Control: response requested, response executed, and authority transitions.
  4. Outcome: observed state, task result, recovery, and human support.

For a mobile base, also trace every permitted velocity source to the actual controller input. Our Nav2 Collision Monitor routing check shows how a monitored navigation path can coexist with a separate command bypass, using an offline graph example and handoff worksheet.

Report attempted cases, repetitions, failures, excluded runs, and unknowns. Separate time since last valid input from publication-to-reception delay, capture-to-use age, fault-detection delay, and physical response time. Do not merge these into a single latency number.

A deadline event proves neither that its callback ran promptly nor that a robot reached an acceptable state. A liveliness event does not certify sensor correctness. A completed message transfer does not demonstrate a completed task. These boundaries belong alongside the runtime-monitor contract and safety-case evidence, not below the success-rate headline.

Bottom line

Choose QoS to support the interface’s communication requirements, then verify the application’s freshness, authority, and recovery behavior separately. A useful acceptance test shows not only how information moves, but also when the system refuses to act on information that is no longer valid.

Sources and evidence limits

Reviewed on October 22, 2026. The sources are version-specific project documentation, not newly published experimental results. No source publication date or robot deployment outcome is inferred.

  1. ROS 2 Jazzy: Quality of Service settings. Source for policy definitions, profiles, compatibility tables, defaults, service-request warning, and QoS events. First-party documentation source.
  2. ROS 2 Jazzy: Using quality-of-service settings for lossy networks. Source for the image-stream illustration, retry-versus-drop distinction, and shared-memory caveat. First-party tutorial source.

The contract worksheet, review questions, failure matrix, and reporting recommendations are our analysis of those documented mechanisms. They are not measurements from an executed test, instructions for hazardous fault injection, or a substitute for application-specific safety engineering.

Frequently asked questions

Does reliable ROS 2 messaging guarantee fresh robot commands?

No. Reliability concerns message delivery and can involve retries. It does not establish that a command still describes the current task, that its sensor input is fresh, or that the robot completed the requested movement. Those need separate checks and evidence.

Can incompatible QoS settings stop ROS 2 messages entirely?

Yes. In the Jazzy documentation, a best-effort publisher is incompatible with a subscription requesting reliable delivery. A reliable publisher can match a best-effort subscription on that policy, but all other compatibility-relevant policies must also match.

How are deadline, lifespan, and liveliness different?

Deadline expresses the expected interval between messages. Lifespan bounds how long a published message remains valid for reception. Liveliness concerns whether a publisher indicates that it is alive within a lease duration. None alone establishes task progress or a safe physical state.

Should robot cameras always use best-effort delivery?

No universal setting fits every application. The Jazzy sensor-data profile favors timely samples over complete delivery, using best effort and a smaller queue. The right choice still depends on the task, loss tolerance, middleware, buffering, and measured end-to-end freshness.

Is a ROS 2 deadline event a safety stop?

No. The documentation exposes events that application callbacks can handle. The system still needs a defined response, an execution path that can run during the fault, and physical validation where motion is involved. A transport event is not safety certification.