ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to build only a subset of packages in a workspace?

asked 2020-06-15 04:49:08 -0500

LukeAI gravatar image

updated 2021-05-12 09:47:38 -0500

We have a project with various packages for interfacing with hardware that won't build unless their SDKs are installed. So this means every developer has to install all these SDKs for hardware they are never going to see.

Is there some way of marking these packages as "production only" so they aren't built or required except when a "production" flag is set?

edit retag flag offensive close merge delete

Comments

Suggestion: change the title of your question to the actual question (ie: how to build only a subset of packages), instead of mentioning a potential solution you came up with already.

gvdhoorn gravatar image gvdhoorn  ( 2020-06-15 05:22:18 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-06-15 05:15:51 -0500

gvdhoorn gravatar image

updated 2020-06-15 07:57:03 -0500

Is there some way of marking these packages as "production only" so they aren't built or required except when a "production" flag is set?

No, there isn't.

What you could do is explicitly ask it to build only a subset of packages (which results in the same behaviour, but uses more appropriate ways to express your intention).

You'd want to use catkin_tools for this though.

See catkin build: Build Packages - Building Subsets of Packages. To go beyond individual packages and use profiles with specific sets of packages (to ignore or to actually build), you can use white/black listing.

If you absolutely don't want to use catkin_tools, you could look into the white/black listing functionality of catkin_make. See the comments on #q54178 for an example and #q285341. It's much less convenient than the implementation in catkin_tools though.

So this means every developer has to install all these SDKs for hardware they are never going to see.

But your description makes me ask: why do those developers have those packages in their workspace then?


Edit:

The project is a catkin workspace (in a git repo.), developers branch and merge the project in order to develop for it and test it. Is not a typical way to develop for ROS projects?

No. Not at all.

In fact, I would almost say: never version entire workspaces (by putting them in a single repository).

See also #q264600 (and the Q&As linked from that). And #q347421 for the ROS 2 version (which isn't really any different).

I'd recommend to take a look at tools like vcstool, rosdep, .rosinstall files, rosinstall_generator et al.

edit flag offensive delete link more

Comments

The project is a catkin workspace (in a git repo.), developers branch and merge the project in order to develop for it and test it. Is not a typical way to develop for ROS projects?

LukeAI gravatar image LukeAI  ( 2020-06-15 07:45:51 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-06-15 04:49:08 -0500

Seen: 221 times

Last updated: May 12 '21