Role of content of CmakeList.txt and package.xml

1.What exactly is the role and difference between find_package() and catkin_package() in Cmakelist.txt, since the content in both find_package() and the CATKIN_DEPENDS under the catkin_package() are about the same.

find_package(catkin REQUIRED COMPONENTS
  rospy
  std_msgs
)
`catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES drone_action_pkg
 CATKIN_DEPENDS rospy std_msgs 
#  DEPENDS system_lib
)`
  1. I understand that <build_depend></build_depend> written for all packages under find_packages(), similarly, is there any connection to <build_export_depend> and <exec_depend> to any of the modules in CmakeList.txt like catkin_package()

  2. What is the role of each of the following in package.xml, if we want to include a new package nav_msgs (to access its Class or Class’s functions from the current program)

<build_depend>nav_msgs<build_depend>
<build_export_depend>nav_msgs<build_export_depend>
<exec_depend>nav_msgs<exec_depend>

Hi Joseph,

Going in-depth with these is beyond the scope of the basics course, otherwise it would be too much!

Your can read about these files on the ROS wiki:

  1. catkin/CMakeLists.txt - ROS Wiki
  2. catkin/package.xml - ROS Wiki

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.