Skip to content

踩坑Robotics Stack Exchange6 个月前

Gazebo中激光雷达常显示在地图原点不随机器人移动,如何解决? ​

本文由 AI 根据公开内容整理,可能有误,请以原文为准:Gazebo lidar is often displayed at the map origin and does not move with robot, but lidar returns are correct? The issue is inconsistent(Robotics Stack Exchange #118159)

状态:有绕过办法

问题 ​

在VSCode启动或系统高负载时启动Gazebo仿真,激光雷达射线显示从地图原点发出但障碍物返回正常,RViz中雷达返回正常,但Nav2会误报碰撞,关闭VSCode后终端启动问题仍存在,需重启电脑恢复。

环境 ​

Ubuntu 24系统笔记本,i5处理器、12GB RAM,运行ROS2 Kilted、Gazebo Ionic,使用自定义复杂世界文件。

解决办法 ​

  1. 启动仿真后,手动执行命令 gz model -m garbo -l lidar_link 绑定雷达与机器人链接。
  2. 可在ROS2 Python启动脚本中添加延迟3秒的上述命令,启动时自动执行绑定。
  3. 也可拆分启动顺序:先启动世界,等待一段时间后再 spawn 机器人。

原问题作者:loudboy;采纳答案作者:tcluk624。原内容依 CC BY-SA 4.0 授权,本页摘要同样依 CC BY-SA 4.0 授权。

来源

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

  1. Robotics Stack Exchange #118159:Gazebo lidar is often displayed at the map origin and does not move with robot, but lidar returns are correct? The issue is inconsistent访问 2026-10-21