> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# QRB ROS Simulation

[`qrb_ros_simulation`](https://github.com/qualcomm-qrb-ros/qrb_ros_simulation) 是一个基于 Gazebo 的仿真环境，面向 [`qrb_ros_samples`](./qrb-ros-samples) 目录所针对的 AMR 和机械臂。它的目的很简单：**让您无需购买硬件即可评估 QRB ROS 代码路径**。

<Note>
  坦率地说——这是**建立在 Gazebo 之上的便利层**，而不是独特的仿真引擎。其价值在于为 QRB AMR 和机械臂预构建的 URDF、网格模型、控制器和 launch 文件，因此在真实机器人上运行的 Nav2 / MoveIt2 / 控制代码同样可以在仿真中运行。
</Note>

## 它包含什么

两个协同工作的 ROS 2 软件包：

| 软件包                                                                                 | 角色                                                      |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------- |
| [`qrb_ros_sim_description`](https://github.com/qualcomm-qrb-ros/qrb_ros_simulation) | QRB AMR、机械臂和传感器的 URDF、网格模型和描述资源。                        |
| [`qrb_ros_sim_gazebo`](https://github.com/qualcomm-qrb-ros/qrb_ros_simulation)      | Gazebo 集成 + launch 文件。接入控制器并通过 `ros-gz` 技术栈暴露标准 ROS 话题。 |

仿真发布的标准话题包括 `/clock`、`/tf`、`/tf_static`、`/robot_description`、`/joint_states` 和 `/camera/color/camera_info`——因此任何消费 `sensor_msgs` 或遵循标准 ROS 2 约定的节点看到的都是一个逼真的机器人。

## 使用场景

* **购前评估** — 在承诺购买硬件之前，验证您的技术栈能否针对 QRB AMR 或机械臂端到端运行。
* **CI / 回归测试** — 在每次提交时在无头 Gazebo 中运行导航和操作技术栈。
* **算法原型开发** — 无需拥有机器人即可迭代 Nav2、MoveIt2 或控制逻辑。

## 快速开始

<Steps>
  <Step title="安装 Gazebo 和 ROS 2 Jazzy">
    按照标准的 [Gazebo Harmonic 安装](https://gazebosim.org/docs/harmonic/install)和[安装 ROS Jazzy](https://docs.ros.org/en/jazzy/index.html) 说明在您的平台上进行安装。无需 Qualcomm 硬件。
  </Step>

  <Step title="从源码构建">
    ```bash theme={null}
    mkdir -p qrb_sim_ws/src && cd qrb_sim_ws/src
    git clone https://github.com/qualcomm-qrb-ros/qrb_ros_simulation.git
    cd ..
    rosdep install --from-paths src --ignore-src -r -y
    colcon build --symlink-install
    source install/setup.bash
    ```
  </Step>

  <Step title="启动仿真世界">
    当前的启动命令请参见[上游 Usage 章节](https://github.com/qualcomm-qrb-ros/qrb_ros_simulation#-usage)。[`qrb_ros_samples`](./qrb-ros-samples) 中的仿真示例（例如 `simulation_sample_amr_simple_motion`、`simulation_sample_pick_and_place`）就是为在此环境中运行而设计的。
  </Step>
</Steps>

## 为什么它有帮助

| 替代方案                                     | 简评                                                |
| ---------------------------------------- | ------------------------------------------------- |
| 标准 Gazebo + 您自己的 URDF                    | 最大灵活性；AMR / 机械臂 / 传感器模型由您自己编写。需要实打实的搭建工作。         |
| NVIDIA Isaac Sim                         | 提供照片级真实感 + 强化学习管线，但需要 RTX 级 GPU，且生态锁定于 Isaac ROS。 |
| PyBullet / MuJoCo / Webots / CoppeliaSim | 不同的仿真生态系统；开箱即用时并非 ROS 计算图原生。                      |

它是一个便利层，而不是新的仿真引擎——但它是运行 QRB ROS 示例、并在无需硬件参与的情况下演练面向真实 Qualcomm 驱动机器人的相同代码路径的最快方式。

## 相关内容

* [`qrb-ros-samples.mdx`](./qrb-ros-samples) — 其 `simulation_*` 条目在此环境中运行的示例管线。
* 上游：[`qualcomm-qrb-ros/qrb_ros_simulation`](https://github.com/qualcomm-qrb-ros/qrb_ros_simulation)。
