Libraries & Packages/ROS

[ROS] 다른 패키지에 정의된 custom message 파일 가져오는 방법

yongee97 2023. 4. 24. 11:45

 

 

1. package.xml 파일에 다음 내용 추가

 

  <build_depend>[custom_msg_package]</build_depend>
  <exec_depend>[custom_msg_package]</exec_depend>

 

 

2. CMakeLists.xtx 파일 수정

find_package(catkin REQUIRED COMPONENTS
  # ( 중략 )
 [custom_msg_package]
)

 

* Reference

https://answers.ros.org/question/213446/subscribing-to-custom-message-type/

 

subscribing to custom message type - ROS Answers: Open Source Q&A Forum

subscribing to custom message type edit I have created a custom message type. I am able to successfully publish it with the topic name "topic". int8 seq_id std_msgs/Header timestamp int8 frame_id float64 myheight float64 mywidth int16 step_value sensor_msg

answers.ros.org