ros2 config_error ai_generated true

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

[ERROR] [turtlebot3_gazebo]: No robot spawned. Check TURTLEBOT3_MODEL environment variable.

ID: ros2/turtlebot3-gazebo-no-robot-spawned

其他格式: JSON · Markdown 中文 · English
85%修复率
88%置信度
1证据数
2023-06-15首次发现

版本兼容性

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

根因分析

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

English

The TURTLEBOT3_MODEL environment variable is not set or set to an invalid model name (e.g., 'burger', 'waffle', 'waffle_pi') before launching Gazebo simulation.

generic

官方文档

https://emanual.robotis.com/docs/en/platform/turtlebot3/quick-start/

解决方案

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

无效尝试

常见但无效的做法:

  1. 95% 失败

    The launch file reads TURTLEBOT3_MODEL at startup; without it, no robot URDF is loaded.

  2. 90% 失败

    Only 'burger', 'waffle', 'waffle_pi' are valid; typos or unsupported models cause spawn failure.

  3. 80% 失败

    The environment variable must be set in the same shell session before launch, not sourced from a different workspace.