# 15.1.2.5. 安裝 ROS 2 Dashing Diademata

{% hint style="danger" %}
**警告**：請勿在 **remote PC** 上執行此節指令。 請在 **TurtleBot3 的 SBC** 上進行此節的操作。
{% endhint %}

**\[TB3 SBC 端]**

由於 TurtleBot3 需在機器人作業系統（ROS）上運行，因此需要在已安裝好 Ubuntu 的 TurtleBot3 SBC（Raspberry Pi 3）上，安裝 ROS 2 Dashing Diademata。 以下連接將指導你安裝 ROS 2。

* [ROS 2 Installation Guide](https://index.ros.org/doc/ros2/Installation/Dashing/Linux-Install-Debians/)

1\. 更新和升級軟體

```
$ sudo apt update && sudo apt upgrade
```

2\. 設置 locale 區域設定

```
$ sudo locale-gen en_US en_US.UTF-8
$ sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
$ export LANG=en_US.UTF-8
```

3\. 設置 sources

```
$ sudo apt update && sudo apt install curl gnupg2 lsb-release
$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
$ sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
```

4\. 安裝 ROS2 套件

```
$ sudo apt update
$ sudo apt install ros-dashing-ros-base
```
