[ROS] 설치

­윤다빈·2022년 8월 20일
0

[Devlog] - ROS

목록 보기
8/9

ROS 설치 전 기본 프로그램 설치

Chrome 설치

  • firefox에 chrome 검색하여 나오는 첫 번째 창에서 deb 파일 다운 받기 (save file)
  • 해당 파일 경로에서 터미널을 열어 압축 풀기
$ sudo dpkg -i google-chrome-stable_current_amd64.deb

Vscode 설치

  • 우분투 앱 스토어(Ubuntu Software)에서 VSCode 검색 후 다운받기
  • Extension 창에서 ROS Extension 설치

terminator 설치

$ sudo apt install terminator

설치 시 발생하는 오류
처음 ubuntu를 설치하고 dpkg 혹은 apt install 명령어를 입력하면

dpkg: error: dpkg frontend lock is locked by another process

라는 오류가 뜨며 설치가 되지 않는다

라는 오류가 발생

-> 다른 프로세스들이 실행되고 있어서 다음과 같은 오류 발생
=> sudo killall apt apt-get
을 실행하면 된다고 함
but!!!

프로세스 없다고 함..
그래서 하나하나 kill 해주고 update해주는 방식으로 초기화함

sudo killall apt apt-get
  - 진행중인 프로세스가 없다라고 뜨면, 아래와 같이 하나하나씩 디렉토리를 삭제해주세요.
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*
sudo dpkg --configure -a 
sudo apt update
출처: https://enant.tistory.com/18 [ENAN:티스토리]

=== 해결!


ROS 설치

$ wget https://raw.githubusercontent.com/knowledge-intelligence/ROS_RobotManipulator/master/ros_noetic_install.sh && chmod 755 ./ros_noetic_install.sh && ./ros_noetic_install.sh

한 번에 설치


ROS 환경 설정

#ros 환결설정

$ gedit ~/.bashrc


# set ROS noetic

source /opt/ros/noetic/setup.bash

source ~/catkin_ws/devel/setup.bash

 

# set ROS Network

export ROS_MASTER_URI=http://localhost:11311

export ROS_HOSTNAME=localhost

 

# set ROS alias command

alias cw='cd ~/catkin_ws'

alias cs='cd ~/catkin_ws/src'

alias cm='cd ~/catkin_ws && catkin_make'
profile
Web-Front / SW-AI 개발자

0개의 댓글