SSkilltecabyclaudinhocode
Enviar skill
← Voltar para o catálogo

ros2-engineering-skills

Dados e Análise

TRIGGER when the user: writes or reviews ROS 2 nodes (rclcpp/rclpy), creates packages (colcon/ament), edits launch files (.launch.py), configures QoS or DDS, writes URDF/xacro, implements ros2_control hardware interfaces or controllers, sets up Nav2/MoveIt 2 pipelines, processes sensor data (camera/LiDAR/PCL), works with Gazebo/Isaac Sim, configures SROS2 security, develops micro-ROS firmware, man

77estrelas
Ver no GitHub ↗Autor: dbwls99706Licença: Apache-2.0

ROS 2 Engineering Skills

Single responsibility: This skill is an API reference & code template guide for ROS 2 development. It tells you how to use ROS 2 APIs correctly and what mistakes to avoid. It does NOT do CI/CD orchestration, incident response, data analysis, or deployment automation — those are separate skill categories.

A progressive-disclosure skill for ROS 2 development — from first workspace to production fleet deployment. Each section below gives you the essential decision framework; detailed patterns, code templates, and anti-patterns live in the references/ directory. Read the relevant reference file before writing code.

How to use this skill

Progressive disclosure — do NOT read everything at once. This skill is structured in layers. Only load what you need for the current task:

  1. This file (SKILL.md) — always loaded. Contains decision routing, core principles, pitfalls, and anti-patterns. Sufficient for answering quick questions and making architectural decisions.
  2. references/*.md — load on demand. Use the Decision Router below to pick the 1–2 files relevant to the user's current task. Do NOT read all 20 reference files — that wastes context and causes confusion.
  3. scripts/ — run only when the user needs code generation, QoS checking, or launch validation. These are tools, not reading material.

Steps:

  1. If .skill-runs.log exists in the workspace, read the last few lines to understand what was done and what issues occurred in previous sessions.
  2. Identify what the user is building (see Decision Router below).
  3. Read only the matching references/*.md file(s) for detailed guidance.
  4. Check the AI pitfalls table before generating any code.
  5. Apply the Core Engineering Principles in every artifact you produce.
  6. When multiple domains intersect (e.g. Nav2 + ros2_control), read both files but favor safety > determinism > simplicity when recommendations conflict.

Execution log: The Stop hook automatically appends a session summary to .skill-runs.log in the workspace. This lets you see what was validated last time and what issues were found — check it to avoid repeating past mistakes.

Decision router

User is doing...Read
Creating a workspace, package, or build configreferences/workspace-build.md
Writing nodes, executors, callback groupsreferences/nodes-executors.md
Topics, services, actions, custom interfaces, QoSreferences/communication.md
Lifecycle nodes, component loading, compositionreferences/lifecycle-components.md
Launch files, conditional logic, event handlersreferences/launch-system.md
tf2, URDF, xacro, robot_state_publisherreferences/tf2-urdf.md
ros2_control, hardware interfaces, controllersreferences/hardware-interface.md
Real-time constraints, PREEMPT_RT, memory, jitterreferences/realtime.md
Nav2, SLAM, costmaps, behavior treesreferences/navigation.md
MoveIt 2, planning scene, grasp pipelinesreferences/manipulation.md
Camera, LiDAR, PCL, cv_bridge, depth processingreferences/perception.md
Unit tests, integration tests, launch_testing, CIreferences/testing.md
ros2 doctor, tracing, profiling, rosbag2, CLI cheat sheetreferences/debugging.md
Docker, cross-compile, fleet deployment, OTAreferences/deployment.md
Gazebo, Isaac Sim, sim-to-real, use_sim_timereferences/simulation.md
SROS2, DDS security, certificates, supply chainreferences/security.md
micro-ROS, MCU/RTOS, XRCE-DDS, rclcreferences/micro-ros.md
Multi-robot fleet, Open-RMF, DDS discovery scalereferences/multi-robot.md
Message types, units, covariance, frame conventionsreferences/message-types.md
ROS 1 migration, ros1_bridge, hybrid operationreferences/migration-ros1.md

Cross-cutting concerns: Security, error handling, and QoS are not isolated to single reference files — apply them whenever the data path crosses a trust boundary, a node owns hardware, or communication reliability matters. Use your judgment about which cross-cutting concerns apply to the user's specific situation.

Core engineering principles

These apply to every ROS 2 artifact you produce, regardless of domain.

1. Distro awareness

<!-- LAST_UPDATED: 2026-03-30 — Review this table every 6 months or when a new distro is released. --> <!-- NEXT_REVIEW: 2026-09-30 -->

Staleness warning: The table below was last verified on 2026-03-30. If the current date is more than 6 months past that, re-verify EOL dates and feature support against https://docs.ros.org/en/rolling/Releases.html before relying on this table. When you update it, change both LAST_UPDATED and NEXT_REVIEW comments above.

Always ask which ROS 2 distribution the user targets. Key differences:

FeatureFoxy (EOL)Humble (LTS)Jazzy (LTS)Kilted (non-LTS)Rolling
EOLJun 2023 (ended)May 2027May 2029Nov 2025Rolling
Ubuntu20.0422.0424.0424.04Latest
Default DDSFast DDSFast DDSFast DDSFast DDSFast DDS
Zenoh supportTier 1Tier 1
Type description supportNoNoYesYesYes
Service introspectionNoNoYesYesYes
EventsExecutorNoNoExperimentalStable (+ rclpy)Stable (+ rclpy)
Default bag formatsqlite3sqlite3MCAPMCAPMCAP
ros2_control interfaceN/A (separate)2.x4.x4.xLatest
CMake recommendationament_target_depsament_target_depseithertarget_link_libstarget_link_libs

When the user does not specify, default to the latest LTS (Jazzy). Pin the exact distro in Dockerfile, CI, and documentation so builds are reproducible.

2. C++ vs Python decision

Choose the language based on the node's role, not personal preference.

Use rclcpp (C++) when:

  • The node sits in a control loop running ≥100 Hz
  • Deterministic memory allocation matters (real-time path)
  • The node is a hardware driver or controller plugin
  • Intra-process zero-copy communication is required

Use rclpy (Python) when:

  • The node is orchestration, monitoring, or parameter management
  • Rapid prototyping with frequent iteration
  • Heavy use of ML frameworks (PyTorch, TensorFlow) that are Python-native
  • The node does not sit in a latency-critical path

Mixed stacks are normal. A typical robot has C++ drivers/controllers and Python orchestration/monitoring. Note: component_container (composition) only loads C++ components via pluginlib. Python nodes run as separate processes, but can share a launch file and communicate via zero-overhead intra-host DDS.

Intra-process communication works for any

Como adicionar

/plugin marketplace add dbwls99706/ros2-engineering-skills

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Comentários · Nenhum comentário

Entre para comentar. Entrar

  • Ainda não há comentários. Seja o primeiro.