Robotics StackExchange | Archived questions

Specifying packages to install in Source Foxy build

Hi,

I would like to specify the packages to be built within a repo as part of a local source build of ROS2 Foxy. How can I specify this in the ros2.repos file? I currently don't see any option for doing that:

  ros-perception/vision_opencv:
    type: git
    url: https://github.com/ros-perception/vision_opencv.git
    version: ros2

Thanks, S

Asked by bobsaccamano on 2021-10-28 14:21:28 UTC

Comments

Answers

I would like to specify the packages to be built within a repo as part of a local source build of ROS2 Foxy. How can I specify this in the ros2.repos file?

you can't, as that's not the responsibility of a .repos file. That's only used to provide information on a set of repositories (name, location and specific version to check out).

vcs (the tool which consumes these files) does not have any concept of "package", neither does a .repos file.

To build only a subset of the packages hosted in the repositories listed in a .repos file, you could:

  1. place COLCON_IGNORE or AMENT_IGNORE files in all the directories containing packages you don't want to build, or
  2. use Colcon's (extensive) support for package selection arguments

The latter is probably more maintainable. You'd use something like --packages-select [PKG_NAME [PKG_NAME …]] and tell Colcon exactly which packages you'd want it to build. Or something like --packages-up-to [PKG_NAME [PKG_NAME …]] which builds all packages you list plus their (transitive) dependencies.

Asked by gvdhoorn on 2021-10-28 15:24:45 UTC

Comments