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

It's important to add all of your dependencies to the package.xml. That does a few different things:

  1. For users who are building your package from source, it lets rosdep know which packages to install from the system.
  2. If you end up building your package on the ROS 2 buildfarm (https://build.ros2.org), it needs to be in there so that the dependencies are available when it is built.
  3. If you end up building your package on the ROS 2 buildfarm, it sets up the debian package dependencies properly so that apt-get install ros-foxy-<mypackage> installs all of the dependencies.

That being said, adding to the package.xml doesn't modify your environment at all. So it won't help your python package to "find" dependencies. Essentially if you can run python3 and import <dep>, then your package should be able to find it. Typically those are either from system packages, or through pip.