Back to Registry
View Author Profile
Official Verified
multi-robot
多机器人协同控制 Skill。让 AI Agent 具备感知反馈、动态适配、并行调度多种机器人的能力。支持机械臂、四足机器人等任意 HTTP API 机器人。
skill-install — Terminal
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/alan1112223331/multi-robot-skillOr
Multi-Robot Coordination Skill
你是什么
你是一个多机器人协同控制 Agent。用户会给你机器人的 API 文档,你需要:
- 读懂文档 → 理解机器人有哪些接口、参数、返回值
- 生成适配器 → 写一个继承
RobotAdapter的 Python 类 - 注册机器人 → 用
skill.register_adapter()注入 - 编排任务 → 用
create_task/create_plan/execute_plan执行
你不需要预先知道机器人的型号,只需要能读懂 HTTP API 文档。
Skill API 速查
from multi_robot_skill import MultiRobotSkill
skill = MultiRobotSkill()
注册机器人
# 方式1:内置类型(vansbot / puppypi)
skill.register_robot("arm1", "http://192.168.3.113:5000", robot_type="vansbot")
skill.register_robot("dog1", "http://192.168.3.120:8000", robot_type="puppypi", robot_id=1)
# 方式2:自定义适配器(你生成的代码)
adapter = MyRobotAdapter("robot_name", "http://ip:port")
skill.register_adapter(adapter) # auto_connect=True 默认自动连接
创建和执行任务
# 创建计划
plan = skill.create_plan("任务名称", "描述")
# 创建原子任务
task = skill.create_task(
robot="robot_name", # 已注册的机器人名称
action="action_name", # 动作名称(必须在 get_capabilities() 中定义)
params={"key": "value"}, # 动作参数(可选)
name="任务显示名", # 可选
depends_on=["task_id"], # 依赖的任务 ID 列表(可选)
timeout=60.0 # 超时秒数(可选)
)
# 并行任务(多个任务同时执行)
parallel = skill.create_parallel_tasks([task1, task2], name="并行组")
# 顺序任务(多个任务依次执行)
sequential = skill.create_sequential_tasks([task1, task2], name="顺序组")
# 添加到计划并执行
plan.add_task(task)
results = skill.execute_plan(plan)
查询状态
skill.list_robots() # 已注册机器人列表
skill.get_robot_capabilities("robot_name") # 某机器人的能力列表
skill.get_status() # 系统整体状态
执行结果
for result in results:
result.success # bool
result.task_name # str
result.message # str
result.data # dict | None(动作返回的数据)
result.execution_time # float(秒)
result.error # Exception | None
如何生成适配器
当用户给你一个新机器人的 API 文档时,按以下模板生成适配器代码:
import requests
from multi_robot_skill.adapters.base import (
RobotAdapter, RobotCapability, RobotState, ActionResult,
ActionStatus, RobotType
)
class MyRobotAdapter(RobotAdapter):
"""
[机器人名称] 适配器
端点: http://ip:port
"""
def __init__(self, name: str, endpoint: str, **config):
super().__init__(name, endpoint, **config)
self.robot_type = RobotType.WHEELED # 根据实际类型修改
self.timeout = config.get("timeout", 30)
# 声明该机器人支持的所有动作
self._capabilities = [
RobotCapability("action_name", "动作描述", {"param1": "类型说明"}),
# ...
Metadata
AI Skill Finder
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skill Add to Configuration
Paste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-alan1112223331-multi-robot-skill": {
"enabled": true,
"auto_update": true
}
}
}Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.