Xpersona
R

ROS 2 Skill

CLAWHUB · Unverified

Controls and monitors ROS 2 robots directly via rclpy CLI. Use for ANY ROS 2 robot task: topics (subscribe, publish, capture images, find by type), services...

62
Rank
84
Safety
1.5k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s1729meahye4ntdwzcpng7ddgs83jj0k:ros2-skill
  1. Install using `clawhub skill install s1729meahye4ntdwzcpng7ddgs83jj0k:ros2-skill` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/adityakamath/ros2-skill before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-adityakamath-ros2-skill/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

149,485 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: ros2-skill
description: "Controls and monitors ROS 2 robots directly via rclpy CLI. Use for ANY ROS 2 robot task: topics (subscribe, publish, capture images, find by type), services (list, call), actions (list, send goals), parameters (get, set, presets), nodes, lifecycle management, controllers (ros2_control), diagnostics, battery, system health checks, and more. When in doubt, use this skill — it covers the full ROS 2 operation surface. Never tell the user you cannot do something ROS 2-related without checking this skill first."
license: Apache-2.0
compatibility: "Requires python3, rclpy, and ROS 2 environment sourced"
user-invokable: true
metadata:
  openclaw:
    emoji: "🤖"
    requires:
      bins: ["python3", "ros2"]
      pip: ["rclpy"]
    category: "robotics"
    tags: ["ros2", "robotics", "rclpy"]
  author: ["adityakamath", "lpigeon"]
  version: "1.0.5"
---

# ROS 2 Skill

Controls and monitors ROS 2 robots directly via rclpy. This skill provides a unified JSON interface for standard ROS 2 operations and agent-optimized workflows like closed-loop movement and image capture.

## 🚀 Capabilities

- **Introspection:** List and find topics, nodes, services, and actions.
- **Data Access:** Subscribe to any topic, capture camera images, and monitor diagnostics/battery.
- **Interactions:** Call services and send action goals with feedback monitoring.
- **Movement:** Agent-optimized `publish-until` (closed-loop with odom) and `publish-sequence` (timed).
- **Configuration:** Get/set parameters, use presets, and manage lifecycle nodes.
- **System:** Run `ros2 doctor`, manage `launch` files via tmux, and control `ros2_control` hardware.
- **Packages:** List installed packages, resolve prefix paths, enumerate executables, and read `package.xml` manifests — no live graph required.

## 🏗️ Architecture

- **Entry Point:** `scripts/ros2_cli.py` — **this is the only file you should ever run directly.**
- **Interface:** Agent → `ros2_cli.py` → rclpy → ROS 2 Graph
- **Format:** All commands output JSON. Errors contain `{"error": "..."}`.

> ⚠️ **Internal modules — do not run directly.**
> All `scripts/ros2_*.py` files other than `ros2_cli.py` are **internal
> implementation modules**, not standalone scripts. Running one directly
> prints an error to stderr and exits with code 1 — it performs no ROS
> operation. Always invoke commands through `ros2_cli.py`:
> ```bash
> python3 scripts/ros2_cli.py <command> [subcommand] [args]
> python3 scripts/ros2_cli.py --help   # list all commands
> ```

## 📚 Documentation Reference

To maintain performance and accuracy, this skill uses **Progressive Disclosure**:

1. **[references/RULES.md](references/RULES.md) (CRITICAL):** Mandatory Agent Behaviour Rules (0–26), Safety Protocols, and Decision Frameworks. **These are hard constraints — not guidelines. Read and follow before performing any robot action. Violation = immediate halt, self-correct, retry.**
2. **[references/COMMANDS.md](references/COMMANDS.md)

README.md

# ROS 2 Skill

![Status](https://img.shields.io/badge/Status-Active-green) [![Repo](https://img.shields.io/badge/Repo-adityakamath%2Fros2--skill-purple?style=flat&logo=github&logoSize=auto)](https://github.com/adityakamath/ros2-skill) [![Blog](https://img.shields.io/badge/Blog-kamathrobotics.com-darkorange?style=flat&logo=hashnode&logoSize=auto)](https://kamathrobotics.com) [![Ask DeepWiki (Experimental)](https://deepwiki.com/badge.svg)](https://deepwiki.com/adityakamath/ros2-skill) ![Python](https://img.shields.io/badge/python-3.10%2B-blue?style=flat&logo=python&logoColor=white) ![Static Badge](https://img.shields.io/badge/License-Apache%202.0-blue)

[![SKILL.md](https://img.shields.io/badge/docs-SKILL.md-green)](SKILL.md) [![AGENTS.md](https://img.shields.io/badge/docs-AGENTS.md-green)](AGENTS.md) [![RULES.md](https://img.shields.io/badge/docs-RULES.md-7aab8a)](references/RULES.md) [![COMMANDS.md](https://img.shields.io/badge/docs-COMMANDS.md-7aab8a)](references/COMMANDS.md) [![EXAMPLES.md](https://img.shields.io/badge/docs-EXAMPLES.md-7aab8a)](references/EXAMPLES.md) [![CLI.md](https://img.shields.io/badge/docs-CLI.md-7aab8a)](references/CLI.md)

[Agent Skill](https://agentskills.io) for ROS 2 robot control via rclpy.

```text
Agent (LLM) → ros2_cli.py → rclpy → ROS 2
```

## Overview

An AI agent skill that lets agents control ROS 2 robots through natural language. The agent reads `SKILL.md`, understands available commands, and executes `ros2_cli.py` to interact with ROS 2 directly via rclpy — no rosbridge required, perfect for on-board deployment.

The long-term goal is full parity with the `ros2` CLI — every command available in a terminal, made accessible to an AI agent. Beyond that baseline, ros2-skill adds capabilities that only make sense in an agent context: goal-conditioned publishing, sensor image capture, system diagnostics, and external integrations like Discord reporting.

## Quick Start

**ros2-skill** works with any AI agent that supports [Agent Skills](https://agentskills.io). For easy setup, I recommend using [nanobot](https://github.com/HKUDS/nanobot), a lightweight alternative to [OpenClaw](https://github.com/openclaw/openclaw) that can run directly on-board the ROS 2 robot's computer. Install **ros2-skill** from [ClawHub](https://clawhub.ai/adityakamath/ros2-skill) and talk to your robot:

- "What topics are available?"
- "Move the robot forward 1 meter"
- "Trigger the emergency stop"

**Agent Workflow:** The agent automatically:
1. Understands user intent (subscribe/publish/call/send/run/launch)
2. Discovers relevant launch files, nodes, topics, services, actions from the live graph
3. Finds message types and structures
4. Applies safety limits from parameters
5. Executes the command

No user clarification needed — the agent uses ros2-skill tools to answer all its own questions, including finding and launching the robot stack if it isn't already running.

For nanobot deployments, load both `SKILL.md` (command reference) an

_meta.json

{
  "ownerId": "kn75kmp46fy7hxnp8hbv834snd81tebp",
  "slug": "ros2-skill",
  "version": "1.0.6",
  "publishedAt": 1774483597158
}

references/CLI.md

# ROS 2 Skill — CLI Reference

> **Note:** The CLI is intended for debugging and development only. Normal usage is through the chat interface or messaging gateway of your AI agent platform (e.g. nanobot, OpenClaw) — not by running `ros2_cli.py` directly.

## Quick Start

```bash
# Source ROS 2 environment
source /opt/ros/${ROS_DISTRO}/setup.bash

# Run commands
python3 scripts/ros2_cli.py version
python3 scripts/ros2_cli.py topics list
python3 scripts/ros2_cli.py nodes list

# Move robot forward for 3 seconds
python3 scripts/ros2_cli.py topics publish /cmd_vel \
  '{"linear":{"x":1.0,"y":0,"z":0},"angular":{"x":0,"y":0,"z":0}}' --duration 3

# Read sensor data
python3 scripts/ros2_cli.py topics subscribe /scan --duration 3
```

All commands output JSON. See [`COMMANDS.md`](COMMANDS.md) for the full reference with output examples.

---

## Supported Commands

| Category | Commands |
| -------- | -------- |
| Connection | `version` |
| Topics | `list`, `type`, `details`, `message`, `subscribe`, `publish`, `publish-sequence`, `publish-until`, `hz`, `bw`, `delay`, `find`, `capture-image`, `diag-list`, `diag`, `battery-list`, `battery`, `qos-check` |
| Services | `list`, `type`, `details`, `call`, `find`, `echo` |
| Nodes | `list`, `details` |
| Parameters | `list`, `get`, `set`, `describe`, `dump`, `load`, `delete`, `preset-save`, `preset-load`, `preset-list`, `preset-delete`, `find` |
| Actions | `list`, `details`, `type`, `send`, `cancel`, `echo`, `find` |
| Lifecycle | `nodes`, `list`, `get`, `set` |
| Control | `list-controller-types`, `list-controllers`, `list-hardware-components`, `list-hardware-interfaces`, `load-controller`, `unload-controller`, `configure-controller`, `reload-controller-libraries`, `set-controller-state`, `set-hardware-component-state`, `switch-controllers`, `view-controller-chains` |
| TF | `list`, `lookup`, `echo`, `monitor`, `static`, `euler-from-quaternion`, `quaternion-from-euler`, `transform-point`, `transform-vector`, `tree`, `validate` |
| Doctor | `check`, `hello` |
| Multicast | `send`, `receive` |
| Interface | `list`, `show`, `proto`, `packages`, `package` |
| Bag | `info` |
| Component | `types`, `list`, `ls`, `load`, `unload`, `kill`, `standalone` |
| Pkg | `list`, `prefix`, `executables`, `xml` |
| Daemon | `status`, `start`, `stop` |
| Launch | `new`, `list`, `kill`, `restart`, `foxglove` |
| Run | `new`, `list`, `kill`, `restart` |
| Emergency Stop | `estop` |

---

## Agent Features

Capabilities beyond standard `ros2` CLI parity — designed specifically for AI agents operating on mobile robots:

| Feature | Command(s) | Description |
|---------|------------|-------------|
| **Emergency stop** | `estop` | Send zero-velocity command to halt mobile robots safely |
| **Publish sequence** | `topics publish-sequence` | Publish a timed sequence of different messages in one call |
| **Publish-until** | `topics publish-until` | Publish repeatedly and stop automatically when a condition is met (supports Euclidean dis

references/COMMANDS.md

# Command Reference

Full reference for all `ros2_cli.py` commands with arguments, options, ROS 2 CLI equivalents, and output examples.

All commands output JSON. Errors return `{"error": "..."}`.

---

## --help Quick Reference

**Every subcommand supports `--help`.** Run it before constructing any command you are unsure about — it prints accepted flags without requiring a live ROS 2 graph.

```bash
# Top-level
python3 {baseDir}/scripts/ros2_cli.py --help

# topics subcommands
python3 {baseDir}/scripts/ros2_cli.py topics publish-until --help
python3 {baseDir}/scripts/ros2_cli.py topics publish-sequence --help
python3 {baseDir}/scripts/ros2_cli.py topics publish --help
python3 {baseDir}/scripts/ros2_cli.py topics subscribe --help
python3 {baseDir}/scripts/ros2_cli.py topics list --help
python3 {baseDir}/scripts/ros2_cli.py topics type --help
python3 {baseDir}/scripts/ros2_cli.py topics details --help
python3 {baseDir}/scripts/ros2_cli.py topics message --help
python3 {baseDir}/scripts/ros2_cli.py topics hz --help
python3 {baseDir}/scripts/ros2_cli.py topics bw --help
python3 {baseDir}/scripts/ros2_cli.py topics delay --help
python3 {baseDir}/scripts/ros2_cli.py topics find --help
python3 {baseDir}/scripts/ros2_cli.py topics capture-image --help
python3 {baseDir}/scripts/ros2_cli.py topics diag --help
python3 {baseDir}/scripts/ros2_cli.py topics battery --help

# services subcommands
python3 {baseDir}/scripts/ros2_cli.py services list --help
python3 {baseDir}/scripts/ros2_cli.py services call --help
python3 {baseDir}/scripts/ros2_cli.py services details --help
python3 {baseDir}/scripts/ros2_cli.py services find --help
python3 {baseDir}/scripts/ros2_cli.py services echo --help

# actions subcommands
python3 {baseDir}/scripts/ros2_cli.py actions list --help
python3 {baseDir}/scripts/ros2_cli.py actions send --help
python3 {baseDir}/scripts/ros2_cli.py actions details --help
python3 {baseDir}/scripts/ros2_cli.py actions cancel --help
python3 {baseDir}/scripts/ros2_cli.py actions echo --help
python3 {baseDir}/scripts/ros2_cli.py actions find --help

# nodes
python3 {baseDir}/scripts/ros2_cli.py nodes list --help
python3 {baseDir}/scripts/ros2_cli.py nodes details --help

# params
python3 {baseDir}/scripts/ros2_cli.py params list --help
python3 {baseDir}/scripts/ros2_cli.py params get --help
python3 {baseDir}/scripts/ros2_cli.py params set --help
python3 {baseDir}/scripts/ros2_cli.py params describe --help
python3 {baseDir}/scripts/ros2_cli.py params dump --help
python3 {baseDir}/scripts/ros2_cli.py params load --help
python3 {baseDir}/scripts/ros2_cli.py params delete --help
python3 {baseDir}/scripts/ros2_cli.py params preset-save --help
python3 {baseDir}/scripts/ros2_cli.py params preset-load --help
python3 {baseDir}/scripts/ros2_cli.py params preset-list --help
python3 {baseDir}/scripts/ros2_cli.py params preset-delete --help

# lifecycle
python3 {baseDir}/scripts/ros2_cli.py lifecycle nodes --help
python3 {baseDir}/scripts/ros2_cli.py lifecycle lis

Sponsored

Ads related to ROS 2 Skill and adjacent AI workflows.