# 硬件集成

1. 启动机器人的电机和传感器驱动程序<br>

2. 运行 rosnode list 以查找驱动程序的 ROS 节点的名称<br>

3. 运行 rosnode info ，其中是步骤 2 中确定的节点名称。示例输出：

   ```yaml
   $ rosnode info /motors_ctrl 
   --------------------------------------------------------------------------------
   Node [/motors_ctrl]
   Publications: 
    * /odom [nav_msgs/Odometry]
    * /odom_euler [std_msgs/String]
    * /robot_batt_perc [std_msgs/Int16]
    * /rosout [rosgraph_msgs/Log]
    * /tf [tf2_msgs/TFMessage]

   Subscriptions: 
    * /cmd_vel [geometry_msgs/Twist]
   ```

4. 根据运行步骤 3 显示的信息，确保： 机器人电机驱动器节点订阅主题 `/cmd_vel` 以获取速度命令。 激光雷达驱动节点发布激光数据到主题 `/scan`<br>

5. 如果主题名称未按照步骤 4 中的设置，请通过在启动文件中按以下格式添加一行来将它们重新映射到驱动程序的启动文件中：

   ```
   <node ...
     <remap from="<original topic name>" to="/cmd_vel"/>
   </node>
   ```

6. 在机器人底座和激光雷达启动的同时，运行 `rosrun rqt_tf_tree rqt_tf_tree` 并检查帧是否按以下顺序链接：odom → base\_link → laser.<br>

7. 如果base\_link和laser的帧没有正确链接，请在激光雷达驱动的启动文件中添加以下行：

   ```yaml
   <node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" args="0.22 0 0.1397 0 0 0 base_link laser 100" />
   ```

8. 在驱动程序节点运行的情况下，使用 rosrun rviz rviz 运行 RVIZ，执行以下检查：&#x20;
   1. 激光数据 `("/scan")`可以被看到并且朝向正确的方向。
   2. 远程操作时的运动方向正确。 机器人里程 `("/odom")` 在远程操作期间正确更新。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.movel.ai/new-collection/jian-ti-zhong-wen/seirios-rns/installation-and-integration-1/hardware-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
