Token导航 LogoToken导航TokenDH.com
效率执行命令clawhub未标认证来源可访问clear审计通过

ros-skill罗斯技能

Agent Skill

ros-skill 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

16,049

周安装

643

GitHub Stars

公开资料未说明

下载量

5,195
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ros-skill(罗斯技能)
来源仓库:https://github.com/lpigeon/ros-skill
安装命令:
openclaw skills install ros-skill
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install ros-skill

简介

通过 rosbridge WebSocket 控制 ROS/ROS2 机器人系统。

  • 支持订阅主题、调用服务及获取传感器数据流。
  • 可用于机器人运动控制与状态监控应用场景。ros-skill 属于效率类 Skill,可作为该场景下的辅助能力补充。
  • 需确保网络可达且防火墙允许 WebSocket 通信。
  • 操作前应熟悉 ROS 基本概念以防误触发指令。

SKILL.md

name
ros-skill
description
Controls ROS/ROS2 robots via rosbridge WebSocket CLI. Use when the user asks about ROS topics, services, nodes, parameters, actions, robot movement, sensor data, or any ROS/ROS2 robot interaction.
license
Apache-2.0
compatibility
Requires python3, websocket-client pip package, and rosbridge running on the robot (default port 9090)
user-invocable
true
metadata
{"openclaw": {"emoji": "🤖", "requires": {"bins": ["python3"], "pip": ["websocket-client"]}, "category": "robotics", "tags": ["ros", "ros2", "robotics", "rosbridge"]}, "author": "lpigeon", "version": "1.0.1"}

ROS Skill

Controls and monitors ROS/ROS2 robots via rosbridge WebSocket.

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

All commands output JSON. Errors contain {"error": "..."}.

For full command reference with arguments, options, and output examples, see references/COMMANDS.md.


Setup

1. Install dependency

pip install websocket-client

2. Launch rosbridge on the robot

ROS 1:

sudo apt install ros-${ROS_DISTRO}-rosbridge-server
roslaunch rosbridge_server rosbridge_websocket.launch

ROS 2:

sudo apt install ros-${ROS_DISTRO}-rosbridge-server
ros2 launch rosbridge_server rosbridge_websocket_launch.xml

Important: Always Connect First

Before any operation, test connectivity:

python {baseDir}/scripts/ros_cli.py connect
python {baseDir}/scripts/ros_cli.py --ip <ROBOT_IP> connect

Global Options

FlagDefaultDescription
--ip IP127.0.0.1Rosbridge IP address
--port PORT9090Rosbridge port number
--timeout SECONDS5.0Connection and request timeout

Command Quick Reference

CategoryCommandDescription
ConnectionconnectTest rosbridge connectivity (ping, port, WebSocket)
ConnectionversionDetect ROS version and distro
Topicstopics listList all active topics with types
Topicstopics type <topic>Get message type of a topic
Topicstopics details <topic>Get topic publishers/subscribers
Topicstopics message <msg_type>Get message field structure
Topicstopics subscribe <topic> <msg_type>Subscribe and receive messages
Topicstopics publish <topic> <msg_type> <json>Publish a message to a topic
Topicstopics publish-sequence <topic> <msg_type> <msgs> <durs>Publish message sequence
Servicesservices listList all available services
Servicesservices type <service>Get service type
Servicesservices details <service>Get service request/response fields
Servicesservices call <service> <type> <json>Call a service
Nodesnodes listList all active nodes
Nodesnodes details <node>Get node topics/services
Paramsparams list <node>List node parameters (ROS 2)
Paramsparams get <node:param>Get parameter value (ROS 2)
Paramsparams set <node:param> <value>Set parameter value (ROS 2)
Actionsactions listList action servers (ROS 2)
Actionsactions details <action>Get action goal/result/feedback fields (ROS 2)
Actionsactions send <action> <type> <json>Send action goal (ROS 2)

Key Commands

connect

python {baseDir}/scripts/ros_cli.py connect
python {baseDir}/scripts/ros_cli.py --ip <ROBOT_IP> connect

version

python {baseDir}/scripts/ros_cli.py version

topics list / type / details / message

python {baseDir}/scripts/ros_cli.py topics list
python {baseDir}/scripts/ros_cli.py topics type /turtle1/cmd_vel
python {baseDir}/scripts/ros_cli.py topics details /turtle1/cmd_vel
python {baseDir}/scripts/ros_cli.py topics message geometry_msgs/Twist

topics subscribe

Without --duration: returns first message. With --duration: collects multiple messages.

python {baseDir}/scripts/ros_cli.py topics subscribe /turtle1/pose turtlesim/Pose
python {baseDir}/scripts/ros_cli.py topics subscribe /odom nav_msgs/Odometry --duration 10 --max-messages 50
python {baseDir}/scripts/ros_cli.py topics subscribe /scan sensor_msgs/LaserScan --timeout 10

topics publish

Without --duration: single-shot. With --duration: publishes repeatedly at --rate Hz. Use --duration for velocity commands — most robot controllers stop if they don't receive continuous cmd_vel messages.

# Single-shot
python {baseDir}/scripts/ros_cli.py topics publish /trigger std_msgs/Empty '{}'

# Move forward 3 seconds (velocity — use --duration)
python {baseDir}/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

# Rotate left 2 seconds
python {baseDir}/scripts/ros_cli.py topics publish /cmd_vel geometry_msgs/Twist \
  '{"linear":{"x":0,"y":0,"z":0},"angular":{"x":0,"y":0,"z":0.5}}' --duration 2

# Stop
python {baseDir}/scripts/ros_cli.py topics publish /cmd_vel geometry_msgs/Twist \
  '{"linear":{"x":0,"y":0,"z":0},"angular":{"x":0,"y":0,"z":0}}'

Options: --duration SECONDS, --rate HZ (default 10)

topics publish-sequence

Publish a sequence of messages, each repeated at --rate Hz for its corresponding duration. Arrays must have the same length.

# Forward 3s then stop
python {baseDir}/scripts/ros_cli.py topics publish-sequence /cmd_vel geometry_msgs/Twist \
  '[{"linear":{"x":1.0,"y":0,"z":0},"angular":{"x":0,"y":0,"z":0}},{"linear":{"x":0,"y":0,"z":0},"angular":{"x":0,"y":0,"z":0}}]' \
  '[3.0, 0.5]'

# Draw a square (turtlesim)
python {baseDir}/scripts/ros_cli.py topics publish-sequence /turtle1/cmd_vel geometry_msgs/Twist \
  '[{"linear":{"x":2},"angular":{"z":0}},{"linear":{"x":0},"angular":{"z":1.5708}},{"linear":{"x":2},"angular":{"z":0}},{"linear":{"x":0},"angular":{"z":1.5708}},{"linear":{"x":2},"angular":{"z":0}},{"linear":{"x":0},"angular":{"z":1.5708}},{"linear":{"x":2},"angular":{"z":0}},{"linear":{"x":0},"angular":{"z":1.5708}},{"linear":{"x":0},"angular":{"z":0}}]' \
  '[1,1,1,1,1,1,1,1,0.5]'

Options: --rate HZ (default 10)

services list / type / details

python {baseDir}/scripts/ros_cli.py services list
python {baseDir}/scripts/ros_cli.py services type /spawn
python {baseDir}/scripts/ros_cli.py services details /spawn

services call

python {baseDir}/scripts/ros_cli.py services call /reset std_srvs/Empty '{}'
python {baseDir}/scripts/ros_cli.py services call /spawn turtlesim/Spawn \
  '{"x":3.0,"y":3.0,"theta":0.0,"name":"turtle2"}'
python {baseDir}/scripts/ros_cli.py services call /turtle1/set_pen turtlesim/srv/SetPen \
  '{"r":255,"g":0,"b":0,"width":3,"off":0}'

nodes list / details

python {baseDir}/scripts/ros_cli.py nodes list
python {baseDir}/scripts/ros_cli.py nodes details /turtlesim

params list / get / set (ROS 2 only)

Uses node:param_name format from params list output.

python {baseDir}/scripts/ros_cli.py params list /turtlesim
python {baseDir}/scripts/ros_cli.py params get /turtlesim:background_r
python {baseDir}/scripts/ros_cli.py params set /turtlesim:background_r 255

actions list / details / send (ROS 2 only)

python {baseDir}/scripts/ros_cli.py actions list
python {baseDir}/scripts/ros_cli.py actions details /turtle1/rotate_absolute
python {baseDir}/scripts/ros_cli.py actions send /turtle1/rotate_absolute \
  turtlesim/action/RotateAbsolute '{"theta":3.14}'

Workflow Examples

1. Explore a Robot System

python {baseDir}/scripts/ros_cli.py --ip <ROBOT_IP> connect
python {baseDir}/scripts/ros_cli.py --ip <ROBOT_IP> version
python {baseDir}/scripts/ros_cli.py --ip <ROBOT_IP> topics list
python {baseDir}/scripts/ros_cli.py --ip <ROBOT_IP> nodes list
python {baseDir}/scripts/ros_cli.py --ip <ROBOT_IP> services list
python {baseDir}/scripts/ros_cli.py --ip <ROBOT_IP> topics type /cmd_vel
python {baseDir}/scripts/ros_cli.py --ip <ROBOT_IP> topics message geometry_msgs/Twist
python {baseDir}/scripts/ros_cli.py --ip <ROBOT_IP> actions list
python {baseDir}/scripts/ros_cli.py --ip <ROBOT_IP> params list /robot_node

2. Move a Robot

Always check the message structure first, then publish movement, and always stop after.

python {baseDir}/scripts/ros_cli.py topics message geometry_msgs/Twist
python {baseDir}/scripts/ros_cli.py topics publish-sequence /cmd_vel geometry_msgs/Twist \
  '[{"linear":{"x":1.0,"y":0,"z":0},"angular":{"x":0,"y":0,"z":0}},{"linear":{"x":0,"y":0,"z":0},"angular":{"x":0,"y":0,"z":0}}]' \
  '[2.0, 0.5]'

3. Read Sensor Data

python {baseDir}/scripts/ros_cli.py topics type /scan
python {baseDir}/scripts/ros_cli.py topics message sensor_msgs/LaserScan
python {baseDir}/scripts/ros_cli.py topics subscribe /scan sensor_msgs/LaserScan --timeout 3
python {baseDir}/scripts/ros_cli.py topics subscribe /odom nav_msgs/Odometry --duration 10 --max-messages 50

4. Use Services

python {baseDir}/scripts/ros_cli.py services list
python {baseDir}/scripts/ros_cli.py services details /spawn
python {baseDir}/scripts/ros_cli.py services call /spawn turtlesim/Spawn \
  '{"x":3.0,"y":3.0,"theta":0.0,"name":"turtle2"}'

5. ROS 2 Actions

python {baseDir}/scripts/ros_cli.py actions list
python {baseDir}/scripts/ros_cli.py actions details /turtle1/rotate_absolute
python {baseDir}/scripts/ros_cli.py actions send /turtle1/rotate_absolute \
  turtlesim/action/RotateAbsolute '{"theta":1.57}'

6. Change Parameters (ROS 2)

python {baseDir}/scripts/ros_cli.py params list /turtlesim
python {baseDir}/scripts/ros_cli.py params get /turtlesim:background_r
python {baseDir}/scripts/ros_cli.py params set /turtlesim:background_r 255
python {baseDir}/scripts/ros_cli.py params set /turtlesim:background_g 0
python {baseDir}/scripts/ros_cli.py params set /turtlesim:background_b 0

Safety Notes

Destructive commands (can move the robot or change state):

  • topics publish / topics publish-sequence — sends movement or control commands
  • services call — can reset, spawn, kill, or change robot state
  • params set — modifies runtime parameters
  • actions send — triggers robot actions (rotation, navigation, etc.)

Always stop the robot after movement. The last message in any publish-sequence should be all zeros:

{"linear":{"x":0,"y":0,"z":0},"angular":{"x":0,"y":0,"z":0}}

Always check JSON output for errors before proceeding.


Troubleshooting

ProblemCauseSolution
Connection refusedrosbridge not runningStart rosbridge: ros2 launch rosbridge_server rosbridge_websocket_launch.xml
Timeout errorsSlow network or large dataIncrease timeout: --timeout 10 or --timeout 30
No topics foundROS nodes not runningEnsure nodes are launched and workspace is sourced
Empty topic listrosapi not availableVerify rosbridge includes rosapi (default in standard install)
Parameter commands failUsing ROS 1params commands only work with ROS 2
Action commands failUsing ROS 1actions commands only work with ROS 2
Invalid JSON errorMalformed messageValidate JSON before passing (watch for single vs double quotes)
Subscribe timeoutNo publisher on topicCheck topics details to verify publishers exist
publish-sequence length errorArray mismatchmessages and durations arrays must have the same length

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

83.44%
按下载量换算4,335

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install ros-skill 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills