Project/#1 AI 기반 자율주행 로봇을 이용한 매장 관리

#2. ROS - 기본 ROS설치(and 삭제 방법)

얼죽아여뜨샤 2022. 5. 13. 20:59

1. 설치

ROS 설치 ROS.org 페이지

http://wiki.ros.org/noetic/Installation/Ubuntu

 

 

noetic/Installation/Ubuntu - ROS Wiki

If you rely on these packages, please support OSRF. These packages are built and hosted on infrastructure maintained and paid for by the Open Source Robotics Foundation, a 501(c)(3) non-profit organization. If OSRF were to receive one penny for each downlo

wiki.ros.org

1.2 Setup your 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.3 Set up yours keys

sudo apt install curl # if you haven't already installed curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

 

1.4 Istallation

 

sudo apt update

 

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

 

1.5 Environment setup

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

 

1.6 Dependencies for building packages

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

1.6.1 Initialize rosdep

sudo apt install python3-rosdep
sudo rosdep init
rosdep update
 
2. 삭제
기존 설치 ROS삭제
sudo apt-get purge ros-* (패키지와 설정파일 함께 삭제)

sudo apt-get remove ros-* (패키지만 삭제, 설정파일은 남겨둠)

삭제되었는지 확인

rosversion -d

여기에서 <unknown>이라고 뜨면 삭제가 된 것임.

만약 기존 ros version이 확인되면, 재부팅 후 다시 확인해 보면, 삭제된 것을 확인할 수 있음.