ros-noetic install in ubuntu20.04

hogeol·2023년 1월 16일
0

ROS

목록 보기
9/9

Refer : http://wiki.ros.org/melodic/Installation/Ubuntu

This post is written for ubuntu 18.04, ros-melodic
If your ubuntu version is 16.04, ros-version is kinetic
or your ubuntu version is 20.04, ros-version is noetic

0. (Optional) If you want use specify opencv version, you should install openCV before install ros

  1. Install curl

sudo apt install curl -y

  1. Setup sources.list

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

  1. Setup key

curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

  1. Repository update (not necessary in 18.04)

sudo apt update

  1. Install ros-package (probably take long time)

sudo apt install -y ros-noetic-desktop-full

sudo apt install -y ros-noetic-rviz* ros-noetic-rqt*

  1. Environment setup (shell type bash or zsh)

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

or

echo "source /opt/ros/noetic/setup.bash" >> ~/.zshrc

  1. Install dependencies

sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential

  1. Initial rosdep (Don't be rosdep update as sudo)

sudo rosdep init

rosdep update

Optional settings from here, not necessary

  1. Init workspace (you should change workspace name 'catkin_ws' any other)

mkdir -p ~/catkin_ws/src

cd ~/catkin_ws/src

catkin_init_workspace

cd ~/catkin_ws && catkin_make

If you met error on catkin_make, see my ubuntu error series or find in google, or ask to my e-mail

  1. Shell settings

echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc

or

echo "source ~/catkin_ws/devel/setup.zsh" >> ~?.zshrc

  1. Export ros protocol

echo "export ROS_MASTER_URI=http://localhost:11311" >> ~/.bashrc

echo "export ROS_HOSTNAME=localhost" >> ~/.bashrc

or

echo "export ROS_MASTER_URI=http://localhost:11311" >> ~/.zshrc

echo "export ROS_HOSTNAME=localhost" >> ~/.zshrc

  1. Alias settings

gedit ~/.bash_aliases

alias cm='catkin_make'
alias cw='cd ~/catkin_ws'
alias cs='cd ~/catkin_ws/src'

save the file and leave

source ~/.bashrc

or

source ~/.zshrc

0개의 댓글