Skip to content

踩坑GitHub hello-robot/stretch_ros27 个月前

Docker构建Stretch MuJoCo仿真失败缺失SE3 xacro及URDF导出报错 ​

本文由 AI 根据公开内容整理,可能有误,请以原文为准:stretch_mujoco_driver.launch.py fails when running Mujoco simulation inside Docker (missing SE3 xacros)(GitHub hello-robot/stretch_ros2 #222)

状态:有绕过办法

问题 ​

在Docker中执行stretch_mujoco_driver.launch.py启动MuJoCo仿真时,报xacro.XacroException找不到stretch_description_SE3_eoa_wrist_dw3_tool_sg3.xacro文件。

环境 ​

hello-robot-stretch-robots, stretch_ros2 (humble分支), Docker容器, MuJoCo仿真环境, ROS2 Humble

解决办法 ​

  1. 进入stretch_ros2/stretch_simulation目录编辑Dockerfile,定位第127行附近的URDF导出命令,删除行尾的|| true以暴露构建错误。
  2. 确保构建上下文中存在stretch_uncalibrated.urdf文件,若缺失需检查git子模块或前置依赖是否完整拉取。
  3. 执行git pull获取最新修复代码后,重新构建镜像:docker build -t stretch-simulation:latest .。
  4. 验证新镜像中/root/ament_ws/install/stretch_description/share/stretch_description/urdf/路径下包含stretch_description_SE3_eoa_wrist_dw3_tool_sg3.xacro文件。
  5. 避免使用可能挂起的docker compose up,优先使用docker run配合`use_muj…

讨论原作者:@hello-jkoubi 等,版权归原作者所有。

来源

本页事实对应的公开页面,以原文为准。

  1. GitHub hello-robot/stretch_ros2 #222:`stretch_mujoco_driver.launch.py` fails when running Mujoco simulation inside Docker (missing SE3 xacros)访问 2026-10-26