# [nav2_costmap_2d] Rolling window size does not match costmap size. width: 10, height: 10, rolling_window_width: 20, rolling_window_height: 20

- **ID:** `ros2/nav2-costmap-rolling-window-size-mismatch`
- **Domain:** ros2
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The rolling_window parameter in the Nav2 costmap configuration specifies a window size larger than the costmap's width/height, causing the costmap to fail to initialize or update correctly.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| ROS2 Humble | active | — | — |
| Nav2 1.1.x | active | — | — |
| Nav2 1.2.x | active | — | — |

## Workarounds

1. **Set rolling_window_width and rolling_window_height to match costmap width and height in your YAML config file, e.g., width: 10, height: 10, rolling_window_width: 10, rolling_window_height: 10** (95% success)
   ```
   Set rolling_window_width and rolling_window_height to match costmap width and height in your YAML config file, e.g., width: 10, height: 10, rolling_window_width: 10, rolling_window_height: 10
   ```
2. **Disable rolling window by removing rolling_window parameters from the YAML config** (80% success)
   ```
   Disable rolling window by removing rolling_window parameters from the YAML config
   ```

## Dead Ends

- **** — The rolling_window must be equal to or smaller than the costmap dimensions; arbitrary changes may cause other issues like memory blowup. (70% fail)
- **** — Setting rolling_window to zero may disable the rolling window feature but can cause unexpected behavior or crashes in Nav2. (85% fail)
- **** — The costmap may not update obstacles correctly, leading to navigation failures or phantom obstacles. (90% fail)
