8
14

More than 3 years have passed since last update.

Ubuntu18.04にROSをインストールしてみた

Last updated at Posted at 2020-03-10

前置き

今回は、前回ubuntu18.04をinstallしたので更にROSをinstallしてみる。
対象環境は以下の通りで、基本的には参照サイトの通りinstallを行っていく。

対象者

ROSをinstallしたい人
roswikiを見たが、英語で何書いてあるのかよくわからない人

対象環境

ubuntu18.04
ROS Melodic
(ROSはubuntuのバージョンごとにinstallするバージョンが異なるので注意が必要)

installを行う

まずはPCにROSをinstallする許可を取る

ros_install_1
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

次にkeyの設定をする

ros_install_2
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

パッケージのアップデートをする

ros_install_3
sudo apt update

ROS推奨のintallを行うので、以下のコマンドを入力する(ROS,rqt,rviz,robot-generic libraries, 2D/3D simulators and 2D/3Dperception)

ros_install_4
sudo apt install ros-melodic-desktop-full

rosdepを初期化する。
rosdepとは、ROSを動かすために必要なシステムを簡単にinstallするためのもの

ros_install_5
sudo apt install python-rosdep
sudo rosdep init
rosdep update

環境構築をする

ros_install_6
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc

ROSパッケージを構築するためのツールをインストールする

ros_install_7
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential

以上でとりあえずROSのinstallを終わります。
ここからはROSを用いていろんなことをしていこうと思います。

参照サイト

8
14
1

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
8
14