You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu20.04下TurtleBot3仿真启动异常求助

TurtleBot3仿真Launch启动故障排查方案(Ubuntu 20.04)

问题概述

Ubuntu 20.04环境下,完成TurtleBot3官方仿真配置后,启动仿真launch文件时出现错误,已确认~/.bashrc路径配置无误。

排查步骤

  • 确保环境变量实时生效
    执行source ~/.bashrc后重启终端,再运行launch命令,避免环境变量未加载导致的路径识别问题。
  • 校验Gazebo模型路径
    执行echo $GAZEBO_MODEL_PATH,确认输出包含TurtleBot3模型目录(示例路径:~/catkin_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models)。若路径缺失,手动添加至~/.bashrc:
    export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/catkin_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models
    
    添加后执行source ~/.bashrc生效。
  • 重新编译ROS工作空间
    进入catkin_ws根目录,执行catkin_make(或catkin build),检查编译日志是否存在错误,确保turtlebot3_gazebo包编译完成。编译后执行source devel/setup.bash。
  • 确认TurtleBot3模型参数
    执行echo $TURTLEBOT3_MODEL,需返回burger、waffle或waffle_pi其中之一。若未设置,添加至~/.bashrc:
    export TURTLEBOT3_MODEL=burger
    
    执行source ~/.bashrc使参数生效。
  • 排查Gazebo本体运行状态
    单独执行gazebo命令,若Gazebo无法正常启动,修复Gazebo安装:
    sudo apt-get install --reinstall gazebo11 ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-ros-control
    
  • 验证ROS包识别状态
    执行rospack find turtlebot3_gazebo,若返回正确路径则正常;若报错,检查ROS_PACKAGE_PATH是否包含catkin_ws/devel/lib/python3/dist-packages,可通过echo $ROS_PACKAGE_PATH确认。

内容的提问来源于stack exchange,提问作者Nabajyoti Deori

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 09:31:42