Skip to content

Nav2 Inflation Layer Tuning

Source: inflation-layer

Why This Matters

Inflation is the bridge between raw obstacle truth and planner behavior. Without it, plans cut corners unrealistically. With poor tuning, the robot either scrapes walls or decides ordinary hallways are unnavigable.

Distilled Takeaways

  • Inflation should usually be the last layer in the plugin list.
  • inflation_radius defines how far cost spreads from lethal cells.
  • cost_scaling_factor changes how quickly that cost decays with distance.
  • The unintuitive part: higher cost_scaling_factor means steeper decay, which often lets paths run closer to walls.
  • Robot footprint geometry matters because the inscribed radius anchors where high costs begin to matter.

Practical Guidance

  • Tune inflation_radius from corridor and furniture geometry first, then tune cost_scaling_factor for path centering behavior.
  • If the robot hugs walls, try a lower cost_scaling_factor or a slightly larger inflation radius.
  • If doorways become unusable, inflation is probably too broad for the actual footprint and environment.
  • When comparing planners or controllers, freeze inflation tuning first. Otherwise you are changing the optimization landscape while blaming the downstream algorithm.

What the Gradient Is Doing

The inflation layer converts a hard obstacle boundary into a cost field. Planners use that field to prefer safer paths, and some controllers also use it directly in their local scoring. That is why inflation tuning changes both route choice and tracking behavior.

Corroborating References

When to Read the Original Source

Read the source skill when you want the exact inflation cost formula, a sharper explanation of how cost_scaling_factor changes path-wall distance, or a compact set of indoor tuning heuristics.