🦐 SOARM Control Skill
Use the existing SOARM API to control the robotic arm directly.
⚙️ Configuration Notes
Default Local Setup (when on same machine):
- - API Base URL: INLINECODE0
🔍 Key APIs & Examples
Read Current State
CODEBLOCK0
Returns current joint values and XYZ end-effector position.
Move To a Position By Joint Angles
CODEBLOCK1
Parameter Notes:
- - Joints order:
shoulder_pan, shoulder_lift, elbow_flex, wrist_flex, wrist_roll, INLINECODE6 - First 5 joints use degrees (deg)
- Gripper uses 0-100 range
Fixed Positions:
| Name | shoulderpan | shoulderlift | elbowflex | wristflex | wrist_roll | gripper |
|---|
| INLINECODE7 | 0 | -104 | 95 | 65 | -95 | 10 |
| INLINECODE8 |
0 | -50 | 30 | 90 | -95 | 70 |
Examples:
Return to initial:
CODEBLOCK2
Return to top_down:
CODEBLOCK3
Move By XYZ Coordinates
CODEBLOCK4
Parameter Notes:
- -
x: forward/backward (positive = forward) - INLINECODE12 : left/right (positive = left)
- INLINECODE13 : up/down (positive = up)
- Values in meters
Trigger a Pick Task
CODEBLOCK5
Returns:
- -
ok: true if the task was accepted - INLINECODE15 : INLINECODE16
- Returns HTTP
409 if another pick task is already running
🐙 Quick Commands I Can Run
Return to initial position
CODEBLOCK6
Return to top-down position
CODEBLOCK7
Read current position
curl -sS http://localhost:8000/joints
🛠️ Setup Notes
When pairing your SOARM device with OpenClaw:
- 1. Organize the skill directory
CODEBLOCK9
- 2. Perpare lerobot env
- Launch the server
~/.openclaw/workspace/skills/soarm-control
bash scripts/start_server.sh
🦐 SOARM 控制技能
使用现有的 SOARM API 直接控制机械臂。
⚙️ 配置说明
默认本地设置(同一台机器时):
- - API 基础 URL:http://127.0.0.1:8000
🔍 关键 API 及示例
读取当前状态
bash
curl -sS http://127.0.0.1:8000/joints
返回当前关节值和 XYZ 末端执行器位置。
通过关节角度移动到指定位置
bash
curl -sS -X POST http://127.0.0.1:8000/move/joints \
-H Content-Type: application/json \
-d {angles:[0,0,0,0,0,0]}
参数说明:
- - 关节顺序:shoulderpan(肩部旋转)、shoulderlift(肩部抬升)、elbowflex(肘部弯曲)、wristflex(腕部弯曲)、wrist_roll(腕部旋转)、gripper(夹爪)
- 前 5 个关节使用 度(deg)
- 夹爪使用 0-100 范围
固定位置:
| 名称 | shoulderpan | shoulderlift | elbowflex | wristflex | wristroll | gripper |
|---|
| initial(初始) | 0 | -104 | 95 | 65 | -95 | 10 |
| topdown(俯视) |
0 | -50 | 30 | 90 | -95 | 70 |
示例:
回到 initial(初始位置):
bash
curl -sS -X POST http://127.0.0.1:8000/move/joints \
-H Content-Type: application/json \
-d {angles:[0,-104,95,65,-95,10]}
回到 top_down(俯视位置):
bash
curl -sS -X POST http://127.0.0.1:8000/move/joints \
-H Content-Type: application/json \
-d {angles:[0,-50,30,90,-95,70]}
通过 XYZ 坐标移动
bash
curl -sS -X POST http://127.0.0.1:8000/move/xyz \
-H Content-Type: application/json \
-d {x:0.2,y:0.0,z:0.2}
参数说明:
- - x:前进/后退(正数 = 前进)
- y:左/右(正数 = 向左)
- z:上/下(正数 = 向上)
- 数值单位为米
触发抓取任务
bash
curl -sS -X POST http://127.0.0.1:8000/pick
返回:
- - ok:如果任务被接受则为 true
- message:抓取任务已启动
- 如果另一个抓取任务正在运行,则返回 HTTP 409
🐙 我可以运行的快速命令
回到初始位置
bash
curl -sS -X POST http://localhost:8000/move/joints \
-H Content-Type: application/json \
-d {angles:[0,-104,95,65,-95,10]}
回到俯视位置
bash
curl -sS -X POST http://localhost:8000/move/joints \
-H Content-Type: application/json \
-d {angles:[0,-50,30,90,-95,70]}
读取当前位置
bash
curl -sS http://localhost:8000/joints
🛠️ 设置说明
将 SOARM 设备与 OpenClaw 配对时:
- 1. 整理技能目录
bash
├── references
│ └── so101newcalib.urdf # 从 TheRobotStudio 下载
├── scripts
│ ├── best.pt # yolo11n 模型
│ ├── controlsoarmjoints.py
│ ├── movesoarmtoxyzpinocchio.py
│ ├── readsoarmjoints.py
│ ├── soarm_api.py
│ └── start_server.sh
└── SKILL.md
- 2. 准备 lerobot 环境
- 启动服务器
bash
~/.openclaw/workspace/skills/soarm-control
bash scripts/start_server.sh