Robot Costmap Interview: Inflation and Footprint Decisions in a Narrow Corridor
Quick Overview
Practice robot costmap interviews with a checked corridor fixture, oriented footprints and inflation curves that separate collision from route preference. Primary references, original worked assets and explicit evidence boundaries support focused interview practice.
A robot costmap interview should separate collision geometry from route preference. The footprint determines whether the robot fits at a pose; inflation assigns additional cost near obstacles. Reducing inflation can make a path cheaper without making an impossible turn physically possible. Start with the map scale, robot shape and orientation before changing a parameter.
Official Nav2 references below use the Jazzy documentation. The 75-centimeter corridor is an original continuous-geometry exercise aligned to a synthetic five-centimeter grid. Python checked the dimensions and cost calculations; no Nav2 planner, controller or physical robot was executed. PracHub's wheeled-robot path-planning question provides a useful starting prompt for explaining the difference between finding a centerline and validating a complete robot trajectory.

Ask what the map values and robot shape mean
A costmap combines sensor or map observations with configuration. Before interpreting its colors, establish resolution, frame, update age, obstacle sources and unknown-space policy. Ask whether the footprint is a polygon or whether the robot is approximated by a radius. Also ask which planner and controller consume the costmap and how they perform collision checks.
Official fact: Nav2's Costmap 2D reference documents footprint, padding, resolution, robot radius and layer configuration. These settings describe different parts of the representation. A pixel that looks clear in a screenshot is not a physical clearance measurement until the scale and geometry are known.
The original robot body is 0.80 meters long and 0.50 meters wide. Add 0.025 meters of padding on every side. The effective rectangle is therefore 0.85 by 0.55 meters. The straight corridor has 0.75 meters between the inner wall faces.
State whether padding represents a chosen safety margin, model uncertainty or a convenience in the collision representation. This example supplies a margin; it does not derive a certified safe distance. A real deployment needs uncertainty, sensing, control and safety evidence beyond this geometry calculation.
Check the straight pose before discussing inflation
With the long axis aligned down the corridor, the padded cross-corridor width is 0.55 meters. The remaining width is 0.20 meters, or 0.10 meters on each side for a perfectly centered pose. That pose fits the ideal geometry.
Now rotate the same robot by angle theta. Its cross-corridor extent is:
extent(theta) = padded_length * abs(sin(theta))
+ padded_width * abs(cos(theta))
The formula is the projection of a rectangle onto the corridor's transverse axis. It does not depend on the cost color chosen for nearby cells.
| Orientation | Cross-corridor extent | Clearance per side if centered | Ideal fit |
|---|---|---|---|
| 0° | 0.5500 m | +0.1000 m | Yes |
| 45° | 0.9899 m | −0.1200 m | No |
| 90° | 0.8500 m | −0.0500 m | No |
The local fixture checks all three outcomes. A straight traversal can be geometrically feasible while an in-place turn is impossible. If the requested route includes a 90-degree orientation change inside this corridor, a center-point path alone misses the failure.
Negative clearance means the projected shape overlaps the walls under the centered idealization. Shifting sideways cannot solve a rectangle that is wider than the corridor. You need a different maneuver, a wider space or a different physical shape, rather than a cheaper cost value.
Explain the limits of circular approximations
The padded rectangle's inscribed radius is 0.275 meters. A circle of that radius fits at the centerline, including when the rectangle is rotated to 45 degrees. That circle is contained within the robot shape; its feasibility is not proof that the full rectangle is collision-free.
The circumscribed radius is approximately 0.5062 meters. Its diameter exceeds the corridor width, so using that circle everywhere would reject even the straight pose that the actual rectangle can fit. One circle can be optimistic for some checks; another can be overly conservative.
Name both the collision representation and the consumer’s checking method. Ask whether a full oriented footprint is checked for sampled poses, whether a planner searches orientation, and whether the controller validates the executed motion. Do not assume every component uses the polygon merely because a polygon appears in one configuration file.
If the robot carries a pallet or extends an arm, the effective footprint may change. A map prepared for the empty base can become inappropriate for the loaded robot. Explain how the shape update reaches the components that validate paths and motion, and what happens during the update boundary.
Calculate a soft inflation cost without calling it clearance
Official fact: Nav2's inflation layer reference describes an exponential cost decay around obstacles, an inflation radius and a scaling factor. It also describes special handling near the inscribed region. That is separate from validating every corner of a noncircular footprint.
For a teaching approximation outside the inscribed radius, use 252 * exp(-k * (d - r_inscribed)), truncated outside an inflation radius of 0.60 meters. This exposes how the scaling factor changes a soft preference. Actual cell values involve grid distances, integer encoding and the implementation's boundary behavior.
At the centered pose, the nearest inner wall face is 0.375 meters away. Subtract the inscribed radius 0.275 to get 0.10 meters. With k = 3, the approximate cost is 186.69. With k = 10, it is 92.71. Changing the decay factor leaves the footprint and corridor unchanged.

Both walls influence the corridor, but these numbers use distance to the nearest obstacle; they are not the sum of two independent wall costs. State that convention when discussing the plot. Otherwise you can double the modeled cost while believing you are reproducing the same calculation.
If the inflation radius is reduced to 0.30 meters, the centerline lies outside it and this simplified centerline cost becomes zero. The 45-degree rectangle still overlaps the walls. This is the counterexample to “the route became green, so the robot now fits.”
Read a five-centimeter grid as an approximation
The original grid has five-centimeter cells. Imagine wall cells centered at y = ±0.40 meters; their inner faces lie at ±0.375 meters. That produces the specified 0.75-meter corridor. Treat the intervening cells as free for this exercise, while keeping the walls occupied.
A map that instead measures between wall-cell centers would report 0.80 meters and answer a different geometry question. Ask how a width was measured, especially near a tight passage. Cell centers, cell areas, sensor returns and the actual wall surface are related but distinct.
Finer resolution can represent boundaries more precisely, but it costs computation and does not remove localization error or sensor uncertainty. A footprint collision checker can also sample too sparsely along a trajectory. Endpoints may be valid while the motion between them collides.
For the straight ideal path, you can verify a sequence of centered poses with constant orientation. For a turn, inspect intermediate orientations, not only the start and end. The 45-degree row already demonstrates an invalid intermediate shape. A feasible grid route is therefore not automatically a feasible executed trajectory.
Unknown cells require an explicit policy. In this fixture they do not appear. In a real corridor, treating unknown space as traversable may produce a route that depends on unobserved clearance. State the policy and evidence rather than silently equating unknown with free.
Diagnose a rejected or unsafe route in the right order
If planning fails, first reproduce the start, goal and required orientations against the correct map and footprint. Confirm frame transforms and update age. A stale obstacle or incorrect transform can look like a tuning problem while the planner is using a different world from the one you are inspecting.
Next distinguish geometry rejection from cost preference. If the full footprint collides, changing a soft decay factor cannot repair the shape. If a feasible route exists but is unattractively close to obstacles or the planner chooses a detour, inspect how the consuming algorithm trades path length, cost and motion constraints.
Nav2's tuning guide provides official system-level context for these interactions. Use it to connect planner, controller and costmap choices; do not treat one inflation value as an isolated cure.
If a planned path exists but execution oscillates or stalls, collect the local costmap, controller command history, pose estimates and footprint checks along the attempted motion. A plan's existence says little about actuator limits, tracking error or latency. Conversely, a controller refusing motion can be evidence that it is correctly rejecting an unsafe local trajectory.
For the narrow corridor, a good next experiment changes one assumption at a time: remove the requested turn, move the turn into a wider area, or compare the actual footprint with the configured approximation. Keep the physical robot out of an unsafe trial while you establish the geometry in simulation or recorded data.
Explain a defensible configuration decision
Suppose the task is straight transit only and the model is accurate enough for a controlled simulation. The 0-degree rectangle has positive clearance, so investigate whether a planner/controller combination can preserve that orientation and validate the full shape. This is a candidate design decision, not a deployment recommendation established by the fixture.
Suppose instead the robot must rotate inside the corridor. The projected-width calculation rejects that maneuver. Offer a changed route with a wider turning area or revise the requirement. Lowering a cost parameter until the planner returns something would remove the symptom without satisfying the physical constraint.
Finally, say what you have not established: localization uncertainty, dynamic obstacles, braking distance, tracking performance and safety margins under real operating conditions. These are concrete extensions of the model, not reasons to abandon a useful finite exercise. The interview answer should connect each missing assumption with the evidence needed to evaluate it.
Keep the planner's objective separate from the safety argument
Suppose two collision-free centerline routes exist, one shorter and closer to a wall and one longer with more clearance. Inflation can help express a preference between them, depending on the planner's objective. The preferred route still needs valid footprint checks and a controller that can follow it within the modeled constraints. A larger cost difference is not an independent safety proof.
Now suppose no collision-free orientation sequence exists for the requested turn. Changing the objective cannot create a missing feasible sequence. This distinction between feasibility and optimization is the shortest way to explain why blindly tuning inflation sometimes appears productive while the physical problem remains unsolved.
For a reviewable experiment, retain the same map, shape, start, goal and orientation requirements while varying one cost parameter. Record whether the feasible set changed or only the chosen route changed. If other settings changed simultaneously, the result cannot isolate the cause. In a real system, replay the same observations where possible and report timing as well as route geometry; a visually attractive plan that arrives too late may be unusable.
Practice the geometry-to-planning explanation
These verified PracHub records cover robot path planning, human avoidance, constrained motion and grid reasoning. Grid problems often model a point or simpler movement rules; they do not automatically include an oriented physical footprint. Use that transfer gap as part of your answer rather than hiding it.
| PracHub question | Topic-specific rehearsal |
|---|---|
| Path-Planning Algorithm for a Wheeled Robot Crossing a Room Around Fixed Obstacles | Check the full footprint and intermediate orientations, not only a center-point route. |
| Design Human Avoidance for Warehouse Robots | Connect geometric feasibility with uncertainty and human-avoidance requirements. |
| Grid Reachability for a Robot That Cannot Reverse and Has Restricted Turns | Expose the difference between grid move rules and physical robot turning constraints. |
| Assign Robots to Nearest Pickup Items on a Grid with Obstacles | Use obstacle-grid reasoning while stating the point-robot transfer limit. |
| Design a Robot Operations CLI | Check which geometric information a nearest-blocker summary omits. |
Open the wheeled-robot planning question, draw the 0.85-by-0.55-meter padded footprint inside the 0.75-meter corridor, and test the 45-degree pose. Then explain which parameter can change preference and which requirement must change to make the turn feasible.
Comments (0)