罗氏-莱基维-罗氏2-mcp
ROSClaw MCP服务器 乐奇移动基座+SO-101手臂 通过ROS2。
部分 ROSClaw 嵌入式智能操作系统。
概述
此MCP服务器使LLM代理能够通过模型上下文协议控制安装有SO-101 6-DOF手臂的LeKiwi全向移动机器人。它将基础运动(三轮全向驱动)与手臂操纵相结合。
LLM Agent ──MCP──► rosclaw-lekiwi-ros2-mcp ──ROS2──► lekiwi_motor_bridge ──Serial──► LeKiwi + SO-101
硬件
| 组件 | 详细信息 |
|---|
| Base | LeKiwi三轮全向(电机ID 7、8、9) |
| 臂 | SO-101 6-DOF(电机ID 1-6) |
| 伺服 | Feetech STS3215x9 |
| 协议 | ROS2通过lekiwi_motor_bridge |
| 基础控制 | /cmd_vel (扭曲) |
| 手臂控制 | /joint_commands (联合国) |
| 状态反馈 | /joint_states (联合国) |
安装
source /opt/ros/jazzy/setup.bash
# Install SO-101 dependency first
cd ../rosclaw-so101-ros2-mcp && pip install -e .
# Install this package
cd ../rosclaw-lekiwi-ros2-mcp && pip install -e .
先决条件
这个 lekiwi_motor_bridge 节点必须在启用SO-101的情况下运行:
ros2 run lekiwi_hw_interface lekiwi_motor_bridge --ros-args \
-p port:=/dev/ttyACM0 \
-p use_so101:=true
作为MCP服务器运行
source /opt/ros/jazzy/setup.bash
python src/lekiwi_mcp_server.py
可用工具
连接
| 工具 | 说明 |
|---|
connect_lekiwi | 通过ROS2连接到LeKiwi |
disconnect_lekiwi | 断开连接 |
基本控制
| 工具 | 说明 |
|---|
move_base | 以一定速度移动基座一段时间,然后停止 |
stop_base | 立即停止基地 |
手臂控制
| 工具 | 说明 |
|---|
move_arm_to_home | 将手臂移到零位 |
move_arm_joint | 移动单个关节 |
move_arm_joints | 同时移动多个关节 |
open_gripper | 打开夹持器 |
close_gripper | 闭合夹持器 |
stop_arm | 将手臂保持在当前位置 |
组合的
| 工具 | 说明 |
|---|
stop_all | 停止底座和手臂 |
get_robot_state | 获得完整状态(手臂+底座) |
可用资源
| 资源 | 描述 |
|---|
lekiwi://status | 手臂位置、夹具、轮子位置 |
lekiwi://joints | 手臂关节限制+基础速度限制 |
lekiwi://connection | ROS2连接状态 |
基准参考
| 参数 | 值 |
|---|
| 最大线速度 | 0.3 m/s |
| 最大角速度 | 1.57 rad/s(~90度/s) |
| 车轮半径 | 0.054米 |
| 基底半径 | 0.125米 |
| 驱动类型 | 3轮全向 |
臂参考(SO-101)
| 关节 | 范围(rad) | 电机ID |
|---|
| 肩盘 | -2.055至+2.058 | 1 |
| 肩举 | -2.018至+2.018 | 2 |
| elbow_flex | -1.653到+1.654 | 3 |
| wrist_flex | -1.786到+1.790 | 4 |
| 腕卷 | -3.194至+4.120 | 5 |
| 夹持器 | -0.175至+1.745 | 6 |
建筑
lekiwi_mcp_server.py
├── OmniBaseKinematics — 3-wheel forward/inverse kinematics
├── LeKiwiState — Combined base + arm state dataclass
├── LeKiwiROS2Bridge — ROS2 Node (extends rclpy.Node)
│ ├── _joint_state_callback() — /joint_states (arm + wheels)
│ ├── publish_base_velocity() — /cmd_vel publisher
│ ├── publish_arm_command() — /joint_commands publisher
│ ├── validate_base_velocity() — Speed limit check
│ └── validate_arm_positions() — Delegates to SO101ROS2Bridge
└── MCP Tools — FastMCP tool definitions
Depends on: rosclaw-so101-ros2-mcp (SO101ROS2Bridge, SO101State)
许可证
Apache 2.0
ROSClaw的一部分