recovery-behavior-tree

Design Nav2 recovery behavior trees with RecoveryNode and RoundRobin strategies.

18|2|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill recovery-behavior-tree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: recovery-behavior-tree
Source: https://github.com/wimblerobotics/ros2-copilot-skills/tree/main/recovery-behavior-tree
Command: npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill recovery-behavior-tree

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Navigation in ROS 2 Nav2 can fail due to planning or obstacle conditions. This skill provides a structured recovery pattern that wraps normal navigation in a RecoveryNode and an escalating recovery sequence to retry or adapt when failures occur.

Core Features & Use Cases

  • RecoveryNode orchestration: two-branch structure with a normal navigation branch and a recovery branch that triggers on failure.
  • PipelineSequence and ReactiveFallback: maintain continuous replanning while following a path; apply sequential recovery actions when needed.
  • RoundRobin recovery strategies: cycle through ClearCostmaps, Spin, Wait, BackUp, etc., with a GoalUpdated guard to cancel on new goals.
  • Configurable retries: number_of_retries controls how many recovery attempts to perform before giving up.
  • ROS 2 Nav2 integration: designed for Nav2 behavior trees and ROS 2 navigation pipelines.
  • Example: If the robot hits an obstacle, NavigateRecovery cycles through recovery strategies to replan and retry.

Quick Start

Create a RecoveryNode-based behavior tree that retries navigation with escalating recovery actions when the normal path fails.

Frequently Asked Questions about recovery-behavior-tree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Nav2 recovery behavior trees to handle planner failures?

To configure Nav2 recovery behavior trees, use a two-child RecoveryNode that pairs a normal navigation PipelineSequence with a ReactiveFallback containing a RoundRobin of recovery actions like ClearCostmaps, Spin, Wait, and BackUp, triggered sequentially when the planner fails.

What recovery actions should I cycle through when ROS 2 navigation hits an obstacle?

When ROS 2 navigation hits an obstacle, you should cycle through standard recovery actions using a RoundRobin strategy within a ReactiveFallback, including clearing costmaps, spinning in place, waiting, and backing up. A GoalUpdated guard ensures recovery is canceled if a new goal is received.

How does a RecoveryNode work in a ROS 2 Nav2 behavior tree?

A RecoveryNode in a ROS 2 Nav2 behavior tree operates as a two-branch structure where the first child attempts normal navigation and the second child executes recovery actions upon failure. It retries the normal operation after a successful recovery action, up to a configurable number of retries.

Can I limit the number of recovery attempts in a Nav2 behavior tree?

Yes, you can limit recovery attempts in a Nav2 behavior tree using the configurable number_of_retries parameter. This parameter controls how many times the RecoveryNode cycles through its escalating recovery strategies before giving up and reporting a navigation failure.

Why does my Nav2 planner fail to recover after encountering an obstacle?

A Nav2 planner may fail to recover if the behavior tree lacks a structured recovery sequence with a ReactiveFallback and RoundRobin to cycle through costmap clearing, spinning, waiting, or backing up. Without these escalating recovery strategies and a retry limit, the navigation pipeline cannot adapt to transient obstacles.