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

Revision history [back]

click to hide/show revision 1
initial version

For item 1, you can use provided command line arguments --build-base and --install-base specified here

colcon build --build-base <your-build-path> --install-base <your-install-path>

I expected a --log-base argument as well but it does not seem to exist; instead you can set the COLCON_LOG_PATH environment variable. Just add this to your .bashrc:

export COLCON_LOG_PATH=<your-log-path>

Pro tip:

Instead of always specifying the build and install base in your command you can set your configuration in ~/.colcon/defaults.yaml as specified here

Here is my configuration as reference:

{
    "build": {
        "symlink-install": true,
        "build-base": "/code/ros2_ws/build",
        "install-base": "/code/ros2_ws/install",
        "base-paths": ["/code/ros2_ws/src"]
    },
    "test": {
        "build-base": "/code/ros2_ws/build",
        "install-base": "/code/ros2_ws/install",
        "event-handlers": ["console_direct+"],
        "base-paths": ["/code/ros2_ws/src"],
    }
}