A very non-comprehensive introduction to ROS package format 2
The ROS package format 2 is the new recommended package format for ROS projects. It supersedes the previous package format with a handful of improvements. Let's take a look at how to structure the new file.
To specify that you are using format 2 you must change the opening <package ...> tag in your package.xml to
<?xml version="1.0"?>
<package format="2">
...
</ package>
The changes from format 1 to 2 only affect the tags specifying dependencies. The old <build_depend> and <run_depend> tags are gone now. In there place we have a handful of more explicit tags.
- <build_depend>
- This tag is used for any system or ROS packages required to build your package. This means that any -dev or -devel ubuntu package required to compile should be listed here.
- <build_export_depend>
- This is the list of packages that other packages that use yours should need. If for example one of your interfaces uses a type defined in another library your users will need to include the headers for that library in their project. This is where you specify that.
- <exec_depend>
- This tag is for packages that provide executables or shared libraries required by your program. This is where you specify all the bits and pieces that your program needs to run.
- <doc_depend>
- This tag is for any packages required to build your documentation (e.g. doxygen).
This set of tags is more explicit and solves the ambiguity around the previous <run_depend> tag.