﻿# Nav2 stamped footprints: inspect whether the subscriber uses the header

Trace the Nav2 footprint subscriber and oriented-footprint path before publishing payload geometry in a global frame through a stamped message.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/robotics-nav2-stamped-footprint-header-not-transformed/
Language: en

## The payload outline needs a coordinate contract

A delivery robot picks up a wide tray. A perception component estimates its outline in the global map and publishes PolygonStamped to the costmap footprint topic. The message has a plausible frame identifier, so the integrator assumes the subscriber will transform it. That assumption must be checked at the receiving callback. A stamped message can carry metadata that a particular consumer does not use; correct upstream geometry alone cannot repair a mismatched receiver contract.

## Read the subscriber before trusting the stamp

In the inspected main-branch [Costmap2DROS source](https://raw.githubusercontent.com/ros-navigation/navigation2/main/nav2_costmap_2d/src/costmap_2d_ros.cpp), the stamped-footprint subscription calls setRobotFootprintPolygon with footprint->polygon. The unstamped subscription supplies its polygon to the same path. This callback does not use the stamped header to request a frame transformation. Publishing global coordinates therefore does not automatically convert them into the local body outline expected by the later orientation logic. This finding is specific to the code examined, rather than a claim about every released version.

## Separate stored geometry from oriented geometry

The setter stores unpadded coordinates, applies configured padding to a separate representation and passes the padded outline into the layered costmap. Later, getOrientedFootprint obtains robot pose and transforms the stored outline using that pose. Supplying an already global outline can consequently apply position and orientation again. The [layered-costmap implementation](https://raw.githubusercontent.com/ros-navigation/navigation2/main/nav2_costmap_2d/src/layered_costmap.cpp) also derives footprint radii and notifies layers and filters when geometry changes; this is more than replacing a display marker.

## Use a translated synthetic robot pose

A proposed nonactuating fixture should place the robot away from the map origin with an asymmetric local outline. Predict the map-oriented vertices from that local outline and pose. Submit the intended local polygon, then a deliberately global polygon with the same stamped interface. Compare stored and oriented coordinates rather than only their visual shape. An origin-centered symmetric robot is a poor diagnostic because it can hide a repeated transformation or an incorrect reference frame.

## Verify the loaded footprint at each consumer

Retain the receiving costmap instance, actual subscription mode, local polygon revision, padding and observed oriented output. Global and local costmaps can be separate consumers; updating one topic does not demonstrate that both accepted the loaded geometry. Check the selected planner and controller’s footprint use independently. Acceptance should identify the contour actually available to each relevant consumer, including transition back to the unloaded outline, rather than merely confirming that a publisher sent a new polygon.

## Keep shape correctness separate from physical clearance

An interface-correct footprint still approximates load motion, deformation and contacts. The [Habitat clearance guide](/journal/fg2-habitat-navmesh-agent-radius-geodesic-reachability/) explains how geometry changes reachability; [Overture geometry lineage](/journal/fg2-overture-building-id-geometry-release-lineage/) illustrates why identity alone does not fix a shape revision. For this runtime interface, the decisive evidence is coordinate interpretation and the active contour, not the presence of a frame label. Hardware clearance requires its own appropriately controlled validation.
