(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

How to add a system dependency to a package

Description: This shows how to add a system dependency to a package.

Keywords: rosdep system dependency

Tutorial Level: BEGINNER

Adding rosdep dependencies to a package

The format for adding system dependencies into a catkin/package.xml file is as follows

   1 <build_depend>wxpython</build_depend>
   2 <build_depend>log4cxx</build_depend>
   3 <run_depend>wxpython</run_depend>
   4 <run_depend>log4cxx</run_depend>

These elements must be added into your package.xml for the package. The only thing to change is the name of the system dependency. This name will be looked up in rosdep definitions which are defined in YAML files, the master set of which is hosted on GitHub: https://github.com/ros/rosdistro/tree/master/rosdep

If a system dependency you need does not yet exist in rosdep you can contribute one here: http://docs.ros.org/independent/api/rosdep/html/contributing_rules.html

For older rosbuild (non-catkin) based packages

rosbuild packages (in ROS fuerte or earlier) use a manifest.xml file use this format:

   1 <rosdep name="wxpython"/>
   2 <rosdep name="log4cxx"/>

These elements must be added into your manifest.xml for the package.

Precautions:

Introducing new rosdep dependencies should be done with care as it means that users of your code will be downloading an installing these thirdparty dependencies. You must also take care to survey other ROS stacks and make sure that the dependency you are introducing does not create incompatibilities.

Wiki: rosdep/Tutorials/How to add a system dependency (last edited 2020-04-21 19:27:34 by TullyFoote)