Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

rosclaw-inspire-rh56-mcp

๐ŸŒ English | ไธญๆ–‡

ROSClaw MCP Server for Inspire Robots RH56 Series Dexterous Hand using CAN 2.0B protocol.

Part of the ROSClaw Embodied Intelligence Operating System.

Overview

This MCP server enables LLM agents to control the Inspire Robots RH56 dexterous five-finger hand through the Model Context Protocol. It provides direct CAN bus communication for real-time finger control.

LLM Agent  โ”€โ”€MCPโ”€โ”€โ–บ  rosclaw-inspire-rh56-mcp  โ”€โ”€CANโ”€โ”€โ–บ  RH56 Hand

SDK Information

Property Value
SDK Name Inspire RH56 Dexterous Hand SDK
SDK Version V1.09 (User Manual) / V0.0.2 (CAN Protocol)
Protocol CAN 2.0B (Extended Frame, 29-bit ID)
Baudrate 1 Mbps
Source Inspire Robots
Documentation See References below
License Proprietary (Hardware Purchase)
Generated 2026-04-07

Hardware Specification

Specification Value
Models RH56DFX (standard), RH56BFX (tactile), RH56DFX-2R (with wrist)
Fingers 5 (Thumb, Index, Middle, Ring, Little)
Total Joints 11
Thumb Joints 3 DOF
Other Fingers 2 DOF each
Communication CAN 2.0B, 1 Mbps
Control Modes Position, Force, Current
Position Range 0-65535 (16-bit)
Force Range 0-4095 (12-bit)
Current Range 0-4095 (12-bit, represents mA)

Finger Configuration

Finger Joints Description
Thumb 3 Base rotation, proximal, distal
Index 2 Proximal, distal
Middle 2 Proximal, distal
Ring 2 Proximal, distal
Little 2 Proximal, distal

Position Convention

Value Typical Meaning
0 Fully closed
65535 Fully open
32768 Middle position

Note: Actual mechanical limits may vary by finger

Features

Category Tools
Connection connect_hand, disconnect_hand
Hand Info get_hand_info, get_finger_status, get_joint_positions
Sensor Data get_sensor_data, check_temperature
Finger Control set_finger_position, set_finger_force, set_finger_current
Coordinated Control set_all_fingers
Predefined Grasps grasp_open, grasp_close, grasp_pinch, grasp_cylindrical, grasp_spherical
Safety check_faults, clear_faults, emergency_stop, check_temperature
Configuration set_control_mode, set_device_id, save_configuration
SDK Info get_sdk_info

MCP Resources: hand://status, hand://connection, hand://sdk_info, hand://safety_limits

Quick Start

Prerequisites

# Install python-can for CAN bus communication
pip install python-can mcp

# Setup CAN interface (Linux)
sudo ip link set can0 up type can bitrate 1000000

Run MCP Server

# Run MCP server
python src/inspire_rh56_mcp_server.py

# Or with uv
uv venv --python 3.11
source .venv/bin/activate
uv pip install python-can mcp
python src/inspire_rh56_mcp_server.py

Claude Desktop Configuration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "rosclaw-inspire-rh56": {
      "command": "python",
      "args": ["/path/to/rosclaw-inspire-rh56-mcp/src/inspire_rh56_mcp_server.py"],
      "transportType": "stdio",
      "description": "Inspire RH56 Dexterous Hand via CAN",
      "sdk_version": "V1.09",
      "sdk_source": "http://www.inspire-robots.com/"
    }
  }
}

LLM Usage Examples

Basic Connection and Finger Control

User: Connect to the RH56 hand and move the index finger to half open.

LLM calls:
1. connect_hand("can0", 1)
2. set_finger_position("Index", 32768, speed=200, force=200)

Predefined Grasps

User: Perform a pinch grasp to pick up a small object.

LLM calls:
1. connect_hand("can0", 1)
2. grasp_pinch(speed=150)
3. get_finger_status()  # Verify grasp

Force Control for Delicate Objects

User: Gently grasp a fragile object using force control.

LLM calls:
1. connect_hand("can0", 1)
2. set_control_mode("Force")
3. set_all_fingers({
       "Thumb": 10000,
       "Index": 10000,
       "Middle": 10000,
       "Ring": 10000,
       "Little": 10000
   }, speed=100)
4. set_finger_force("Thumb", 500)    # Low force
5. set_finger_force("Index", 500)

Safety Monitoring

User: Check if the hand is operating safely.

LLM calls:
1. connect_hand("can0", 1)
2. check_temperature()  # Check for overheating
3. check_faults()       # Check for any faults
4. get_sensor_data()    # Full diagnostic

Safety Information

WARNING: This MCP server controls a dexterous robotic hand. Improper use can cause:

  • Equipment damage
  • Damage to grasped objects
  • Mechanical wear

Safety Features

Feature Description
Position Limits 0-65535 enforced
Force Limits 0-4095 with configurable max
Current Limits 0-4095 with thermal protection
Temperature Monitoring Automatic warning at 60ยฐC, critical at 80ยฐC
Fault Detection Overcurrent, overtemperature, position limits
Emergency Stop Immediate halt of all motion

Safety Levels

Level Color Description Example
CRITICAL ๐Ÿ”ด Immediate danger Overtemperature >80ยฐC, overcurrent
HIGH ๐ŸŸ  Potential damage Temperature >60ยฐC, excessive force
MEDIUM ๐ŸŸก Caution needed High-speed motion, force control active
LOW ๐ŸŸข Informational Normal operation

Emergency Procedures

  1. Immediate Stop: Call emergency_stop() or power off CAN interface
  2. Fault Recovery: Check check_faults(), then clear_faults()
  3. Overheating: Stop operation, allow cooling, check check_temperature()

Error Handling

Error Codes

Code Name Severity Description
-1 CONNECTION_FAILED ๐ŸŸ  error CAN interface not available
-2 TIMEOUT ๐ŸŸ  error Hand not responding
-3 INVALID_PARAMETER ๐ŸŸ  error Invalid finger name or position
-4 SAFETY_VIOLATION ๐Ÿ”ด critical Position/force/current out of limits
-5 FAULT_ACTIVE ๐ŸŸ  error Hand has active fault condition
-6 NOT_INITIALIZED ๐ŸŸ  error Not connected to hand

Fault Codes

Code Description Action
0x00 No fault None
0x01 Overcurrent Reduce load, check for obstruction
0x02 Overtemperature Allow cooling, reduce duty cycle
0x04 Position limit exceeded Re-calibrate, check mechanics
0x08 Communication timeout Check CAN wiring, retry
0x10 Motor fault Power cycle, check motor
0x20 Sensor fault Contact manufacturer

Troubleshooting

Issue Possible Cause Solution
Connection failed CAN interface down sudo ip link set can0 up
Connection failed Wrong device ID Check dip switches on hand
No response Incorrect baudrate Verify 1 Mbps setting
Jerky motion Insufficient speed Increase speed parameter
Weak grasp Force limit too low Increase force parameter
Overheating Excessive duty cycle Add cooling, reduce speed

Hardware Requirements

  • Inspire Robots RH56 Hand: RH56DFX or RH56BFX
  • CAN Interface: USB-CAN adapter (e.g., Peak PCAN, Kvaser, or SocketCAN compatible)
  • Power Supply: 24V DC, 5A minimum
  • Communication: CAN bus cable with 120ฮฉ termination

Wiring

PC/USB-CAN Adapter          RH56 Hand Controller
     โ”‚                              โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ CAN_H โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ CAN_L โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ GND โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Power Supply (24V DC)
     โ”‚
     โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€ 24V โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Hand Power
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€ GND โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

CAN Setup (Linux)

# Load CAN kernel module
sudo modprobe can
sudo modprobe can_raw

# Bring up CAN interface
sudo ip link set can0 up type can bitrate 1000000

# Verify
ip -details link show can0

# View CAN traffic (for debugging)
candump can0

CAN Protocol Specification

Frame Format

  • Protocol: CAN 2.0B Extended Frame
  • ID Length: 29 bits
  • Baudrate: 1 Mbps
  • Data Length: 0-8 bytes

CAN ID Structure

Bit 28-21: Command Type (8 bits)
Bit 20-14: Reserved (7 bits, set to 0)
Bit 13-7:  Target Device ID (7 bits, 1-127)
Bit 6-0:   Source Device ID (7 bits, 0=master)

Command IDs

Command ID Description
HAND_INFO 0x50 Query hand information
HAND_CONTROL 0x51 Control all fingers
FINGER_CONTROL 0x52 Control single finger
STATUS_QUERY 0x53 Query status
PARAM_SET 0x54 Set parameter
PARAM_GET 0x55 Get parameter
FAULT_CLEAR 0x56 Clear faults
EMERGENCY_STOP 0x57 Emergency stop
DEVICE_ID_SET 0x58 Set device ID
SAVE_CONFIG 0x59 Save configuration

Response IDs

Responses use command ID + 0x80:

  • HAND_INFO (0x50) โ†’ Response ID 0xD0
  • STATUS_QUERY (0x53) โ†’ Response ID 0xD3

References

Official Documentation

  1. ๅ› ๆ—ถๆœบๅ™จไบบไปฟไบบไบ”ๆŒ‡็ตๅทงๆ‰‹--RH56็”จๆˆทๆ‰‹ๅ†ŒV1.09cn_.pdf

    • Complete user manual
    • Mechanical specifications
    • Installation guide
  2. ๅ› ๆ—ถๆœบๅ™จไบบไปฟไบบไบ”ๆŒ‡็ตๅทงๆ‰‹--CANๅขž่กฅๅ่ฎฎV0.0.2cn.pdf

    • CAN protocol specification
    • Message formats
    • Command reference
  3. ๅ› ๆ—ถๆœบๅ™จไบบไปฟไบบไบ”ๆŒ‡็ตๅทงๆ‰‹ไฝฟ็”จ่ฏดๆ˜ŽV0.0.2cn.pdf

    • Operating instructions
    • Safety guidelines
    • Maintenance procedures
  4. ๅ› ๆ—ถๆœบๅ™จไบบไปฟไบบไบ”ๆŒ‡็ตๅทงๆ‰‹--ไธŠไฝๆœบๆ“ไฝœ่ฏดๆ˜ŽV0.0.1cn.pdf

    • Host software operation
    • Configuration tools
  5. ๅ› ๆ—ถๆœบๅ™จไบบไปฟไบบไบ”ๆŒ‡็ตๅทงๆ‰‹--ๅŒ่‡ช็”ฑๅบฆๆ‰‹่…•็”จๆˆทๆ‰‹ๅ†ŒV0.0.2cn.pdf

    • Wrist module documentation (for RH56DFX-2R)
  6. ๅ› ๆ—ถๆœบๅ™จไบบ็ตๅทงๆ‰‹--่งฆ่ง‰ๆ‰‹็”จๆˆทๆ‰‹ๅ†ŒV1.0.0cn.pdf

    • Tactile sensor version (RH56BFX)

External Links

Architecture

inspire_rh56_mcp_server.py
โ”œโ”€โ”€ SDK_METADATA      โ€” SDK version and source info
โ”œโ”€โ”€ RH56CANBridge     โ€” CAN communication bridge
โ”‚   โ”œโ”€โ”€ _build_can_id()      โ€” CAN ID construction
โ”‚   โ”œโ”€โ”€ connect()            โ€” CAN interface setup
โ”‚   โ”œโ”€โ”€ set_finger_position() โ€” Position control
โ”‚   โ”œโ”€โ”€ set_finger_force()    โ€” Force control
โ”‚   โ””โ”€โ”€ check_faults()       โ€” Safety monitoring
โ””โ”€โ”€ MCP Tools         โ€” FastMCP tool definitions

File Structure

rosclaw-inspire-rh56-mcp/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ inspire_rh56_mcp_server.py   # MCP server (~400 lines)
โ”‚   โ””โ”€โ”€ inspire_rh56_bridge.py       # CAN bridge (~350 lines)
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ test_inspire_rh56_bridge.py  # Unit tests
โ”œโ”€โ”€ config/
โ”‚   โ””โ”€โ”€ mcp_config.json              # MCP client configuration
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ LICENSE

Dependencies

  • Python 3.10+
  • mcp[fastmcp] โ€” MCP server framework
  • python-can โ€” CAN bus communication
  • pyserial โ€” For serial-CAN adapters

License

MIT License โ€” See LICENSE

The underlying RH56 hardware and protocol are proprietary to Inspire Robots.

Part of ROSClaw


Generated by ROSClaw SDK-to-MCP Transformer

SDK Version: RH56 V1.09 | Protocol: CAN 2.0B | Baudrate: 1 Mbps

About

ROSClaw MCP Server for Inspire Robots RH56 Dexterous Hand (CAN 2.0B)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages