spin-behavior

Configure Nav2 spin recovery behavior parameters for in-place robot rotation.

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/three1324/yeonjinautomotive --skill spin-behavior-three1324
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spin-behavior
Source: https://github.com/three1324/yeonjinautomotive/tree/main/.claude/skills/spin-behavior
Command: npx skills add https://github.com/three1324/yeonjinautomotive --skill spin-behavior-three1324

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Robots using Nav2 often get stuck when the spin recovery behavior fails to start, oscillates, or overshoots its target angle. This Skill provides the configuration knowledge to tune the nav2_behaviors::Spin plugin so stuck-recovery rotations work reliably. ## Core Features & Use Cases - Parameter Tuning: Configure spin_dist, max_rotational_vel, min_rotational_vel, rotational_acc_lim, and simulate_ahead_time in the behavior_server YAML. - Failure Diagnosis: Resolve the common "spin won't start" problem caused by simulate_ahead_time collision projection overlapping inflated costmap cells. - BT Integration: Wire the Spin action node into RecoveryNode and RoundRobin behavior tree sequences alongside BackUp and Wait. - Use Case: Your robot logs "Collision Ahead" and the spin recovery returns FAILURE immediately without rotating. Use this Skill to lower simulate_ahead_time from 2.0 to 0.5-1.0 and reduce the local costmap inflation_radius so rotation can proceed. ## Quick Start Ask the AI to configure the Nav2 spin recovery behavior so the robot rotates 90 degrees when stuck without failing the collision check.

Frequently Asked Questions about spin-behavior

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

FAQPage Schema
How do I configure the Nav2 spin recovery behavior?

Add the spin plugin to behavior_server's behavior_plugins list and set parameters like simulate_ahead_time, max_rotational_vel, min_rotational_vel, and rotational_acc_lim in the YAML. Trigger it from a behavior tree with a Spin node specifying spin_dist in radians.

Why does Nav2 spin recovery fail immediately without rotating?

The spin behavior simulates the robot footprint forward by simulate_ahead_time and aborts if the projected pose touches inflated costmap cells. Lower simulate_ahead_time from 2.0 to 0.5-1.0 or reduce the local costmap inflation_radius.

What units does spin_dist use in the Nav2 Spin BT node?

spin_dist is specified in radians, where positive values rotate counterclockwise. Common values are 1.57 for roughly 90 degrees, 3.14 for 180 degrees, and 6.28 for a full rotation.

Why does the spin behavior oscillate without making progress?

Oscillation happens when min_rotational_vel is too low to overcome static friction, so the robot never builds rotation. Increase min_rotational_vel to 0.4 rad/s or higher.

How do I debug Nav2 spin behavior collision check failures?

Echo /cmd_vel to verify angular.z commands, confirm the /spin action exists with ros2 action list, and set the behavior_server logger to DEBUG via the set_logger_level service to see collision check details.