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

catkin_package(CATKIN_DEPENDS ...) vs. find_package(catkin REQUIRED COMPONENTS ...)

asked 2017-05-03 16:45:18 -0500

2ROS0 gravatar image


Let's say I have a package A that depends on sensor_msgs. I have to add sensor_msgs to both

find_package(catkin REQUIRED COMPONENTS sensor_msgs)

catkin_package(CATKIN_DEPENDS sensor_msgs)

What is the difference between the two? What purpose do each of them solve? For instance, I noticed that message_generation has to be in the find_package call while the message_runtime has to be in catkin_package call. Why are they not in both?

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-03 20:00:28 -0500

kmhallen gravatar image

find_package() finds dependencies for this package.

catkin_package(CATKIN_DEPENDS) declares dependencies for packages that depend on this package.

For example: message_generation is needed by this package to build messages, while message_runtime is needed by dependent packages to use the already generated messages.

edit flag offensive delete link more

Question Tools



Asked: 2017-05-03 16:45:18 -0500

Seen: 6,429 times

Last updated: May 03 '17