TECHNOLOGY

Nav2 RecoveryNode: recovery success retries the task, rather than completing it

In this article
THE QUICK TAKE

RecoveryNode succeeds when its task child succeeds; a successful recovery consumes a retry opportunity and returns control to that task.

Name the child whose success matters

A navigation dashboard marks a recovery action green after clearing a costmap. An application then reports the whole route complete although the path-following child is about to run again. The error is a status-scope mismatch. In Nav2 RecoveryNode, the first child is the primary task and the second is a recovery action. Instrument both identities instead of summarizing their successful ticks as interchangeable progress events. Recovery can prepare another attempt without satisfying the original goal.

Follow the transition after successful recovery

The RecoveryNode interface specifies that success depends on the first child. In the inspected tick implementation, primary failure invokes the recovery child if retry capacity remains. A successful recovery increments the local retry counter and selects the primary child again. A running recovery keeps the parent running; failed recovery fails the parent. Therefore the recovery success event is evidence that its own operation completed, not evidence that the primary navigation task subsequently succeeded.

Count retries after the initial attempt

Treat number_of_retries as opportunities to recover and try the task again, not as a label for the initial task invocation. With a deliberately configured single retry, the expected failure sequence is initial task failure, successful recovery, then another task failure followed by parent failure. Nested RecoveryNodes have their own counters and subtree scopes. A log that adds every recovery across the tree into one undifferentiated number loses which task was actually retried.

Exercise a deterministic nonactuating tree

A proposed unit fixture should supply scripted child statuses instead of moving a robot. Include recovery success followed by task success, recovery failure, exhausted retries and a running recovery that spans ticks. Record ordered parent and child statuses. Test skipped-child handling separately because it follows distinct branches in the current implementation. This fixture establishes control-flow interpretation; it does not demonstrate that clearing a map, backing up or rotating removed a real obstacle.

Preserve the reset boundary

The inspected halt method resets the retry counter and selected-child index. A parent halt followed by a new activation therefore needs an identifiable lifecycle boundary in diagnostics. Do not silently treat that fresh local retry budget as evidence of unlimited progress within one uninterrupted attempt. Capture tree configuration, node instance, activation interval and terminal status together. Also avoid claiming that every failure branch necessarily invokes the full halt path: the skipped-recovery branch has its own handling.

Report control flow separately from recovery quality

A correct status trace can reveal an application accounting error even when recovery behavior itself is unchanged. Physical effectiveness still needs observation of the task after recovery. The BatchWeave recovery discussion illustrates another explicit recovery boundary; software reproducibility supports retaining the tree and plugin revision. For this node, accept the primary task’s terminal evidence and the local retry history, rather than promoting a successful subsidiary operation into a completed route.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles