ROS

ROS_Study: Installing and Configuring Your ROS Environment

우기빌리 2023. 9. 11. 10:24

ros installation은 우선 skip

catkin, rosbuild: ROS코드를 organizing하고 building하는 방법
* rosbuild는 현재 사용하지 않음

catkin 쓰는 이유:
1. 더 표준화된 CMake 규칙을 사용한다.
2. 특히나 외부 코드를 통합하거나, 그들의 소프트웨어를 배포하는 이들에게 더 나은 유연성을 제공한다.

ROS가 설치됐으면,
ROS command에 접근하기 위해서는 매 터미널마다 아래 명령어를 입력해주어야된다.
>> source /opt/ros/noetic/setup.bash

그러기엔 과정이 너무 번거로우니 alias로 단축키를 만들어 해당 단축키를 입력하면 실행될수있도록 .bashrc를 수정해준다

 

gedit ~/.bashrc에서 수정한 부분


3. Create a ROS Workspace
>> mkdir -p ~/catkin_ws/src
>> cd ~/catkin_ws/
>> catkin_make

catkin_make(aka cm):
ws에서 작업할때 유용한 tool이다. 처음 ws를 만들고 cm하면
1. CMakeLists.txt가 src 폴더 안에 생성
2. build와 devel 폴더가 해당 ws에 생성

devel폴더에는 수많은 setup.*sh파일이 생성되었을것
해당 파일중 아무거나 source 해주면 당신의 environment 위에 해당 ws를 씌울 것이다
-> Sourcing any of these files will overlay this workspace on top of your environment

더 진행하기 전에
ws에서 먼저

>> source devel/setup.bash 

source가 잘 진행됐는지 확인 방법:
echo $ROS_PACKAGE_PATH

 

'ROS' 카테고리의 다른 글

ROS_Study: catkin/workspaces  (0) 2023.09.11
ROS_Study: CMakeLists.txt(2)  (0) 2023.09.11
ROS_Study: CMakeLists.txt(1)  (0) 2023.09.11
ROS_Study: package.xml  (0) 2023.09.11
ROS_Study: Navigation the ROS Filesystem  (0) 2023.09.11