Ask Your Question
1

Why does colcon want to build hundreds of packages on a new workspace?

asked 2020-05-22 12:41:39 -0500

cwillia109 gravatar image

updated 2020-05-22 12:42:14 -0500

I’m trying to simply get a ROS2 workspace going with the demo nodes built. However, following these instructions for making a workspace, when i get to the colcon build --symlink-install step, it needs to build 271 packages. This is a fresh workspace.

This includes packages such as fastrtps, rviz_ogre_vender, ament_cmake_pep8, and many many more. This takes a LARGE amount of time on the Pi3. My main goal was just to have the demo nodes working.

Why are there so many packages being built, do these need to be built every time I make a new workspace, and is there a way to only build new packages if all of these need to be done in the future?

I’m an hour into this build and it isn’t even half way done.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2020-05-22 13:01:58 -0500

sloretz gravatar image

Why are there so many packages being built

Because there are that many packages in the workspace.

It looks like the instructions linked are to build the core of ROS Dashing plus more from source, which is a lot of packages. Is that intended? If ROS Dashing is already installed then put only the packages you want to build (only the demo nodes you mentioned) in the workspace.

do these need to be built every time I make a new workspace

No. The workspace only needs to have the packages you want to work on. Put only the packages you want to build in the src folder of the workspace, then source /opt/ros/dashing/setup.bash before running colcon build.

is there a way to only build new packages if all of these need to be done in the future?

Colcon has a few options for picking which packages to build. Run colcon build -h and look for options starting with --packages-

--packages-ignore [PKG_NAME [PKG_NAME ...]]
--packages-ignore-regex [PATTERN [PATTERN ...]]
--packages-up-to [PKG_NAME [PKG_NAME ...]]
--packages-above [PKG_NAME [PKG_NAME ...]]
--packages-above-depth DEPTH [PKG_NAME ...]
--packages-select-by-dep [DEP_NAME [DEP_NAME ...]]
--packages-skip-by-dep [DEP_NAME [DEP_NAME ...]]
--packages-skip-up-to [PKG_NAME [PKG_NAME ...]]
--packages-select-build-failed
--packages-skip-build-finished
--packages-select-test-failures
--packages-skip-test-passed
--packages-select [PKG_NAME [PKG_NAME ...]]
--packages-skip [PKG_NAME [PKG_NAME ...]]
--packages-select-regex [PATTERN [PATTERN ...]]
--packages-skip-regex [PATTERN [PATTERN ...]]
--packages-start PKG_NAME
--packages-end PKG_NAME

You might be interested in the colcon build documentation.

edit flag offensive delete link more

Comments

I feel dumb now. Started from scratch and everything is working fine.

cwillia109 gravatar image cwillia109  ( 2020-05-22 19:03:57 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-05-22 12:41:39 -0500

Seen: 159 times

Last updated: May 22 '20