# [错误] [turtlebot3_gazebo]: 未生成机器人。请检查 TURTLEBOT3_MODEL 环境变量。

- **ID:** `ros2/turtlebot3-gazebo-no-robot-spawned`
- **领域:** ros2
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

在启动 Gazebo 仿真之前，TURTLEBOT3_MODEL 环境变量未设置或设置为无效的模型名称（例如 'burger'、'waffle'、'waffle_pi'）。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| ROS2 Humble (Ubuntu 22.04) | active | — | — |
| ROS2 Iron (Ubuntu 22.04) | active | — | — |
| turtlebot3 2.2.x | active | — | — |
| Gazebo 11.x | active | — | — |

## 解决方案

1. ```
   export TURTLEBOT3_MODEL=burger
   ```
2. ```
   将导出命令添加到 .bashrc：echo 'export TURTLEBOT3_MODEL=burger' >> ~/.bashrc && source ~/.bashrc
   ```

## 无效尝试

- **** — The launch file reads TURTLEBOT3_MODEL at startup; without it, no robot URDF is loaded. (95% 失败率)
- **** — Only 'burger', 'waffle', 'waffle_pi' are valid; typos or unsupported models cause spawn failure. (90% 失败率)
- **** — The environment variable must be set in the same shell session before launch, not sourced from a different workspace. (80% 失败率)
