Skip to main content

ros2-actions

ROS 2 actions — goals, cancel, preemption, feedback, BT integration, and executor pitfalls (Nav2/MoveIt-style). Use when implementing action servers/clients, cancel handshakes, concurrent goals, or stuck RUNNING.

Source facts

Repository
guilyx/dotfiles
Last source activity
August 12, 2026 at 19:39
Detected SKILL.md language
English
Stars
0
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
ros2-actions
description
ROS 2 actions — goals, cancel, preemption, feedback, BT integration, and executor pitfalls (Nav2/MoveIt-style). Use when implementing action servers/clients, cancel handshakes, concurrent goals, or stuck RUNNING.
# ROS 2 Actions ## Contract Goal → optional feedback → **exactly one** terminal: SUCCEEDED / CANCELED / ABORTED. Do not fake cancel by succeeding. Do not detach work and report SUCCEEDED while hardware still moves — if you must, mark it `ponytail:` with ceiling + upgrade path. ## Server rules - `goal_callback`: accept/reject quickly; no hardware. - `cancel_callback`: accept only if you **will** stop; must be schedulable while execute runs (`ros2-executors`). - `execute_callback`: poll cancel; on cancel **command safe stop**, then `canceled()`. - Default: **one** active goal — reject or preempt the previous (MoveIt execute / Nav2 navigate style). - Preempt: stop old goal to a known state, then start new. ## Client + BT / mission (Nav2-style) - Tick/mission code uses **async** goals; on tree **halt** or preemption → **cancel** and wait for terminal (with timeout + local safe stop). - Do not fire-and-forget goals from a leaf that can be halted. - Feedback is for progress/UI; safety from state topics + server-side cancel. ## Threading - Long execute: worker thread or queue; share cancel via atomic/mutex; never sync-wait other actions on the ST executor from execute without groups. - Goal/cancel groups must not be blocked forever by execute (see `ros2-executors` pattern C). ## QoS / availability Action = topics + services under `/action_name`. Lifecycle-inactive server ⇒ clients hang — check lifecycle first. ## Debug ```bash ros2 action list ros2 action info /foo --verbose ros2 action send_goal /foo pkg/action/Type "{...}" --feedback ``` Server kill -9 ⇒ no result; clients need local timeouts.
View on GitHub