LoginSignup
2
0

More than 3 years have passed since last update.

Raspberry Pi 4にROS2をインストールしてみる

Posted at

前準備

Raspberry Pi 4にubuntu 18.04 LTSをインストールしておく。
(ROS2では、18.04を正式サポートしているため)
https://qiita.com/Toshiaki0315/items/6b50e577a01051525f9d

ROS2のインストール

公式ページのInstalling ROS 2 via Debian Packagesを参考にして進めていく。

Setup 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

Setup 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'

Raspberry Pi 4は、64bitアーキテクチャなので、公式ページのdebコマンドのところに[arch=amd64,arm64] を追加して、コマンドを実行。

Install ROS 2 packages

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

## Environment setup
### Sourcing the setup script

$ source /opt/ros/dashing/setup.bash
```

Install argcomplete (optional)

$ sudo apt install python3-argcomplete

これでROS2のインストールは完了です。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0