Skip to main content

ros2-workspace-ops

Build, test, and source ROS 2 colcon workspaces (ament_cmake/python, rosdep, overlays, parallel-workers). Use for colcon build/test failures, package.xml / CMakeLists issues, workspace setup, or when the user mentions colcon, ament, rosdep, or ROS 2 packages.

来源信息

仓库
guilyx/dotfiles
最近来源活动
2026年8月12日 19:39
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
ros2-workspace-ops
description
Build, test, and source ROS 2 colcon workspaces (ament_cmake/python, rosdep, overlays, parallel-workers). Use for colcon build/test failures, package.xml / CMakeLists issues, workspace setup, or when the user mentions colcon, ament, rosdep, or ROS 2 packages.
# ROS 2 Workspace Ops ## Hard constraints (this machine) - **`colcon` parallel workers: max 2** (`--parallel-workers 2`) unless the user overrides — more can OOM/crash the host. - Prefer container builds when the project rule says so (e.g. SIRB `./sirb build-ws`); never fight that rule. ## Standard loop ```bash source /opt/ros/$ROS_DISTRO/setup.bash cd <ws> rosdep install --from-paths src --ignore-src -y # when deps changed colcon build --symlink-install --parallel-workers 2 --packages-select <pkg> source install/setup.bash colcon test --parallel-workers 2 --packages-select <pkg> colcon test-result --verbose ``` Useful flags: ```bash colcon build --packages-up-to <pkg> --parallel-workers 2 colcon build --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo colcon build --event-handlers console_direct+ ``` ## Overlay order Source **underlay → shared overlay → your overlay**. Always `install/setup.bash`, never `build/`. ## Triage | Symptom | Likely fix | |---------|------------| | Package not found | `colcon list`; wrong cwd / not sourced | | Missing CMake package | source underlay; `rosdep install` | | Msgs unknown at runtime | rebuild interface pkg + re-source overlay | | Python edits ignored | `--symlink-install` or clean rebuild | | OOM mid-build | `--parallel-workers 2` or `--executor sequential` | | Duplicate package name | two copies under `src/` | ## Report format - Workspace + package scope - Commands run - Pass/fail + first actionable error - Recommended next fix
在 GitHub 查看