No project description provided
Project description
RealHand-Python-SDK
Overview
RealHand Python SDK
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 | ||
| ROS SDK | ||
| ROS2 SDK |
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
Related Documentation
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......
}
)
-
0001-real_hand_fast
-
0002-real_hand_finger_bend
-
0003-real_hand_fist
-
0004-real_hand_open_palm
-
0005-real_hand_opposition
-
0006-real_hand_sway
-
0007-real_hand_get_force #python3 get_force.py --hand_joint L10 --hand_type right
-
0008-real_hand_get_speed #python3 get_set_speed.py --hand_joint L10 --hand_type right --speed 100 123 211 121 222 Note: L7 has 7 speed parameters, others have 5.
-
0009-real_hand_get_state # python3 get_set_state.py --hand_joint L10 --hand_type right --position 100 123 211 121 222 255 255 255 255 255 The number of position parameters should refer to the "Position and Finger Joint Correspondence Table".
-
0010-real_hand_dynamic_grasping
API Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file realhand_python_sdk-0.1.0.tar.gz.
File metadata
- Download URL: realhand_python_sdk-0.1.0.tar.gz
- Upload date:
- Size: 48.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6778595d49f183449517c8c950564200106b248e7f85141488deb4c7e57d694
|
|
| MD5 |
d43609eba356bab0b4d1dc9f92daab1d
|
|
| BLAKE2b-256 |
8884966dbbecba7f399efbff300450c3019d367b874d03d6d1f9c5fa0874ef48
|
File details
Details for the file realhand_python_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: realhand_python_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 64.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a7d08290f4116e5a147fe978927fe7f328bec272dea9ef6e3eb4cf5cb85e64e
|
|
| MD5 |
186681af09b04b333c3bffa38fea3a26
|
|
| BLAKE2b-256 |
164fb09a5e69fce0dd259678d3e9df99ba9029086ccf502d4892a31cc2484be7
|