ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You just made a little confusion but you have most of the work done. All your modifications related to the message in your package.xml and CMakeLists.txt are correct but you just did it in the wrong package. It's in your package laser_line_extraction that you should do those modifications and simply use find_package(laser_line_extraction)in your package drone, I will list the elements required for what you need to achieve :

laser_line_extraction package.xml :

  <build_depend>message_generation</build_depend>
  <run_depend>message_runtime</run_depend>

laser_line_extraction CMakeLists.txt :

find_package(catkin REQUIRED COMPONENTS
    message_generation
    std_msgs)

add_message_files(
    DIRECTORY msg  #if you put your messages in a folder msg
    FILES
    LineSegment.msg
    LineSegmentList.msg
)

#add the types from your custom message here (std_msgs for example)
generate_messages(
    DEPENDENCIES
    std_msgs)

catkin_package(
    CATKIN DEPENDS
    message_runtime
    std_msgs)

drone package.xml :

<depend>laser_line_extraction</depend>

drone CMakeLists.txt :

find_package(catkin REQUIRED COMPONENTS
    laser_line_extraction)

catkin_package(
    CATKIN DEPENDS
    laser_line_extraction)