# [costmap_2d] 插件列表中指定了未知的层类型：'inflation_layer'

- **ID:** `ros2/nav2-costmap-inflator-unknown-layer`
- **领域:** ros2
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

代价地图配置文件YAML中将'inflation_layer'列为插件，但插件名称拼写错误或插件未在代价地图的插件列表中注册。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Nav2 (Humble, Iron, Rolling) | active | — | — |
| costmap_2d plugin version 2.0.0+ | active | — | — |

## 解决方案

1. ```
   在YAML文件中更正层名称：将'inflation_layer'改为'inflation_layer'（注意：正确名称是'inflation_layer'，不是'inflation'）。同时确保插件列表包括：plugins: ['obstacle_layer', 'inflation_layer', 'static_layer']
   ```
2. ```
   如果使用自定义层，请使用pluginlib注册它，并在YAML的插件列表中添加它。
   ```

## 无效尝试

- **Reinstall nav2_costmap_2d package** — The plugin is included by default; the issue is a configuration typo, not a missing package. (70% 失败率)
- **Add the layer to the plugins list with a different name** — The plugin name must exactly match the registered class name 'inflation_layer'. (90% 失败率)
