WSL(Windows subsystem for Linux)
- 리눅스용 Windows 하위 시스템
- 가상머신, 듀얼부팅 설정없이 Linux 이용
[설치과정] :https://ivyit.tistory.com/264 참
1) ROS install
- 제어판 - 프로그램 - windows 기능 켜기/끄기 - Linux용 Windows 하위 시스템 체크 - 컴퓨터 재시작
- windows store에서 ubuntu 18.04, windows terminal 다운로드
- X server 다운로드 경로 : https://sourceforge.net/projects/xming/
- VS Code 다운로드 경로 : https://code.visualstudio.com (windows 버전으로 설치)
- ROS(melodic) 설치 방법 : http://wiki.ros.org/melodic/Installation/Ubuntu (가이드 내 명령어를 Ubuntu에 입력)
2.
3.
4. Window power shell -> ubuntu 실행 (기본 터미널에 wsl 입력하여 실행해도 무관)
5. xeyes 기본 세팅
$sudo apt install x11-apps-y
$echo $DISPLAY #(distpaly setup check)
$export DISPLAY=:0
$xeyes
(안될시 windows store에서 wsl 설치)
5. vscode 기본 세팅
- 확장프로그램 wsl 설치
- 설치후 veiw- commandpallete-wsl 검색후 실행(왼쪽하단 화살표 확인)
6. ROS 설치
http://wiki.ros.org/melodic/Installation/Ubuntu 참조하여 설치
7. 설치확인
※ 강의 내 ROS 주요 명령어
$ roscore ROS 실행
$ rosnode list 새로운 터미널 창 띄우기
$ rosrun turtlesim turtlesim.node turtlesim 실행
$ rosnode list 새로운 터미널에서 실행되고 있는 ROS node 확인
$ build 폴더로 이동 : cd build
$ mkdir : 폴더 만들기
$ ls : 디렉토리 모든 폴더 보여주기
2) ROS Cmake
- ROS로 파일 만들기 (vi 명령어)
(1) vi CmakeLists.txt #파일명
(2) [Insert] 키 입력
(3) 예제 코드 적기
(4) [esc] :wq 엔터
3) ROS Publisher subscriber
(1) catkin 설치 후 환경 설정 실행
$ source /opt/ros/melodic/setup.bash
(2) workspace 생성
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_we/
$ catkin_make
(3) shell 파일 실행
$ source devel/setup.bash
(4) ~/.bash에 ROS 환경 설정
# ROS environment setup
source /opt/ros/melodic/setup.bash
# User ROS workspace environment setup
# source {workspace_directory}/devel/setup.bash
source ~/catkin_ws/devel/setup.bash
'대외교육 > H-mobility Robotics' 카테고리의 다른 글
[H-mobility Robotics][Sensor]Encorder(엔코더) (0) | 2023.09.15 |
---|---|
[H-mobility Robotics] [Forward Kinematics(정기구학)] 로봇기구학 실습1 (Eigen 라이브러리 사용) (1) | 2023.09.06 |
[H-mobility Robotics] [ROS] Publisher and Subscriber (0) | 2023.09.04 |
[H-mobility Robotics][ROS]CMake (0) | 2023.08.18 |
[H-mobility Robotics, 정기구학(Forward Kinematics)] 정기구학 기초 및 2D-example (0) | 2023.08.16 |