# 硬體整合

1. 啟動機器人的馬達和感測器的驅動程式。

2. 請執行 `rosnode list` ，找出驅動程式ROS節點的名稱。

3. 請執行`rosnode info` ，其中\<node name>是根據第二步驟所呈現的節點名稱。以下為輸出範例：&#x20;

   ###

   ```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. 從第三步驟提供的資訊中，請確保以下：
   * 機器人的馬達驅動程式節點，訂閱`/cmd_vel`主題，以獲取速度指令。
   * 光達驅動程式節點，訂閱雷射數據到`/scan`主題。<br>

5. 若主題名稱沒有按照第四步驟去設定，需在驅動程式的啟動檔案(launch files)中重新設定，請增加以下格式的指令在啟動檔案(launch files)中：

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

6. 當機器人底座和光達被啟動，請執行：`rosrun rqt_tf_tree rqt_tf_tree` ，以及請檢查此frame是否按照以下順序連結：odom → base\_link → laser。<br>

7. 若機器人底座(base\_link)和光達(laser)的座標(frame)連結錯誤，在光達驅動程式的執行檔案中，請加上以下指&#x4EE4;**：**

   ```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. 在驅動程式的節點運行中，若要執行RVIZ，請使用`rosrun rviz rviz`，並確保以下：
   1. 雷射數據 `("/scan")`有呈現出來，且方向是正確的。
   2. 在遠端遙控時，請確保運動方向是正確無誤。
   3. 請確保機器人里程計`("/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/fan-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.
