Skip to content

gli-sdk/GHand-ROS2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

105 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

GHand-ROS2

Version License ROS 2 C++ Python

็ฎ€ไฝ“ไธญๆ–‡

GHand-ROS2 is a ROS 2 control stack for the GHand five-finger dexterous hand, built on the ros2_control framework. It supports Gazebo physical simulation, MoveIt 2 motion planning, and multiple real-hardware communication backends (EtherCAT, CANFD, RS485), enabling algorithm development and visualization verification without hardware.

๐ŸŽฌ Demo

MoveIt Motion Planning

MoveIt Simulation Demo

Gazebo Simulation

Gazebo Simulation Demo

โœจ Features

  • Multi-backend hardware drivers

    • Supports EtherCAT, CANFD, and RS485 communication.
    • Switch backend and device configuration with a single profile argument.
    • Unified hardware abstraction layer with consistent interfaces for real and mock hardware.
  • ros2_control integration

    • Implements hardware_interface::SystemInterface lifecycle management.
    • Cyclic read/write of joint commands and states; supports position, velocity, and effort control modes.
  • Custom broadcasters

    • joint_status_broadcaster publishes joint status and error codes.
    • tactile_broadcaster publishes tactile resultant force and distributed forces.
  • Simulation and motion planning

    • Built-in Gazebo Harmonic launch files and ROS 2 Control plugin configuration.
    • Built-in MoveIt 2 configuration for trajectory planning and execution in RViz.
  • Scenario-based launch

    • ghand_hardware_interface handles real / mock hardware launch.
    • ghand_gazebo handles physical simulation launch; the two are decoupled.

๐Ÿ“– Official Documentation

For detailed technical specifications, API reference, and tutorials, see the GHand Dexterous Hand Documentation.

๐Ÿ“‘ Table of Contents

๐Ÿ’ป System Requirements

Supported Platforms

Platform Requirement
Operating System Ubuntu 24.04 LTS
ROS 2 Jazzy Jalisco
Compiler GCC 11+ (C++17 support)
Python 3.10 or newer
Simulator Gazebo Harmonic (required for physical simulation)

๐Ÿ”ง Dependencies

Required Dependencies

sudo apt update
sudo apt install -y \
  ros-${ROS_DISTRO}-ros2-control \
  ros-${ROS_DISTRO}-ros2-controllers \
  ros-${ROS_DISTRO}-moveit \
  ros-${ROS_DISTRO}-joint-state-publisher-gui \
  ros-${ROS_DISTRO}-rviz2

Replace ${ROS_DISTRO} with jazzy.

Optional Hardware Dependencies

Only needed when connecting to real hardware; pure simulation development can skip these.

Backend Dependency / Library Notes
EtherCAT libsoem / SOEM Build from source; CMake auto-detects
RS485 libmodbus System package
CANFD ZLG CAN SDK ZLG USB-CANFD library

๐Ÿ“ฆ Installation

1. Environment Setup

# Verify ROS 2 environment
echo $ROS_DISTRO  # should output: jazzy

# Create workspace
mkdir -p <workspace>/src
cd <workspace>

Note: Replace <workspace> with your workspace path, e.g., ~/ghand-ros2.

2. Clone the Repository

# Enter workspace src directory
cd <workspace>/src

# Clone the main repository
git clone https://gitee.com/glitech/ghand-ros2.git

3. Import External Dependencies

The URDF/Xacro and STL meshes for ghand_description are provided by external repositories. Import them via ghand.repos:

cd <workspace>/src
vcs import . < ghand-ros2/ghand.repos --recursive --skip-existing

Note: If vcs is not installed, install it first:

sudo apt-get install python3-vcstool

4. Build

cd <workspace>
colcon build --symlink-install
source install/setup.bash

For mock-hardware-only builds, you can also use:

cd <workspace>
./src/ghand-ros2/build.sh
source install/setup.bash

๐Ÿš€ Quick Start

Launch Simulation (No Hardware Required)

ros2 launch ghand_hardware_interface ghand.launch.py use_mock_hardware:=true

Simulation mode uses mock_components/GenericSystem and requires no hardware devices.

Launch Real Hardware

ros2 launch ghand_hardware_interface ghand.launch.py profile:=ethercat_default ifname:=enx000000000000

Replace enx000000000000 with your actual EtherCAT network interface name. Use ip link to list available interfaces.

Available communication profiles are located at ghand_hardware/ghand_hardware_interface/config/profiles/ and include ethercat_default, rs485_left, rs485_right, canfd_usb, zqwl_canfd_left, and zqwl_canfd_right.

Launch MoveIt 2

ros2 launch ghand_moveit_config moveit.launch.py

For EtherCAT real hardware, also provide ifname:

ros2 launch ghand_moveit_config moveit.launch.py use_sim:=false profile:=ethercat_default ifname:=enx000000000000

Launch Gazebo Simulation

ros2 launch ghand_gazebo ghand_gazebo.launch.py

After launch, you can plan trajectories in RViz using the MotionPlanning plugin; trajectories are sent to the joint_trajectory_controller running in Gazebo.

๐ŸŽฎ Control Interfaces

Topic Interfaces

  • Joint States: /joint_states (sensor_msgs/JointState)
  • Joint Status / Error Codes: /joint_status_broadcaster/joint_status (hand_msgs/JointStatus)
  • Tactile Feedback: /tactile_broadcaster/tactile_data (hand_msgs/TactileData)
  • Trajectory Commands: /joint_trajectory_controller/joint_trajectory (trajectory_msgs/JointTrajectory)

Action Interfaces

  • Trajectory Execution: /joint_trajectory_controller/follow_joint_trajectory (control_msgs/action/FollowJointTrajectory)

Control Examples

Start the hardware or simulation first:

# mock hardware
ros2 launch ghand_hardware_interface ghand.launch.py use_mock_hardware:=true

# or Gazebo simulation
ros2 launch ghand_gazebo ghand_gazebo.launch.py

Open Palm

ros2 topic pub --once /joint_trajectory_controller/joint_trajectory \
  trajectory_msgs/msg/JointTrajectory \
  '{
    joint_names: ["thumb_mcp", "thumb_tmc_fe", "thumb_tmc_aa", "thumb_tmc_ps",
                  "index_pip", "index_mcp", "index_mcp_aa",
                  "middle_pip", "middle_mcp",
                  "ring_pip", "ring_mcp",
                  "little_pip", "little_mcp"],
    points: [{
      positions: [0.0, 0.0, 0.349, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
      time_from_start: {sec: 1}
    }]
  }'

Make Fist

ros2 topic pub --once /joint_trajectory_controller/joint_trajectory \
  trajectory_msgs/msg/JointTrajectory \
  '{
    joint_names: ["thumb_mcp", "thumb_tmc_fe", "thumb_tmc_aa", "thumb_tmc_ps",
                  "index_pip", "index_mcp", "index_mcp_aa",
                  "middle_pip", "middle_mcp",
                  "ring_pip", "ring_mcp",
                  "little_pip", "little_mcp"],
    points: [{
      positions: [0.5, 0.0, 0.349, 0.5, 1.2, 1.2, 0.0, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2],
      time_from_start: {sec: 2}
    }]
  }'

Monitoring and Debugging

# List all running nodes
ros2 node list

# List all controllers
ros2 control list_controllers

# List all topics
ros2 topic list

# Monitor joint states
ros2 topic echo /joint_states

๐Ÿ“ Directory Structure

GHand-Ros2/
โ”œโ”€โ”€ ghand_hardware/
โ”‚   โ”œโ”€โ”€ ghand_hardware_interface/   # Hardware interface and comm drivers
โ”‚   โ”œโ”€โ”€ hand_controllers/           # Custom broadcasters
โ”‚   โ””โ”€โ”€ hand_msgs/                  # Custom message types
โ”œโ”€โ”€ ghand_moveit_config/            # MoveIt 2 configuration
โ”œโ”€โ”€ ghand_gazebo/                   # Gazebo physical simulation
โ”œโ”€โ”€ ghand_description/              # Robot description model
โ”œโ”€โ”€ CHANGELOG.md                    # Version history
โ”œโ”€โ”€ LICENSE                         # Apache License 2.0
โ”œโ”€โ”€ README.md                       # This file
โ””โ”€โ”€ README_CN.md                    # Chinese README

๐ŸŒ Open Source and Ecosystem Resources

๐Ÿ“‹ Changelog

See CHANGELOG.md.

๐Ÿ“ž Support and Feedback

  • ๐Ÿ“‹ Technical support: For project-related questions, please open an Issue in this repository.
  • ๐Ÿ“ง General inquiries: support@glitech.com

๐Ÿ“„ License

This project is open-sourced under the Apache License 2.0.

Copyright ยฉ 2026 GHand ROS2 Maintainers.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors