-
Ubuntu18.04에 ROS 설치 및 개발환경 구축ROS & Programming 2021. 1. 4. 17:37
ROS란?
ROS(Robot Operating System)는 로봇용 공개소스 메타 운영체제로, Node라고 하는 독립적인 프로세스로 이루어져 코드 재사용을 편리하게 하는 플랫폼입니다.
참고: http://wiki.ros.org/ko/ROS/Introduction
ko/ROS/Introduction - ROS Wiki
ROS란? ROS 는 로봇용 공개소스 메타 운영체제입니다. ROS는 일반 운영체제에서 제공하는 하드웨어 추상화, 저수준 기기 제어, 빈번히 사용되는 기능들이 구현되어 있으며, 프로세스간 메시지 전달
wiki.ros.org
ROS 설치 방법
1. Configure Ubuntu repositories
소프트웨어 & 업데이트 설정 화면 다운로드 위치가 '주 서버'로 되어있는지 확인합니다.
2. Set up 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'
sources.list에 packages.ros.org를 추가합니다.
3. Set up keys
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
Key를 요청합니다.
4. Installation
sudo apt update
sudo apt install ros-melodic-desktop-full
ros-melodic-desktop-full 을 설치합니다.
5. Environment setup
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
.bashrc에 setup을 추가합니다.
6. Dependencies for building packages
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
빌드에 필요한 패키지들을 설치합니다.
6.1. Initialize rosdep
sudo apt install python-rosdep
sudo rosdep init
rosdep update
rosdep을 사용할 수 있도록 초기화합니다.
7. Run roscore
roscore
다음과 같이 실행되면 정상적으로 설치된 것입니다.
roscore 실행 화면 참조: http://wiki.ros.org/melodic/Installation/Ubuntu
melodic/Installation/Ubuntu - ROS Wiki
We are building Debian packages for several Ubuntu platforms, listed below. These packages are more efficient than source-based builds and are our preferred installation method for Ubuntu. Note that there are also packages available from Ubuntu upstream. P
wiki.ros.org
QtCreator ROS 소프트웨어 개발 시 Ubuntu의 기본 터미널과 기본 에디터인 gedit을 사용할 수도 있지만 QtCreator와 Terminator 프로그램을 사용하면 편리합니다.
qtcreator-ros 설치 및 실행
1. qtcreator-ros 설치 파일 다운로드
https://ros-qtc-plugin.readthedocs.io/en/latest/_source/How-to-Install-Users.html
How to Install (Users) — ROS Qt Creator Plug-in documentation
This wiki explains the procedure for installing the ROS Qt Creator Plug-in. Note If you primarily want to use this tool for development of other ROS packages (ie: not to work on the plugin itself), please follow the following instructions.
ros-qtc-plugin.readthedocs.io
위 링크에서 Ubuntu 버전에 맞는 Online Installer를 다운받습니다.
2. Installer 실행
Installer를 다운받은 폴더로 이동합니다.
cd Downloads/
Installer에 대한 모든 사용자의 실행 권한을 추가합니다.
chmod +x qtcreator-ros-bionic-latest-online-installer.run
Installer를 실행합니다.
./qtcreator-ros-bionic-latest-online-installer.run
Qt Creator에 체크하고 설치를 진행합니다.
qtcreator-ros-bionic-latest-online-installer 3. qtcreator-ros 실행
실행 파일이 있는 곳으로 이동합니다.
cd QtCreator/latest/bin/
qtcreator-ros를 실행합니다.
./qtcreator-ros
qtcreator-ros QtCreator ROS 설치 완료!
Terminator 설치 및 단축키 정리
1. Terminator 설치
Terminator를 설치합니다.
sudo apt install terminator
설치 완료 후 터미널 종료 후 다시 켜면 디폴트로 Terminator가 실행됩니다.
Terminator 2. Terminator 단축키
자주 쓰는 단축키는 다음과 같습니다.
- 터미널 열기 : Ctrl + Alt + T.
- 위/아래로 화면 나누기 : Ctrl + Shift + O.
- 좌/우로 화면 나누기 : Ctrl + Shift + E.
- 현재 화면 닫기 : Ctrl + Shift + W.
- 화면간 이동 : Alt + 방향키
- 스크롤바 Toggle : Ctrl + Shift + S.
'ROS & Programming' 카테고리의 다른 글
Ubuntu 18.04.05 LTS 가상머신에 설치하기 (0) 2021.01.18 [C++] 포인터 변수와 레퍼런스 변수 (0) 2021.01.10 왜 리눅스를 사용하는가? (0) 2020.12.28