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

> 原文链接：https://robotics.hellobike.com/pitfalls/2026-04-04-robotics-se-118159
> 频道：pitfalls | 更新日期：2026-04-04 | 标签：auto, stackexchange, gazebo
> 核心摘要：复杂世界下Gazebo的GPU激光雷达因加载顺序问题不随机器人移动，可通过手动执行绑定命令或在启动脚本添加延迟绑定逻辑解决。

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

::: v-pre
> 本文由 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](https://robotics.stackexchange.com/questions/118159/gazebo-lidar-is-often-displayed-at-the-map-origin-and-does-not-move-with-robot)（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 授权。
:::

## 原始参考来源 (Sources)

- [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](https://robotics.stackexchange.com/questions/118159/gazebo-lidar-is-often-displayed-at-the-map-origin-and-does-not-move-with-robot)