[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77XCV4WQYDWXZDBHRCE6TNR":3,"skill-same:01M77XCV4WQYDWXZDBHRCE6TNR":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M77XCV4WQYDWXZDBHRCE6TNR","ur-robot",null,"Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fu\u002Fur-robot\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# UR Robot - Universal Robots 控制技能\n\n**技能版本:** v1.0.0  \n**适用机器人:** Universal Robots (UR3\u002FUR5\u002FUR10\u002FUR10e, CB3\u002Fe-Series)  \n**仿真器:** URSim Docker  \n**通信协议:** RTDE + URScript (Secondary Socket)\n\n---\n\n## 💡 Windows 用户须知\n\n**为符合 ClawHub 平台要求，已移除 2 个 PowerShell 脚本 (`.ps1`)**\n\n| 移除的脚本 | 替代方案 | 位置 |\n|-----------|----------|------|\n| `fix-and-test.ps1` | Python 测试脚本 | `test_*.py` |\n| `setup-docker-d-drive.ps1` | 手动配置 Docker | 见 `WINDOWS_SCRIPTS_NOTE.md` |\n\n**核心功能不受影响** - 所有 Python 脚本和文档保留 ✅\n\n详细说明：`WINDOWS_SCRIPTS_NOTE.md`\n\n---\n\n## ⚠️ 重要安全声明\n\n### 🧪 测试状态\n\n| 项目 | 状态 | 说明 |\n|------|------|------|\n| **URSim 仿真** | ✅ 已验证 | 所有功能在 URSim e-Series 中测试通过 |\n| **真机验证** | ❌ **未验证** | **尚未在真实机器人上测试** |\n\n### ⚠️ 真机使用警告\n\n**本技能包仅在 URSim 仿真器中完成测试，未在真实机器人上验证！**\n\n**在真机使用前必须：**\n\n1. ✅ **重新验证所有命令** - 仿真与真机可能存在差异\n2. ✅ **低速测试** - 首次运行使用最低速度 (v=0.1)\n3. ✅ **安全检查** - 确认急停按钮、工作范围、碰撞检测\n4. ✅ **专业人员监督** - 必须由持证机器人操作员监督\n5. ✅ **风险评估** - 进行全面的风险评估和安全分析\n\n**因直接使用本技能包于真机导致的任何损失，作者不承担责任！**\n\n---\n\n## 📋 功能概览\n\n| 功能类别 | 支持命令 | 状态 |\n|----------|----------|------|\n| **关节运动** | `movej()` | ✅ |\n| **直线运动** | `movel()` | ✅ |\n| **圆弧运动** | `movec()` | ✅ |\n| **速度控制** | `speedj()`, `speedl()` | ✅ |\n| **IO 控制** | `set_digital_out()` | ✅ |\n| **状态读取** | RTDE 数据订阅 | ✅ |\n| **力控模式** | `force_mode()` | ✅ |\n\n---\n\n## 🔄 仿真 → 真机迁移指南\n\n### 配置修改\n\n```python\n# 仿真配置 (当前默认)\nROBOT_HOST = \"localhost\"\n\n# 真机配置 (需要修改)\nROBOT_HOST = \"192.168.1.100\"  # 机器人实际 IP\n```\n\n### 安全参数调整\n\n| 参数 | 仿真值 | 真机建议值 |\n|------|--------|------------|\n| 速度 (v) | 0.5 m\u002Fs | 0.1-0.3 m\u002Fs |\n| 加速度 (a) | 0.2 m\u002Fs² | 0.1-0.2 m\u002Fs² |\n| 工作范围检查 | 不需要 | 必须 |\n| 急停确认 | 不需要 | 必须 |\n\n### 真机使用流程\n\n```bash\n# 1. 网络连接确认\nping 192.168.1.100\n\n# 2. 修改配置文件\n# 编辑 robot_config.json 设置真机 IP\n\n# 3. 低速测试\npython skills\u002Fur-robot\u002Fexamples\u002Freal_robot_test.py\n\n# 4. 确认安全后正式运行\n```\n\n### 推荐添加的安全检查\n\n```python\n# 真机专用安全检查脚本\ndef safety_check_before_move():\n    \"\"\"真机运动前安全检查\"\"\"\n    # 1. 确认机器人状态\n    # 2. 确认工作范围\n    # 3. 确认急停按钮可用\n    # 4. 确认人员安全距离\n    # 5. 人工确认签字\n    pass\n```\n\n---\n\n## 🚀 快速开始\n\n### 1. 启动 URSim 仿真器\n\n```bash\ndocker run -d --name ursim \\\n  -p 6080:6080 -p 5900:5900 \\\n  -p 30001:30001 -p 30002:30002 \\\n  -p 30003:30003 -p 30004:30004 \\\n  universalrobots\u002Fursim_e-series\n```\n\n### 2. 访问 URSim Web 界面\n\n```\nhttp:\u002F\u002Flocalhost:6080\u002Fvnc.html\n```\n\n### 3. 初始化机器人\n\n1. 点击 **ON** 按钮（启动电源）\n2. 点击 **START** 按钮（启动程序）\n3. 点击 **Program** → **Empty Program**\n4. 点击 **Play** (▶) 按钮\n\n### 4. 运行测试脚本\n\n```bash\n# 关节运动测试\npython skills\u002Fur-robot\u002Ftest_motion_simple.py\n\n# RTDE 数据读取\npython skills\u002Fur-robot\u002Ftest_rtde_official.py\n\n# 连续运动测试\npython skills\u002Fur-robot\u002Ftest_continuous_motion.py\n```\n\n---\n\n## 📚 URScript 命令参考\n\n### 运动控制\n\n#### `movej()` - 关节空间运动\n\n```python\n# 语法\nmovej(q, a=1.4, v=1.05, t=0, r=0)\n\n# 参数\n# q      - 关节角度 [J1, J2, J3, J4, J5, J6] (弧度)\n# a      - 关节加速度 (rad\u002Fs²)\n# v      - 关节速度 (rad\u002Fs)\n# t      - 时间 (s)，为 0 表示不限制\n# r      -  blends 半径 (m)\n\n# 示例：移动到 Home 位置\nmovej([0, -1.57, 1.57, -1.57, -1.57, 0], a=0.5, v=0.5)\n\n# 示例：J1 旋转 30 度\nmovej([0.52, 0, 0, 0, 0, 0], a=0.3, v=0.3)\n```\n\n#### `movel()` - 笛卡尔空间直线运动\n\n```python\n# 语法\nmovel(pose, a=1.2, v=0.25, t=0, r=0)\n\n# 参数\n# pose   - TCP 位姿 [x, y, z, rx, ry, rz] (米和弧度)\n# a      - 笛卡尔加速度 (m\u002Fs²)\n# v      - 笛卡尔速度 (m\u002Fs)\n\n# 示例：直线移动到目标位置\nmovel([0.3, 0.3, 0.5, 3.14, 0, 0], a=0.2, v=0.2)\n\n# 示例：相对当前位置移动 (+200mm X 轴)\nmovel(pose_trans(get_actual_tcp_pose(), p[0.2, 0, 0, 0, 0, 0]), a=0.2, v=0.2)\n```\n\n#### `movec()` - 圆弧运动\n\n```python\n# 语法\nmovec(pose_via, pose_to, a=1.2, v=0.25, t=0, r=0)\n\n# 参数\n# pose_via - 圆弧经过的中间点\n# pose_to  - 圆弧终点\n\n# 示例：画圆弧\nmovec(p[0.5, 0, 0.3, 0, 3.14, 0], p[0.6, 0, 0.2, 0, 3.14, 0], a=0.2, v=0.2)\n```\n\n#### `speedj()` - 关节速度控制\n\n```python\n# 语法\nspeedj(qd, a=1.4, t=0)\n\n# 参数\n# qd     - 关节速度 [J1, J2, J3, J4, J5, J6] (rad\u002Fs)\n# a      - 关节加速度 (rad\u002Fs²)\n# t      - 持续时间 (s)，为 0 表示持续运行\n\n# 示例：J1 轴以 0.5 rad\u002Fs 旋转 3 秒\nspeedj([0.5, 0, 0, 0, 0, 0], a=0.5, t=3)\n\n# 示例：停止关节运动\nstopj(a=0.5)\n```\n\n#### `speedl()` - 笛卡尔速度控制\n\n```python\n# 语法\nspeedl(xd, a=1.2, t=0)\n\n# 参数\n# xd     - TCP 速度 [xd, yd, zd, rxd, ryd, rzd] (m\u002Fs, rad\u002Fs)\n\n# 示例：TCP 沿 X 轴以 0.1 m\u002Fs 移动 2 秒\nspeedl([0.1, 0, 0, 0, 0, 0], a=0.2, t=2)\n```\n\n---\n\n### IO 控制\n\n#### `set_digital_out()` - 设置数字输出\n\n```python\n# 语法\nset_digital_out(pin, state)\n\n# 参数\n# pin    - 引脚编号 (0-7 基础 IO, 8-15 工具 IO)\n# state  - True (高电平) \u002F False (低电平)\n\n# 示例：设置数字输出 0 为高电平\nset_digital_out(0, True)\n\n# 示例：关闭数字输出 0\nset_digital_out(0, False)\n\n# 示例：控制工具端数字输出\nset_tool_digital_out(0, True)\n```\n\n#### `get_digital_in()` - 读取数字输入\n\n```python\n# 语法\nstate = get_digital_in(pin)\n\n# 示例：读取数字输入 0\ninput_state = get_digital_in(0)\n```\n\n---\n\n### 力控模式\n\n#### `force_mode()` - 力控制\n\n```python\n# 语法\nforce_mode(task_frame, selection_vector, wrench, type, limits)\n\n# 参数\n# task_frame       - 任务坐标系 [x, y, z, rx, ry, rz]\n# selection_vector - 选择向量 [x, y, z, rx, ry, rz] (1=力控，0=位置控)\n# wrench          - 目标力\u002F力矩 [Fx, Fy, Fz, Mx, My, Mz] (N, Nm)\n# type            - 控制类型 (2=恒力模式)\n# limits          - 速度\u002F加速度限制\n\n# 示例：Z 轴向下 5N 恒力\nforce_mode(p[0,0,0,0,0,0], [0,0,1,0,0,0], [0,0,-5,0,0,0], 2, [0.1,0.1,0.1,0.1,0.1,0.1])\n\n# 退出力控模式\nend_force_mode()\n```\n\n---\n\n### 状态读取\n\n#### 通过 RTDE 读取\n\n```python\nimport rtde.rtde as rtde\n\n# 连接\ncon = rtde.RTDE(\"localhost\", 30004)\ncon.connect()\n\n# 设置输出\ncon.send_output_setup([\"actual_q\", \"actual_TCP_pose\"], frequency=10)\n\n# 开始同步\ncon.send_start()\n\n# 读取数据\ndata = con.receive()\nprint(\"关节角度:\", data.actual_q)\nprint(\"TCP 位姿:\", data.actual_TCP_pose)\n\n# 暂停\u002F断开\ncon.send_pause()\ncon.disconnect()\n```\n\n#### 通过 URScript 读取\n\n```python\n# 获取当前 TCP 位姿\npose = get_actual_tcp_pose()\n\n# 获取当前关节角度\nangles = get_actual_q()\n\n# 获取关节速度\nspeeds = get_speed_q()\n\n# 获取关节电流\ncurrents = get_current()\n\n# 获取 TCP 受力\nforces = get_tcp_force()\n```\n\n---\n\n## 🛠️ Python 工具函数\n\n### 发送 URScript 命令\n\n```python\nimport socket\n\ndef send_urscript(host=\"localhost\", port=30003, command=\"\"):\n    \"\"\"发送 URScript 命令到机器人\"\"\"\n    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n    sock.settimeout(5.0)\n    try:\n        sock.connect((host, port))\n        full_command = command + \"\\n\"\n        sock.sendall(full_command.encode('utf-8'))\n        time.sleep(0.1)\n        response = sock.recv(1024).decode('utf-8', errors='ignore')\n        return True, response\n    except Exception as e:\n        return False, str(e)\n    finally:\n        sock.close()\n\n# 使用示例\nsuccess, response = send_urscript(command=\"movej([0, -1.57, 1.57, -1.57, -1.57, 0], a=0.5, v=0.5)\")\n```\n\n### 关节运动封装\n\n```python\ndef move_to_home():\n    \"\"\"移动到 Home 位置\"\"\"\n    send_urscript(\"movej([0, -1.57, 1.57, -1.57, -1.57, 0], a=0.5, v=0.5)\")\n\ndef move_joints(j1, j2, j3, j4, j5, j6, a=0.5, v=0.5):\n    \"\"\"关节空间运动\"\"\"\n    cmd = \"movej([{}, {}, {}, {}, {}, {}], a={}, v={})\".format(\n        j1, j2, j3, j4, j5, j6, a, v\n    )\n    send_urscript(cmd)\n\ndef move_linear(x, y, z, rx, ry, rz, a=0.2, v=0.2):\n    \"\"\"笛卡尔空间直线运动\"\"\"\n    cmd = \"movel([{}, {}, {}, {}, {}, {}], a={}, v={})\".format(\n        x, y, z, rx, ry, rz, a, v\n    )\n    send_urscript(cmd)\n```\n\n---\n\n## 📊 端口说明\n\n| 端口 | 协议 | 用途 |\n|------|------|------|\n| 6080 | HTTP | Web VNC 界面 |\n| 5900 | VNC | 远程桌面 |\n| 30001 | RTDE | 主客户端接口 |\n| 30002 | RTDE | 实时客户端接口 |\n| 30003 | TCP | Secondary 客户端 (URScript) |\n| 30004 | RTDE | RTDE 数据接口 |\n\n---\n\n## ⚠️ 注意事项\n\n### 安全\n\n1. **测试前确保在仿真环境** - 真机操作需要额外的安全措施\n2. **运动范围限制** - 确保目标位置在机器人工作范围内\n3. **速度设置** - 测试时使用较低速度 (v=0.2-0.5)\n4. **急停准备** - 随时准备点击 URSim 的停止按钮\n\n### URSim 使用\n\n1. **程序模式** - 必须点击 Play 按钮启动程序\n2. **外部命令** - 通过 30003 端口发送 URScript\n3. **程序停止** - 每次命令执行后程序可能停止，需要重新启动\n4. **持续运行程序** - 创建 `endless + wait(0.1)` 循环程序可避免频繁重启\n\n### 常见问题\n\n| 问题 | 原因 | 解决方法 |\n|------|------|----------|\n| 机器人不动 | 程序未运行 | 点击 Play 按钮 |\n| 连接失败 | 端口未映射 | 检查 Docker 端口配置 |\n| 命令不执行 | 保护状态 | 重置安全状态 |\n| 运动异常 | 奇异点 | 避开奇异点位置 |\n\n---\n\n## 📁 文件结构\n\n```\nskills\u002Fur-robot\u002F\n├── SKILL.md                      # 技能文档 (本文件)\n├── README.md                     # 快速入门\n├── URSIM_TEST_GUIDE.md           # URSim 测试指南\n├── URSCRIPT_FEATURES.md          # URScript 功能清单\n├── test_motion_simple.py         # 简单运动测试\n├── test_rtde_official.py         # RTDE 数据读取测试\n├── test_continuous_motion.py     # 连续运动测试\n├── test_ur_real.py               # 真机测试 (待开发)\n├── ur_robot.py                   # Python 封装库\n└── examples\u002F\n    ├── basic_move.py             # 基础运动示例\n    └── io_control.py             # IO 控制示例\n```\n\n---\n\n## 🔗 相关资源\n\n- **UR 官方文档:** https:\u002F\u002Fwww.universal-robots.com\u002Farticles\u002Fur\u002Fprogramming\u002F\n- **URScript 手册:** https:\u002F\u002Fsdurobotics.gitlab.io\u002Fur_rtde\u002F\n- **RTDE 库:** https:\u002F\u002Fgithub.com\u002FUniversalRobots\u002FRTDE_Python_Client_Library\n- **URSim 下载:** https:\u002F\u002Fwww.universal-robots.com\u002Fdownload\u002F\n\n---\n\n## 📝 更新日志\n\n### v1.0.0 (2026-04-02)\n\n- ✅ URSim Docker 配置完成\n- ✅ rtde 模块安装 (UR 官方库)\n- ✅ URScript 命令发送 (端口 30003)\n- ✅ 关节运动 `movej()` 测试\n- ✅ 直线运动 `movel()` 测试\n- ✅ 圆弧运动 `movec()` 测试\n- ✅ 速度控制 `speedj()` 测试\n- ✅ IO 控制 `set_digital_out()` 测试\n- ✅ RTDE 状态读取测试\n- ✅ 力控模式 `force_mode()` 测试\n\n---\n\n*Created: 2026-04-02*  \n*Author: 小橙 (Little Orange) 🍊*\n",{},"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fu\u002Fur-robot",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill ur-robot",{"tool":37,"command":38},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill ur-robot",{"tool":40,"command":41},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill ur-robot","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fu\u002Fur-robot\u002FSKILL.md",true,[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]