inflation-layer

Tune Nav2 costmap inflation layer parameters for obstacle distance control.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Configuring the Nav2 InflationLayer is counterintuitive: the relationship between cost_scaling_factor and robot clearance is inverted, and misordered plugin lists silently overwrite the cost gradient. This Skill provides the cost formula, decay curves, and tuning presets needed to configure inflation correctly the first time. ## Core Features & Use Cases - Cost Formula Reference: Explains the exponential decay formula cost(d) = 253 * exp(-cost_scaling_factor * (d - inscribed_radius)) with concrete cost tables at multiple scaling factors. - Tuning Presets: Provides ready-to-use inflation_radius and cost_scaling_factor values for narrow corridors, tight spaces, and general-purpose indoor navigation. - Misconfiguration Diagnosis: Documents common mistakes such as placing InflationLayer before other plugins, oversized inflation radii, and excessively steep decay factors. - Use Case: A robot oscillates near walls in a narrow corridor. Use this Skill to recognize that cost_scaling_factor is too high, lower it to 2.5, and restore smooth corridor-centering behavior. ## Quick Start Ask the AI to tune the Nav2 inflation layer parameters for a differential drive robot navigating narrow indoor corridors.

Frequently Asked Questions about inflation-layer

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

FAQPage Schema
How do I tune the Nav2 inflation layer cost_scaling_factor?

Set cost_scaling_factor between 2.5 and 5.0 for most indoor robots. Higher values create steeper decay so the robot navigates closer to walls; lower values create gentle gradients that keep the robot centered in corridors.

What is the Nav2 inflation layer cost formula?

The cost is 253 * exp(-cost_scaling_factor * (d - inscribed_radius)), where d is distance from the nearest lethal cell. Cost equals 253 at the inscribed radius and decays exponentially to zero at inflation_radius.

Why does my Nav2 robot drive too close to walls?

A high cost_scaling_factor causes steep cost decay, so the planner sees low cost near walls and routes there. Lower the factor to extend meaningful cost further from obstacles and push paths toward corridor centers.

Why is the inflation layer not working in my costmap?

InflationLayer must be the last plugin in the costmap plugin list. Any layer added after it overwrites the generated gradient in those cells, silently removing the inflation effect.

What inflation_radius should I use for indoor navigation?

Use 0.55m as a general-purpose starting point, 0.40m for narrow corridors, and 0.30m for tight spaces. Avoid values below inscribed_radius plus 0.1m or above 1.5m indoors.

Can global and local costmaps use different inflation parameters?

Yes. A common setup uses gentle inflation (radius 0.55, factor 2.5) in the global costmap for smooth paths and tighter inflation (radius 0.40, factor 5.0) in the local costmap for reactive maneuvering.