LR

lpigeon/ros-skill

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

27 stars 质量 56 趋势 11Apache-2.0

Agent Skill 用于通过 rosbridge WebSocket 控制 ROS/ROS2 机器人。

概览

Agent Skill 用于通过 rosbridge WebSocket 控制 ROS/ROS2 机器人。 一个人工智能代理技能,使代理通过自然语言控制ROS机器人。代理读取 SKILL.md,理解可用命令,并通过rosbridge执行ros_cli.py与任何ROS/ROS2系统交互。 直接从命令行ros_cli.py。 可与任何支持代理技能的AI代理配合使用。为了方便设置,我们推荐OpenClaw——从ClawHub安装并与你的机器人对话: - “连接ROS机器人” - “将机器人前移1米” - “有哪些主题可用?” 完整设置和使用方法请参见OpenClaw教程。 所有命令输出 JSON。详见 SKILL.md 快速参考和参考/COMMANDS.md 以获取完整细节及输出示例。 1. 代理平台将 SKILL.md 加载到代理的系统提示符中 2.命令中的{baseDir}被实际的技能安装路径取代 3.用户请求类似“推动机器人前进”的请求 4.代理执行:python {baseDir}/scripts/ros_cli。

概述(AI 翻译)

Agent Skill 用于通过 rosbridge WebSocket 控制 ROS/ROS2 机器人。

概述

一种人工智能代理技能,使代理通过自然语言控制ROS机器人。代理读取SKILL.md,理解可用命令,并执行ros_cli.py,通过rosbridge与任何ROS/ROS2系统交互。

快速启动(CLI)

直接从命令行使用ros_cli.py。

快速启动(AI代理)

ros-skill 可与任何支持 Agent Skills 的 AI 代理配合使用。为了方便设置,我们推荐 OpenClaw——从 ClawHub 安装 ros-skill 并与你的机器人对话:

  • “连接ROS机器人”
  • “将机器人前移1米”
  • “有哪些主题可用?”

完整设置和使用方法请参见OpenClaw教程。

支持的指令

类别 命令
连接 connect, version
主题 list、type、details、message、subscribe、publish、publish-sequence
服务 list, type, details, call
节点 list, details
参数 list, get, set(仅限ROS 2)
操作 list, details, send(仅限ROS 2)

所有命令均输出 JSON。请参见 SKILL.md 快速参考和“references/COMMANDS”。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

ROS Skill

Agent Skill for ROS/ROS2 robot control via rosbridge WebSocket.

Agent (LLM) → ros_cli.py → rosbridge (WebSocket :9090) → ROS/ROS2 Robot

Overview

An AI agent skill that lets agents control ROS robots through natural language. The agent reads SKILL.md, understands available commands, and executes ros_cli.py to interact with any ROS/ROS2 system via rosbridge.

Quick Start (CLI)

Use ros_cli.py directly from the command line.

# Install
pip install websocket-client

# Launch rosbridge on the robot (ROS 2)
sudo apt install ros-${ROS_DISTRO}-rosbridge-server
ros2 launch rosbridge_server rosbridge_websocket_launch.xml
# Connect
python scripts/ros_cli.py connect

# Explore
python scripts/ros_cli.py topics list
python scripts/ros_cli.py nodes list

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

# Read sensor data
python scripts/ros_cli.py topics subscribe /scan sensor_msgs/LaserScan --timeout 3

Quick Start (AI Agent)

ros-skill works with any AI agent that supports Agent Skills. For easy setup, we recommend OpenClaw — install ros-skill from ClawHub and talk to your robot:

  • “Connect to the ROS robot”
  • “Move the robot forward 1 meter”
  • “What topics are available?”

See the OpenClaw tutorial for full setup and usage.

Supported Commands

Category Commands
Connection connect, version
Topics list, type, details, message, subscribe, publish, publish-sequence
Services list, type, details, call
Nodes list, details
Parameters list, get, set (ROS 2 only)
Actions list, details, send (ROS 2 only)

All commands output JSON. See SKILL.md for quick reference and references/COMMANDS.md for full details with output examples.

How It Works

  1. The agent platform loads SKILL.md into the agent’s system prompt
  2. {baseDir} in commands is replaced with the actual skill installation path
  3. User asks something like “move the robot forward”
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add lpigeon/ros-skill
新手?先看 mcpskill.org 教程 →