Field guide
Nav2 Collision Monitor: Find Commands That Bypass It
Trace mobile-robot velocity sources to the base input, find alternate paths around Nav2 Collision Monitor, and run an offline command-routing check.
The short answer
Trace every intended velocity source to the actual mobile-base command input. For any source claimed to be covered by Nav2 Collision Monitor, every modeled route to that input must pass through the monitor. Finding one monitored route is insufficient if another route bypasses it.
A navigation controller can feed Collision Monitor correctly while a teleoperation process publishes directly to the base. The monitor’s presence, an obstacle display or a zero-velocity output does not resolve that second path. Start with command authority and routing before treating a software stop demonstration as system-level evidence.
The Nav2 Jazzy reference defines cmd_vel_in_topic as the desired-velocity input and cmd_vel_out_topic as the output produced by Collision Monitor. It also explicitly says the CPU-level node does not provide hard real-time safety certifications. This guide therefore checks a narrow integration claim, not whether a robot is safe around people. Use the application safety standards map for the broader review.
Define the command boundary before drawing arrows
Identify the exact interface that the base controller consumes. It may not be a topic called /cmd_vel. Record the fully resolved name, message type, receiving component and any downstream gateway. Include other interfaces capable of commanding the same motion, even if they are not ROS topics.
Then enumerate the sources that can issue velocity requests in each mode:
- navigation and recovery behavior;
- teleoperation and remote assistance;
- docking or a vendor-specific maneuver;
- commissioning, maintenance and diagnostic tools;
- application-specific control or a separate fleet interface.
These are review candidates, not claims that every Nav2 installation contains those sources. Mark an absent interface as absent with evidence. Do not silently omit a source merely because it was inactive during a navigation demonstration.
For a particular mode, distinguish available routing, currently selected authority and actual delivered commands. A multiplexer can expose several possible routes while selecting one at a time. If your diagram includes all modes, a bypass finding means the all-modes coverage claim needs review. It does not prove simultaneous command delivery.
A monitored route and a bypass can coexist
Here is a hypothetical command chain, not a complete Nav2 configuration:
navigation -> /request -> smoother -> /filtered
-> collision_monitor -> /base_cmd -> base
teleop -> /request
Both modeled sources pass through collision_monitor. Now add this route without removing anything:
teleop -> /base_cmd -> base
The original monitored teleoperation route still exists. A check that asks only whether teleoperation can reach the monitor would pass. A check that asks whether it can reach the base without the monitor would identify the bypass.
A downstream multiplexer requires the same scrutiny. If its navigation input comes from the monitor but its teleoperation input does not, monitor coverage cannot be generalized to the selected teleoperation mode. A downstream relay also needs an explicit contract: forwarding an output unchanged is a different claim from generating or modifying motion requests.
Read effective configuration, not just defaults
The Jazzy reference documents the default input as cmd_vel_smoothed and output as cmd_vel, with a note that the pre-Jazzy input default differed. These are relative names, not proof of the names resolved in your application. Namespaces, launch remappings and overrides belong in the evidence record. The pinned implementation creates its velocity subscription and publisher from those configured topic values.
Check these boundaries separately:
| Boundary | Evidence to retain | What it does not establish |
|---|---|---|
| Input and output | Effective cmd_vel_in_topic, cmd_vel_out_topic, resolved endpoints and remappings |
That every other command source uses the input |
| Message interface | Actual endpoint types and enable_stamped_cmd_vel setting |
Matching delivery or physical motion |
| Lifecycle | Monitor state during the reviewed mode and restart sequence | Valid observations or continuous processing |
| Observation validity | Enabled sources, timestamps, effective source_timeout and per-source overrides |
A base-controller command watchdog |
| Optional state output | Configured state_topic, observations and their timing |
Independent measurement of the robot stopping |
| Base behavior | Input authority, usable-command timeout and observed response | Coverage of an unreviewed driver or operating mode |
The documented enable_stamped_cmd_vel setting selects Twist or TwistStamped; the Jazzy reference lists false as the default. Verify installed behavior rather than carrying a default across distributions. Endpoint compatibility and freshness are separate from routing, as explained in our ROS 2 QoS and watchdog guide.
The implementation’s process() returns when processing is inactive, and its velocity callback invokes processing. These source facts are reasons to retain lifecycle and input evidence. They are not measurements of your node’s runtime behavior.
Run an offline coverage check with a deliberate counterexample
The following standard-library Python program models directed edges between components and topics. For each declared source, it first checks whether the base is reachable at all. It then removes the monitor from the model and checks again:
- COVERED IN MODEL: the base is reachable, but not after removing the monitor.
- BYPASS: a route to the base survives monitor removal. The returned path is a witness to inspect.
- DISCONNECTED: the source has no modeled route to the base. Do not count that as covered merely because no bypass exists.
Save the block as routing_check.py and run python3 routing_check.py. It neither connects to ROS nor sends commands. Component names are illustrative identifiers. All edges are manually supplied, not discovered from a running system.
from collections import deque
def find_path(edges, start, target, blocked=None):
if start == blocked or target == blocked:
return None
graph = {}
for left, right in edges:
if blocked not in (left, right):
graph.setdefault(left, []).append(right)
queue = deque([(start, [start])])
seen = {start}
while queue:
node, path = queue.popleft()
if node == target:
return path
for neighbor in graph.get(node, []):
if neighbor not in seen:
seen.add(neighbor)
queue.append((neighbor, path + [neighbor]))
return None
def review(edges, source, target="base", monitor="collision_monitor"):
if find_path(edges, source, target) is None:
return "DISCONNECTED", None
bypass = find_path(edges, source, target, blocked=monitor)
if bypass is not None:
return "BYPASS", bypass
return "COVERED IN MODEL", None
chain = [
("navigation", "/request"),
("teleop", "/request"),
("/request", "smoother"),
("smoother", "/filtered"),
("/filtered", "collision_monitor"),
("collision_monitor", "/base_cmd"),
("/base_cmd", "base"),
]
scenarios = [
("A", chain, "teleop", "COVERED IN MODEL"),
("B", chain + [("teleop", "/base_cmd")], "teleop", "BYPASS"),
("C", chain, "docking", "DISCONNECTED"),
]
for label, edges, source, expected in scenarios:
status, witness = review(edges, source)
assert status == expected
print(f"{label}: {status}")
if witness:
print(" " + " -> ".join(witness))
# A cycle must not hang the search or conceal a bypass.
assert review(chain + [("smoother", "/request")], "navigation")[0] == (
"COVERED IN MODEL"
)
# An upstream bypass through a second relay is still a bypass.
assert review(
chain + [("/request", "relay"), ("relay", "/base_cmd")], "navigation"
)[0] == "BYPASS"
# A broken output chain is disconnected, not covered.
assert review(chain[:-1], "navigation")[0] == "DISCONNECTED"
We executed this exact block as an offline model. Its printed result was:
A: COVERED IN MODEL
B: BYPASS
teleop -> /base_cmd -> base
C: DISCONNECTED
The additional assertions check a cycle, an indirect bypass and a missing final connection. This is an editorial model check, not an execution of Nav2 or a robot test.
For your own diagram, run review() for every declared command source and for each relevant base input and operating mode. A single source passing does not establish complete coverage. If a mode intentionally permits a different authority path, record that exception and the controls governing it rather than calling it monitored.
What a passing graph cannot tell you
The model does not parse launch files, discover publishers, verify message types or QoS, represent time, or establish that the monitor is active. It treats every supplied edge as possible. Mutually exclusive modes need separate diagrams or explicit interpretation. A component represented as one vertex may have different internal paths; split those paths when they matter.
Unlisted publishers, non-ROS driver inputs and future configuration changes are invisible to the calculation. Even a complete routing model does not verify sensor coverage, polygon suitability, computation latency, braking, payload stability or physical stopping distance. The loaded-footprint guide addresses a different prerequisite, what space the robot occupies, not whether commands are monitored.
Keep three different timeout questions separate
The Jazzy documentation describes source_timeout as the maximum interval for which observation-source data remains valid, with a per-source override. Setting it to 0.0 disables that blocking mechanism. This is a documented behavior, not a recommended deployment value.
It separately defines stop_pub_timeout as the interval after which zero-velocity publication ceases. In the pinned implementation, publishVelocity() suppresses continued stop output once the corresponding elapsed-time condition is met. Do not interpret this parameter as a deadline by which the physical robot has stopped. Nor should downstream behavior depend on zero messages continuing indefinitely.
A third question belongs to the base controller: what happens if usable velocity commands disappear? The timeout, hold behavior, stopping response and restart authority need evidence for that controller. Sensor timeout, zero-output publication duration and command-loss response are different contracts. No numeric setting in this article establishes a safe stopping requirement.
A command-path handoff worksheet
Use one record per reviewed mode and configuration. Runtime and physical results begin as NOT TESTED unless evidence exists.
| Record | Required entry |
|---|---|
| Configuration identity | ROS distribution, installed package versions, launch arguments, effective parameters and revision |
| Motion sink | Actual controller interface, resolved name, type and downstream gateways |
| Source inventory | Every permitted command source, including maintenance and alternative driver paths |
| Authority by mode | Selected source, selection rules, mode transitions and intentional exceptions |
| Routing evidence | Endpoint observations, launch/remap review, all modeled paths and unexplained publishers |
| Offline review | Source-by-source covered, bypass or disconnected result, with witness paths |
| Runtime evidence | Monitor lifecycle, input/output observations, enabled sensors and timestamp interpretation |
| Loss and restart contract | Separate observation loss, command loss, process restart and authority restoration behavior |
| Physical acceptance | Approved procedure, actual response evidence, configuration limits and competent acceptance owner |
| Unresolved findings | Missing interfaces, untested modes, unknowns and the owner of each follow-up |
First review configuration and the offline diagram. A later runtime exercise should use an isolated, non-motion environment where possible. Any physical trial, deliberate sensor failure or command-loss injection needs a separately approved procedure, competent supervision and suitable protective measures. Do not experiment by adding a second publisher to a working robot.
Keep a routing claim separate from a safety claim: every listed source passes through this monitor in this reviewed mode is narrower than the robot will stop safely in the application. Both require evidence, but different evidence.
Sources and methodology
- Nav2 Jazzy Collision Monitor reference, retrieved November 25, 2026. Source for topic parameters, stamped messages, observation timeout, optional state output, stop publication timeout and the explicit certification limit.
- Pinned first-party Jazzy documentation, revision dated August 31, 2026. Preserves the reviewed reference text, not an asserted installed-package version.
- Pinned Navigation2 Jazzy implementation, revision dated November 18, 2026. Source for configured input/output creation, processing activation, velocity-callback processing and repeated-stop publication suppression. A branch snapshot is not evidence that your installation contains that revision.
The command diagrams, graph algorithm, counterexamples and worksheet are our editorial contribution. Only the self-contained Python example was executed. No ROS graph discovery, middleware delivery, Nav2 runtime behavior, safety certification or physical stopping performance was tested or claimed.
Frequently asked questions
Does starting Nav2 Collision Monitor prove every velocity command passes through it?
No. Trace each intended command source to the actual base-controller input. A second publisher, downstream multiplexer or separate driver interface can create a path that does not pass through the monitor. A monitored navigation path does not establish coverage of teleoperation, docking or recovery modes.
Does the offline graph check validate robot stopping performance?
No. It checks reachability in a manually supplied command-path model. It does not discover ROS endpoints, verify delivery or lifecycle state, test sensors, measure physical stopping, or establish safety certification.
Is source_timeout a replacement for a base-controller command watchdog?
No. The documented Collision Monitor parameter concerns the validity of observation-source data. A separate command watchdog concerns what the base controller does when usable velocity commands stop arriving. Their conditions, timing and effects require separate evidence.