Skip to main content

RealHand-Python-SDK

Overview

RealHand Python SDK

English

Caution

  • Please ensure that the dexterous hand is not running any other control methods, such as real_hand_sdk_ros, motion capture glove control, or other topics controlling the hand, to avoid conflicts.
  • Please secure the dexterous hand to prevent it from falling during movement.
  • Please ensure the dexterous hand's power and USB-to-CAN connection are correct.
Name Version Link
Python SDK SDK Version Python 3.8+ Windows 11 Ubuntu 20.04+ GitHub
ROS SDK SDK Version Python 3.8+ Ubuntu 20.04+ ROS Noetic GitHub
ROS2 SDK SDK Version Python 3.11 Ubuntu 24.04 ROS 2 Jazzy Windows 11 GitHub 仓库

Installation

  You can run the examples after installing the dependencies in requirements.txt. Only Python 3 is supported.

  • download
$ git clone https://github.com/XXXXXXDU/realhand-ros2-sdk.git
  • install
$ pip3 install -r requirements.txt

RS485 Protocol Switching (Currently supports O6/L6/L10. For other models, please refer to the MODBUS RS485 protocol document)

Edit the config/setting.yaml configuration file and modify the parameters according to the comments inside. Set MODBUS: "/dev/ttyUSB0", meaning the "modbus" parameter in the configuration file should be "/dev/ttyUSB0". The USB-RS485 converter usually appears as /dev/ttyUSB* or /dev/ttyACM* on Ubuntu. modbus: "None" or "/dev/ttyUSB0"

# Ensure requirements.txt dependencies are installed
# Install system-level related drivers
$ pip install minimalmodbus --break-system-packages
$ pip install pyserial --break-system-packages
$ pip install pymodbus --break-system-packages
# View the USB-RS485 port number
$ ls /dev
# You should see a port similar to ttyUSB0. Grant permissions to the port:
$ sudo chmod 777 /dev/ttyUSB0
# GUI control example
$ python3 example/gui_control/gui_control.py

Real Hand API for Python Document

Update Log

  • release_3.0.1

  • 1、Supports O6/L6/L10 RS485 communication in pymodbus mode.

  • release_2.2.4

  • 1、Added support for G20 industrial version dexterous hand.

  • 2、Redrew the GUI.

  • release_2.1.9

  • 1、Added support for O6 dexterous hand.

  • release_2.1.8

  • 1、Fixed occasional frame collision issue.

  • Position and Finger Joint Correspondence Table

    O6: ["Thumb Flexion", "Thumb Adduction/Abduction","Index Finger Flexion", "Middle Finger Flexion", "Ring Finger Flexion","Pinky Finger Flexion"]

    L6: ["Thumb Flexion", "Thumb Adduction/Abduction","Index Finger Flexion", "Middle Finger Flexion", "Ring Finger Flexion","Pinky Finger Flexion"]

    L7: ["Thumb Flexion", "Thumb Adduction/Abduction","Index Finger Flexion", "Middle Finger Flexion", "Ring Finger Flexion","Pinky Finger Flexion","Thumb Rotation"]

    L10: ["Thumb CMC Pitch", "Thumb Adduction/Abduction","Index Finger MCP Pitch", "Middle Finger MCP Pitch", "Ring Finger MCP Pitch","Pinky Finger MCP Pitch","Index Finger Adduction/Abduction","Ring Finger Adduction/Abduction","Pinky Finger Adduction/Abduction","Thumb Rotation"]

    L20: ["Thumb CMC Pitch", "Index Finger MCP Pitch", "Middle Finger MCP Pitch", "Ring Finger MCP Pitch","Pinky Finger MCP Pitch","Thumb Adduction/Abduction","Index Finger Adduction/Abduction","Middle Finger Adduction/Abduction","Ring Finger Adduction/Abduction","Pinky Finger Adduction/Abduction","Thumb CMC Yaw","Reserved","Reserved","Reserved","Reserved","Thumb Distal Tip","Index Finger Distal Tip","Middle Finger Distal Tip","Ring Finger Distal Tip","Pinky Finger Distal Tip"]

    G20: ["Thumb CMC Pitch", "Index Finger MCP Pitch", "Middle Finger MCP Pitch", "Ring Finger MCP Pitch","Pinky Finger MCP Pitch","Thumb Adduction/Abduction","Index Finger Adduction/Abduction","Middle Finger Adduction/Abduction","Ring Finger Adduction/Abduction","Pinky Finger Adduction/Abduction","Thumb CMC Yaw","Reserved","Reserved","Reserved","Reserved","Thumb Distal Tip","Index Finger Distal Tip","Middle Finger Distal Tip","Ring Finger Distal Tip","Pinky Finger Distal Tip"]

    L21: ["Thumb Base Pitch","Index Base Pitch","Middle Base Pitch","Ring Base Pitch","Pinky Base Pitch","Thumb Adduction/Abduction","Index Adduction/Abduction","Middle Adduction/Abduction","Ring Adduction/Abduction","Pinky Adduction/Abduction","Thumb Roll","Reserved","Reserved","Reserved","Reserved","Thumb Middle","Reserved","Reserved","Reserved","Reserved","Thumb Tip","Index Tip","Middle Tip","Ring Tip","Pinky Tip"]

    L25: ["Thumb Base Pitch", "Index Base Pitch", "Middle Base Pitch","Ring Base Pitch","Pinky Base Pitch","Thumb Adduction/Abduction","Index Adduction/Abduction","Middle Adduction/Abduction","Ring Adduction/Abduction","Pinky Adduction/Abduction","Thumb Roll","Reserved","Reserved","Reserved","Reserved","Thumb Middle","Index Middle","Middle Middle","Ring Middle","Pinky Middle","Thumb Tip","Index Tip","Middle Tip","Ring Tip","Pinky Tip"]

L10 Examples

   Before running, please modify the configuration information in setting.yaml to match your actual dexterous hand configuration.

When launched, a UI interface will pop up. You can control the corresponding RealHand dexterous hand joint movements using the sliders.

  • Adding or modifying action examples. You can add or modify actions in the constants.py file.
# For example, adding action sequences for L6
"L6": HandConfig(
        joint_names_en=["thumb_cmc_pitch", "thumb_cmc_yaw", "index_mcp_pitch", "middle_mcp_pitch", "pinky_mcp_pitch", "ring_mcp_pitch"],
        joint_names=["Thumb Flexion", "Thumb Abduction", "Index Flexion", "Middle Flexion", "Ring Flexion", "Pinky Flexion"],
        init_pos=[250] * 6,
        preset_actions={
            "Open": [250, 250, 250, 250, 250, 250],
            "One": [0, 31, 255, 0, 0, 0],
            "Two": [0, 31, 255, 255, 0, 0],
            "Three": [0, 30, 255, 255, 255, 0], 
            "Four": [0, 30, 255, 255, 255, 255],
            "Five": [250, 250, 250, 250, 250, 250],
            "OK": [54, 41, 164, 250, 250, 250],
            "Thumbs Up": [255, 31, 0, 0, 0, 0],
            "Fist": [49, 61, 0, 0, 0, 0],
            # Add custom actions......
        }
    )

API Documentation

Real Hand API for Python Document

Metadata

Release files for realhand-python-sdk 0.1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for realhand-python-sdk 0.1.2.1
File Size Uploaded Provenance
realhand_python_sdk-0.1.2.1.tar.gz 52.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for realhand-python-sdk 0.1.2.1
File Interpreter ABI Platform
realhand_python_sdk-0.1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 123.4 kB

Release files / realhand_python_sdk-0.1.2.1.tar.gz

Download URL realhand_python_sdk-0.1.2.1.tar.gz
Size 52.1 kB
Tags Source
SHA-256 checksum
How to use checksums
febd9059fd7fe0301b997b9a821780be6220a6fdd4963acf0b7fac382e22f73e
BLAKE2b-256 checksum
How to use checksums
ed29a879580121376a6d605f847efd2ba7ab772c4a913c11fb100739a016fe56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / realhand_python_sdk-0.1.2.1-py3-none-any.whl

Download URL realhand_python_sdk-0.1.2.1-py3-none-any.whl
Size 71.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1646f2c5e62cd70abd583048adbf30f90bf84cd82bdcab886270f29dd681c171
BLAKE2b-256 checksum
How to use checksums
6a84fd43adf8b46e8399146d890f2373751932cee264c81cd0fb6d9bc2b45dc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for realhand-python-sdk 0.1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page