Dependencies 종류:
1. Build Dependencies : <build_depend>
2. Build Export Dependencies : <build_export_depend>
3. Execution Dependencies : <exec_depend>
4. Test Dependencies : <test_depend>
5. Build Tool Dependencies : <buildtool_depend>
6. Documentation Tool Dependencies : <doc_depend>
<buildtool_depend>
빌드 시스템의 의존성을 기술한다.
* 대부분 catkin을 사용
<build_depend>
빌드할 때만 사용하고, 런타임에는 사용하지 않는 의존성을 정의한다.
<build_export_depend>
다음과 같이, 내 custom cpp/h 파일이 기타 패키지의 헤더파일을 include한다고 가정할 때(ex:
추가해줘야되는 type
즉,
<build_depend>와 <build_export_depend> 둘 다 해줘야된다.
<exec_depend>
패키지를 실행할 때 의존하는 패키지 이름
★★
Dependencies를 추가할 때, 항상 정확한 종속성을 명시해야 하지만, 때로는 ROS 빌드 시스템이 자동으로 필요한 종속성을 해결하는 경우도 존재. 그러나 종속성을 명시적으로 추가하는 것은 코드의 가독성과 유지관리를 개선하는 데 도움이 된다.
내 경험 결론:
1. 패키지를 생성할 때 추가한 의존성들은
<build_depend>, <build_export_depend>, <exec_depend> 에 추가
2. 직접 어떤 dependencies를 추가해줄 땐,
<build_depend> & <exec_depend> 를 추가
ex)
message 타입을 정의할 경우,
<build_depend>message_generation
<exec_depend>message_runtime
action custom 작성할 경우
<build_depend>actionlib_msgs
<exec_depend>actionlib_msgs
참고 사이트:
[1] http://wiki.ros.org/catkin/package.xml
catkin/package.xml - ROS Wiki
Overview The package manifest is an XML file called package.xml that must be included with any catkin-compliant package's root folder. This file defines properties about the package such as the package name, version numbers, authors, maintainers, and depen
wiki.ros.org
[2] https://hellosagal.tistory.com/m/3
package.xml/CMakelist.txt 각 태그 내용 정리
package.xml 스스로 만든 코드를 빌드하는데 있어서는 누락되어도 문제는 없지만, 다른 사람과 패키지를 공유할 때 누락되어있다면 실행이 되지 않는다. 의존성을 정의한다. 그러나 이게 어떤 때에
hellosagal.tistory.com
[3] https://velog.io/@y2k4388/ROS-%EB%A9%94%EC%8B%9C%EC%A7%80-%EC%A0%95%EC%9D%98%ED%95%98%EA%B8%B0
[ROS] 나만의 메시지 타입 정의하기 (Define custom message types)
node들 간의 데이터 전송을 위한 메시지를 정의하기 위한 방법이다.msg의 내용을 정의하기 위한 파일을 만든다. msg 파일은 위의 구조처럼 package(msg_send) 디렉터리 안의 msg 디렉터리를 만들어서 그
velog.io
[ROS] 패키지 빌드와 노드 작성
ROS에서의 패키지 빌드와 노드 작성, 실행 과정
velog.io
'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: Navigation the ROS Filesystem (0) | 2023.09.11 |
ROS_Study: Installing and Configuring Your ROS Environment (0) | 2023.09.11 |