6
6

More than 3 years have passed since last update.

【ROS】Ubuntu(18.04)にROS(melodic)をインストール

Last updated at Posted at 2020-08-03

1. ROSのインストールコマンド

 Ubuntu(18.04)にROS(melodic)を入れるためのコマンド. 本当はkineticを入れたかったけどUbuntuのバージョンが18.04だとkineticは入れられないらしい.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

sudo apt-get -y update
sudo apt-get -y upgrade

sudo apt-get -y install ros-melodic-desktop-full
apt-cache search ros-melodic

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

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

sudo apt-get -y install python-rosinstall

2. ROSが入ったことの確認

 ワークスペースを作ってroscoreを実行することでROSのバージョンを確認できる. これが実行できたらROSのインストール成功.

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws
catkin_make
roscore
6
6
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
6
6