ROS2 User Guide

Configuration

Launch Commands

CommandDescription
ros2 launch wujihand_bringup wujihand.launch.pyLaunch driver only
ros2 launch wujihand_bringup wujihand.launch.py rviz:=trueLaunch driver with RViz visualization
ros2 launch wujihand_bringup wujihand_dual.launch.pyLaunch and auto-connect both hands

Configurable Parameters

Handedness (left/right) is automatically detected from hardware. No manual specification required.

ParameterDefaultDescription
hand_namehand_0Namespace for distinguishing multiple hands.
Example: ros2 launch wujihand_bringup wujihand.launch.py hand_name:=my_hand
serial_number""Device serial number (auto-detect if empty)
hand_side""Connect by handedness when no serial_number: "" (unique device), left, right
name_by_handednessfalseWhen true, roots topics and services under /hand_<handedness>/, overriding hand_name. Dual-hand launch enables this automatically
publish_rate1000.0Joint state publishing rate (Hz)
filter_cutoff_freq10.0Low-pass filter cutoff frequency (Hz)
diagnostics_rate10.0Diagnostics publishing rate (Hz)
rvizfalseWhether to launch RViz visualization

Multi-hand Configuration

When controlling multiple dexterous hands simultaneously, use serial numbers and namespaces to distinguish them.

List Connected Device Serial Numbers

List the serial numbers of all WujiHand devices currently on the USB bus, then plug them into the serial_number parameter in the launch commands below:

ros2 run wujihand_driver wujihand_list

If opening a new terminal, you need to source the ROS2 environment again

# Source ROS2 environment, replace <distro> with your ROS2 distribution
source /opt/ros/<distro>/setup.bash
# If built from source, overlay the workspace (Deb package users can skip)
# Replace <workspace> with your workspace path, e.g., ~/wujihandros2
source <workspace>/install/setup.bash
# Terminal 1: Launch left hand
ros2 launch wujihand_bringup wujihand.launch.py \
    hand_name:=left_hand serial_number:=ABC123

# Terminal 2: Launch right hand
ros2 launch wujihand_bringup wujihand.launch.py \
    hand_name:=right_hand serial_number:=DEF456

Launch Both Hands with One Command

One command auto-discovers and connects every plugged-in hand — no serial numbers needed. Each hand is named by its detected handedness, publishing topics under /hand_left/* and /hand_right/*:

ros2 launch wujihand_bringup wujihand_dual.launch.py

Optional visualization:

# One RViz window per hand
ros2 launch wujihand_bringup wujihand_dual.launch.py rviz:=true

# A single Foxglove Bridge
ros2 launch wujihand_bringup wujihand_dual.launch.py foxglove:=true

Run Multi-hand Demos

When running demo scripts in a multi-hand environment, specify the target hand with --ros-args -p hand_name:=<hand-name>:

# Run wave demo on the left hand
ros2 run wujihand_bringup wave_demo.py --ros-args -p hand_name:=left_hand

# Run wave demo on the right hand
ros2 run wujihand_bringup wave_demo.py --ros-args -p hand_name:=right_hand

The hand_name must match the name specified when launching the driver.

Topic Namespaces

After launch, each hand has its own topic namespace:

# Left hand topics
/left_hand/joint_states
/left_hand/joint_commands
/left_hand/hand_diagnostics
/left_hand/robot_description
/left_hand/tf
/left_hand/tf_static

# Right hand topics
/right_hand/joint_states
/right_hand/joint_commands
/right_hand/hand_diagnostics
/right_hand/robot_description
/right_hand/tf
/right_hand/tf_static

Joint Identification

The dexterous hand has 20 joints (5 fingers × 4 joints per finger).

Finger and Joint IDs

Service Calls use finger_id and joint_id:

ParameterValues and Meanings
finger_id
  • 0: Thumb
  • 1: Index
  • 2: Middle
  • 3: Ring
  • 4: Pinky
  • 255: All fingers
joint_id
  • 0-3: Individual joints (0 → 3: proximal → distal)
  • 255: All joints

Joint Name Format

Topic Control uses full joint names: {handedness}_finger{1-5}_joint{1-4}

IndexJoint Name (handedness=right)Finger
0-3right_finger1_joint1~4Thumb
4-7right_finger2_joint1~4Index
8-11right_finger3_joint1~4Middle
12-15right_finger4_joint1~4Ring
16-19right_finger5_joint1~4Pinky

Index Calculation

index = finger_id * 4 + joint_id

For example: The index finger (finger_id=1) third joint (joint_id=2) has index 1 * 4 + 2 = 6.