터미널에 아래 명령어를 한 줄씩 입력합니다.

$ 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 install curl
$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
$ sudo apt update
$ sudo apt install ros-melodic-desktop-full
$ echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
$ source ~/.bashrc

 

그 후 $ roscore를 해서 아래 사진과 같다면 melodic설치완료입니다.

 

 

workspace 만들기

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/
$ catkin_make

 

만약 catkin_make에서 package가 없다는 오류가 날 경우

$ sudo apt-get install ros-melodic-[설치할 pakage]

+ Recent posts