Ask Your Question
0

How to build a subset of nodes in workspace?

asked 2019-03-06 11:56:45 -0500

ssnover gravatar image

Hello, I'm developing a multi-computer ROS project where each processor has multiple nodes running on it. We've found that builds have become quite long as we're not cross compiling yet and so some of the smaller embedded processors can take a decent amount of time to build the whole workspace despite not needing to build every package.

I've been looking into a way to specify a single target which can be specified like catkin_make --pkg <target> such that all of the packages required for a node on a specific end target are built. I thought metapackages might be the answer for this, but they seem to address a different problem.

Is there a standard way to equate a catkin target to a set of packages so that the whole codebase does not need to be built? I see this as also being useful for cross compiling anyway for having a single target to cross compile.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2019-03-06 12:40:38 -0500

gvdhoorn gravatar image

updated 2019-03-06 12:44:07 -0500

I've been looking into a way to specify a single target which can be specified like catkin_make --pkg <target> such that all of the packages required for a node on a specific end target are built.

catkin_make should allow you to do that, if you use the --only-pkg-with-deps option:

  --only-pkg-with-deps ONLY_PKG_WITH_DEPS [ONLY_PKG_WITH_DEPS ...]
                        Whitelist only the specified packages and their
                        dependencies by setting the CATKIN_WHITELIST_PACKAGES
                        variable. This variable is stored in CMakeCache.txt
                        and will persist between CMake calls unless explicitly
                        cleared; e.g. catkin_make
                        -DCATKIN_WHITELIST_PACKAGES="".

Alternatively, catkin_tools supports profiles, that in turn can be configured with specific white and blacklists of packages.

In addition you can ask it to build just a single package with all it's dependencies:

catkin build <pkg_name>

or even just a package without its dependencies:

catkin build <pkg_name> --no-deps

See catkin build – Build Packages for the documentation of the build verb and the Building Subsets of Packages section.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-03-06 11:56:45 -0500

Seen: 24 times

Last updated: Mar 06