peaq-robotics (Core)
What this skill is
Use this skill when a machine already has a working peaq-robotics-ros2 workspace and you want OpenClaw to run core ROS 2 nodes and call peaq services:
- - DID create/read
- Storage add/read
- Access role/permission operations
What this skill intentionally does NOT do
To keep this skill low-risk and easier to approve in registries, core excludes:
- - repo clone/build automation
- value transfer commands
- tether wallet operations
- runtime expansion of trusted setup/json roots via env overrides
If you need install/bootstrap/funding automation, use the companion admin skill (peaq-robotics-admin).
Required prerequisites
Before using core commands, make sure these are already true:
- - ROS 2 is installed and
ros2 works. - INLINECODE3 workspace is already present and built.
- INLINECODE4 points to that repo.
- Config YAML exists (either:
- set
PEAQ_ROS2_CONFIG_YAML, or
- use default
<PEAQ_ROS2_ROOT>/peaq_ros2_examples/config/peaq_robot.yaml).
- - ROS environment is already initialized externally for the current shell/session.
Manual setup guide (no installer script required)
Do the repo clone/build/config steps manually outside this skill using upstream peaq-robotics-ros2 docs, then set env for OpenClaw runtime:
CODEBLOCK0
If users want their own custom helper script
Tell them to create their own wrapper with only required setup and explicit config:
CODEBLOCK1
They can then run this directly, or still use this skill's commands for service calls.
Core commands
Node lifecycle:
- - INLINECODE7
- INLINECODE8
- INLINECODE9
- INLINECODE10
Identity:
- - INLINECODE11
- INLINECODE12
- INLINECODE13
- INLINECODE14
Storage:
- - INLINECODE15
- INLINECODE16
Access control:
- - INLINECODE17
- INLINECODE18
- INLINECODE19
- INLINECODE20
Identity card helpers:
- - INLINECODE21
- INLINECODE22
- INLINECODE23
Funding request (message template only, no transfer):
Behavior and safety notes
- - This skill does not source ROS setup scripts itself; environment initialization must be done externally.
- INLINECODE25 inputs are restricted to built-in roots:
- skill folder
-
PEAQ_ROS2_ROOT
- workspace
.peaq_robot
- - JSON arguments are parsed/validated before ROS 2 service calls.
- Service payloads are passed as JSON objects to
ros2 service call (no shell YAML interpolation).
One-line human prompts
- - "Start peaq robotics core and create my DID. If I need funds, give me a one-line funding request."
- "Read my DID, store this JSON as
agent_state, then read it back." - "Create role
operator, create permission move_robot, assign it, and show the response."
Deep reference
For full service names and fields, see:
peaq-robotics(核心)
技能说明
当机器已具备可运行的peaq-robotics-ros2工作空间,且需要OpenClaw运行核心ROS 2节点并调用peaq服务时,使用本技能:
- - DID创建/读取
- 存储添加/读取
- 访问角色/权限操作
本技能明确不包含的功能
为保持低风险并便于在注册中心获批,核心功能排除以下内容:
- - 仓库克隆/构建自动化
- 价值转移命令
- 钱包操作
- 通过环境变量覆盖运行时扩展可信设置/JSON根目录
如需安装/启动/资金自动化,请使用配套管理技能(peaq-robotics-admin)。
必要前提条件
使用核心命令前,请确保满足以下条件:
- - ROS 2已安装且ros2命令可用
- peaq-robotics-ros2工作空间已存在并完成构建
- PEAQROS2ROOT指向该仓库
- 存在配置YAML文件(二选一):
- 设置PEAQ
ROS2CONFIG_YAML环境变量
- 使用默认路径
ROS2ROOT>/peaqros2examples/config/peaq_robot.yaml
手动设置指南(无需安装脚本)
请在本技能外部,参照上游peaq-robotics-ros2文档手动完成仓库克隆/构建/配置步骤,然后为OpenClaw运行时设置环境变量:
bash
export PEAQROS2ROOT=$HOME/peaq-robotics-ros2
可选
export PEAQROS2CONFIGYAML=$HOME/peaq-robotics-ros2/peaqros2examples/config/peaqrobot.yaml
用户自定义辅助脚本
告知用户可创建包含必要设置和显式配置的自定义封装脚本:
bash
#!/usr/bin/env bash
set -euo pipefail
ros2 run peaqros2core corenode --ros-args -p config.yamlpath:=$PEAQROS2CONFIG_YAML
用户可直接运行该脚本,或仍使用本技能的命令进行服务调用。
核心命令
节点生命周期:
- - {baseDir}/scripts/peaqros2.sh core-start
- {baseDir}/scripts/peaqros2.sh core-configure
- {baseDir}/scripts/peaqros2.sh core-activate
- {baseDir}/scripts/peaqros2.sh core-stop
身份标识:
- - {baseDir}/scripts/peaqros2.sh did-create
- {baseDir}/scripts/peaqros2.sh did-create {type:robot}
- {baseDir}/scripts/peaqros2.sh did-create @/path/to/file.json
- {baseDir}/scripts/peaqros2.sh did-read
存储:
- - {baseDir}/scripts/peaqros2.sh store-add sensordata {temp:25.5} FAST
- {baseDir}/scripts/peaqros2.sh store-read sensordata
访问控制:
- - {baseDir}/scripts/peaqros2.sh access-create-role operator Robot operator
- {baseDir}/scripts/peaqros2.sh access-create-permission moverobot
- {baseDir}/scripts/peaqros2.sh access-assign-permission moverobot operator
- {baseDir}/scripts/peaqros2.sh access-grant-role operator did:peaq:
身份卡辅助工具:
- - {baseDir}/scripts/peaqros2.sh identity-card-json [name] [rolescsv] [endpointsjson] [metadatajson]
- {baseDir}/scripts/peaqros2.sh identity-card-did-create [name] [rolescsv] [endpointsjson] [metadatajson]
- {baseDir}/scripts/peaq_ros2.sh identity-card-did-read
资金请求(仅消息模板,不涉及转账):
- - {baseDir}/scripts/peaq_ros2.sh fund-request [amount] [reason]
行为与安全说明
- - 本技能不自带ROS环境初始化脚本;环境初始化需在外部完成。
- @/path/file.json输入仅限于内置根目录:
- 技能文件夹
- PEAQROS2ROOT
- 工作空间.peaq_robot
- - JSON参数在ROS 2服务调用前会进行解析和验证。
- 服务负载以JSON对象形式传递给ros2 service call(不进行shell YAML插值)。
单行提示指令
- - 启动peaq robotics核心并创建我的DID。如需资金,请生成一行资金请求。
- 读取我的DID,将此JSON存储为agentstate,然后读取返回结果。
- 创建角色operator,创建权限moverobot,分配权限并显示响应。
深度参考
完整服务名称和字段信息,请参阅:
- - references/peaqros2services.md