0
$\begingroup$

Rosanswers logo

Opposed to the documentation provided here colcon build creates the output directories "log", "install" and "build" in place.

Considering I have packages in src the commands roscd <my_fancy_ros_package>; colcon build would create a workspace structure:

workspace
  - src
      - <my_fancy_ros_package>
          - build
          - log
          - install 
          - (other directories contained in <my_fancy_ros_packag> like "msg", "include" …

to have the output directories as peers of "src" I have to change directory up to "workspace" (roscd <my_fancy_ros_package>; cd ../..; colcon build

Are there any (undocumented) options I somehow set to disable out-out-source builds? I have the following colcon packages installed (from bouncy setup instructions as far as I remember)

python3-colcon-argcomplete/bionic,bionic,bionic,bionic,now 0.3.0-1 all [installed,automatic]
python3-colcon-bash/bionic,bionic,bionic,bionic,now 0.3.1-1 all [installed,automatic]
python3-colcon-bazel/bionic,bionic,bionic,bionic 0.1.0-1 all
python3-colcon-cmake/bionic,bionic,bionic,bionic,now 0.2.5-1 all [installed,automatic]
python3-colcon-common-extensions/bionic,bionic,bionic,bionic,now 0.2.0-2 all [installed]
python3-colcon-core/bionic,bionic,bionic,bionic,now 0.3.14-1 all [installed,automatic]
python3-colcon-defaults/bionic,bionic,bionic,bionic,now 0.2.1-1 all [installed,automatic]
python3-colcon-devtools/bionic,bionic,bionic,bionic,now 0.2.1-1 all [installed,automatic]
python3-colcon-library-path/bionic,bionic,bionic,bionic,now 0.2.0-1 all [installed,automatic]
python3-colcon-metadata/bionic,bionic,bionic,bionic,now 0.2.1-1 all [installed,automatic]
python3-colcon-mixin/bionic,bionic,bionic,bionic 0.1.1-1 all
python3-colcon-notification/bionic,bionic,bionic,bionic,now 0.2.5-1 all [installed,automatic]
python3-colcon-output/bionic,bionic,bionic,bionic,now 0.2.3-1 all [installed,automatic]
python3-colcon-package-information/bionic,bionic,bionic,bionic,now 0.2.1-1 all [installed,automatic]
python3-colcon-package-selection/bionic,bionic,bionic,bionic,now 0.2.1-1 all [installed,automatic]
python3-colcon-parallel-executor/bionic,bionic,bionic,bionic,now 0.2.2-1 all [installed,automatic]
python3-colcon-pkg-config/bionic,bionic,bionic,bionic,now 0.1.0-1 all [installed,automatic]
python3-colcon-powershell/bionic,bionic,bionic,bionic,now 0.3.3-1 all [installed,automatic]
python3-colcon-python-setup-py/bionic,bionic,bionic,bionic,now 0.2.1-1 all [installed,automatic]
python3-colcon-recursive-crawl/bionic,bionic,bionic,bionic,now 0.2.0-1 all [installed,automatic]
python3-colcon-ros/bionic,bionic,bionic,bionic,now 0.3.6-1 all [installed,automatic]
python3-colcon-test-result/bionic,bionic,bionic,bionic,now 0.3.0-1 all [installed,automatic]
python3-colcon-zsh/bionic,bionic,bionic,bionic,now 0.3.1-1 all [installed,automatic]

this happens with ros2 (bouncy) and ros1 (melodic) workspaces, regardless of which ROS_DISTRO is set


Originally posted by ipa-jba on ROS Answers with karma: 153 on 2019-01-14

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The documentation you referenced doesn't mention to invoke colcon build in the package directory but in the root of the workspace.

colcon doesn't support invoking the command in a subdirectory of the workspace (without providing custom paths to --build-base, --install-base, --log-base, --base-paths) - see https://github.com/colcon/colcon-core/issues/139 for the same feature request.


Originally posted by Dirk Thomas with karma: 16276 on 2019-01-14

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.