> For the complete documentation index, see [llms.txt](https://idminer.gitbook.io/robotis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://idminer.gitbook.io/robotis/part-1-turtlebot3/13.-autonomous-driving-zi-dong-jia-shi/13.2.-tb3-autorace-tiao-zhan-sai-jiao-cheng/13.2.4.-jiao-cheng-4-xiao-zhun/13.2.4.3.-jiao-cheng-4.3-nie-ying-ji-wai-bu-can-shu-xiao-zhun.md).

# 13.2.4.3. 教程 4.3：攝影機外部參數校準

1\. **\[Remote PC 端]** 開新的 terminal 視窗，輸入

```
$ roscore
```

2\. **\[TB3 SBC 端]** 開新的 terminal 視窗，輸入

```
$ roslaunch turtlebot3_autorace_camera turtlebot3_autorace_camera_pi.launch
```

3\. **\[TB3 SBC 端]** 開新的 terminal 視窗，輸入

```
 $ export AUTO_IN_CALIB=action
 $ roslaunch turtlebot3_autorace_camera turtlebot3_autorace_intrinsic_camera_calibration.launch
```

4\. **\[Remote PC 端]** 開新的 terminal 視窗，輸入

```
 $ export AUTO_EX_CALIB=calibration
 $ roslaunch turtlebot3_autorace_camera turtlebot3_autorace_extrinsic_camera_calibration.launch
```

5\. **\[Remote PC 端]** 開新的 terminal 視窗，輸入

```
$ rqt
```

點擊在視窗上方的 plugins -> visualization -> Image view，會新產生另一個攝影機視角圖的視窗。用相同方式在 rqt 平板產生額外 2 個新視窗。然後在這兩個新視窗，分別選擇 /camera/image\_extrinsic\_calib/compressed 及 /camera/image\_projected\_compensated 的 topics。如果一切正常，屏幕上的一個將顯示紅色矩形影像，另一個將顯示基於彼此的地面投影視圖(鳥瞰視圖)。

6\. **\[Remote PC 端]** 開新的 terminal 視窗，輸入

```
$ rosrun rqt_reconfigure rqt_reconfigure
```

然後調整 /camera/image\_projection 和 /camera/image\_compensation\_projection中，可對影像進行視覺修改的參數值。參數 image\_projection 會改變 /camera/image\_extrinsic\_calib/compressed 影像的紅色矩形的形狀。內部攝影機校準將轉換被紅色矩形所包圍的影像，並顯示從車道上方所看到的影像。之後，將每個值覆寫到 turtlebot3\_autorace\_camera/calibration/extrinsic\_calibration/ 中的 yaml檔。這會使攝影機在下次啟動時，使用你所設置的參數。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://idminer.gitbook.io/robotis/part-1-turtlebot3/13.-autonomous-driving-zi-dong-jia-shi/13.2.-tb3-autorace-tiao-zhan-sai-jiao-cheng/13.2.4.-jiao-cheng-4-xiao-zhun/13.2.4.3.-jiao-cheng-4.3-nie-ying-ji-wai-bu-can-shu-xiao-zhun.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.
