Skip to content
Back to skills

Awh Build Colcon

ASecurity

Use this skill when building an Autoware workspace with colcon (for example "build Autoware", "build only this package"). Provides the default build command and guidance for choosing options (package selection, build type, parallelism). Pass the target packages as the argument. If none is given, build the whole workspace.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 9, 2026
ai-agentsc++bashdockerperformance

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add autowarefoundation/autoware-harness --skill awh-build-colcon --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Awh Build Colcon?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Awh Build Colcon
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/autowarefoundation-awh-build-colcon/badge)](https://www.skillsdirectory.com/skills/autowarefoundation-awh-build-colcon)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: |
  Use this skill when building an Autoware workspace with colcon (for example "build Autoware", "build only this package").
  Provides the default build command and guidance for choosing options (package selection, build type, parallelism).
  Pass the target packages as the argument. If none is given, build the whole workspace.
name: awh-build-colcon
allowed-tools: Glob Grep Read Bash
context: fork
---

# Building Autoware with colcon

## Table of contents

- [Preconditions](#preconditions)
- [Default command](#default-command)
- [Options](#options)
- [Build](#build)
- [Report](#report)

## Preconditions

Locate the workspace root: walk up from the current directory to the directory that contains `src/`, with `build/`, `install/`, and `log/` at the same level.

Confirm that the ROS 2 distribution and any overlay workspaces are sourced.

1. Check that `$ROS_DISTRO` is set and `AMENT_PREFIX_PATH` points to its installation. If either is missing, run `source /opt/ros/<ROS_DISTRO>/setup.bash`.
2. In the Autoware Docker environment, the overlay is normally `/opt/autoware/`. If it exists, run `source /opt/<overlay>/setup.bash`.

## Default command

The [Autoware installation page](https://docs.autoware.org/main/installation/autoware/source-installation/#how-to-update-a-workspace) uses the following command for tutorials.

```bash
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
```

For development, use `RelWithDebInfo`, which keeps the debug information that you need to debug C++ code and analyze crashes. Run the following command and replace `<extra options>` as needed.

```bash
colcon build <extra options> --symlink-install --continue-on-error --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
```

## Options

| Purpose                                 | Option                                 | When needed                                                                                                                                                                                                      |
| --------------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Build selected packages only            | `--packages-select <pkg>`              | One package changed, or the changed packages do not depend on each other.                                                                                                                                        |
| Build a package and its dependencies    | `--packages-up-to <pkg>`               | The changed packages depend on each other, especially when a header file changed. Do not use `--packages-select`.                                                                                                |
| Build packages that depend on a package | `--packages-above <pkg>`               | A common or library package changed.                                                                                                                                                                             |
| Limit parallel jobs                     | `--parallel-workers <N>`               | The system load is high.                                                                                                                                                                                         |
| Show compiler output                    | `--event-handlers console_direct+`     | The compiler or linker output lacks enough detail.                                                                                                                                                               |
| Other build types                       | `-DCMAKE_BUILD_TYPE=Release` / `Debug` | Use `Release` for production or performance measurement. Use `Debug` for rich information in `gdb`. Combine with `--packages-up-to` or `--packages-above` so that all affected packages use the same build type. |

## Build

At the workspace root, call `colcon build` along with the options.

## Report

If `colcon build` succeeds, report `success`. Otherwise, report:

- the package name
- a summary of the failure reason
  - Lanelet2 template errors can be very long. Find the source line in the compiler output, which should include the local path and position, and ignore the rest.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.