본문 바로가기
Linux/Ubuntu Install

Ubuntu ROS Noetic 설치

by 드로니뚜벅이 2022. 8. 9.

개요

자율주행 차량의 센서(LiDAR, Camera, IMU, ...)와 관련된 소프트웨어가 ROS 기반으로 작성되거나 제공되는 경우가 많습니다.

ROS(Robot Operating System)는 로봇 응용 프로그램을 개발할 때 필요한 하드웨어 추상화, 하위 디바이스 제어, 일반적으로 사용되는 기능의 구현, 프로세스간의 메시지 패싱, 패키지 관리, 개발환경에 필요한 라이브러리와 다양한 개발 및 디버깅 도구를 제공합니다.

 

ROS도 다른 소프트웨어처럼 여러 버전이 존재합니다. 여기서 설치할 ROS Neotic Ninjemys는 2020년 5월 23일 릴리즈되었으며 ROS 1의 13번째이자 마지막 버전입니다. 2017년 12월 8일에 OpenRobotics에 의해 공개된 ROS2는 기존 ROS와 호환되지 않는 완전히 새로운 ROS 시스템으로 보셔야 합니다.

Features ROS 1 ROS 2
Platforms Linux, macOS Linux, macOS, Windows
Real-time external frameworks like OROCOS real-time nodes when using a proper RTOS with carefully written user code
Security SROS SROS 2, DDS-Security, Robotic System Threat Model
Communication XMLRPC + TCPROS DDS (RTPS)
Middleware interface - rmw
Node manager(discovery) ROS Master No, use DDS's dynamic discovery
Languages C++03, Python 2.7 C++14(C++17), Python 3.5+
Client library roscpp, rospy, rosjava, rosnodejs, and more rclcpp, rclpy, rcljava, rcljs, and more
Build system rosbuild - catkin (CMake) ament(CMake), Python setuptools
Build tools catkin_make, catkin_tools colcon
Build options - Multiple workspace, No non-isolated build, No devel space
Version control system rosws -> wstool, rosinstall (*.rosinstall) vcstool (*.repos)
Life cycle - node life cycle
Multiple nodes one node in a process multiple nodes in a process
Threading model single-threaded execution or multiple-threaded execution custom executors
Messages *.msg, *.srv, *.action *.msg, *.srv, *.action, *.idl
Command Line Interface rosrun, roslaunch, ros topic ... ros2 run, ros2 launch, ros2 topic ...
roslaunch XML Python, XML, YAML
Graph API remapping at startup time only remapping at runtime
Embedded Systems rosserial, mROS microROS, XEL Network, ros2arduino, Renesas, DDS-XRCE, AWS ARCLM

 

설치

그럼, ROS Noetic Ninjemys 를 설치해 보도록 하겠습니다.

https://wiki.ros.org/noetic/Installation

Distro Release date EOL date
ROS Noetic Ninjemys May, 2020 May, 2025 (Focal EOL)
ROS Melodic Morenia May, 2018 May, 2023 (Bionic EOL)
ROS Lunar Loggerhead May, 2017 May, 2019
ROS Kinetic Kame May, 2016 April, 2021 (Xenial EOL)
ROS Jade Turtle May, 2015 May, 2017
... ... ...

※ ROS Noetic은 공식적으로 최신 배포버전인 우분투 22.04를 지원하지 않습니다. (ROS Q&A 답변내용 참고하세요)

 

우분투는 현재(2022.08.08) 20.04(Focal)만 지원합니다. 따라서, 22.04(해파리)에서는 확인이 필요할 것 같네요.

설치 페이지(https://wiki.ros.org/noetic/Installation/Ubuntu)를 따라 하시면 됩니다.

 

요약하자면,

1. 설치 패키지 목록에 ros 를 추가합니다.

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

 

2. ros 설치 키를 설정합니다.

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

 

3. 패키지 목록을 업데이트 합니다.

$ sudo apt update

 

4. 데스크탑 풀버전을 설치합니다.

$ sudo apt install ros-noetic-desktop-full

 

5. Shell에서 실행할 수 있도록 환경설정을 합니다.

[bash]

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

[zsh]

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

 

6. ros를 실행합니다.

$ roscore

 

참고사이트