Skip to main content
The topic and service paths in the examples below use the default namespace /hand_0/. When launched with wujihand_dual.launch.py, topics and services live under /hand_left/ and /hand_right/ — replace /hand_0/ accordingly.

Interface Reference

HandDiagnostics Message

wujihand_msgs/msg/HandDiagnostics: Hardware diagnostics, published at 10Hz by default (see diagnostics_rate).

JointState Message

sensor_msgs/msg/JointState: Joint states, published at 1000Hz by default (see publish_rate).
About the Effort FieldEffort represents the actuator output in current space, filtered before output. It is not the actual measured current value. Consider it as relative drive intensity.Typical use cases:
  • Collision detection: A sudden increase in effort indicates joint obstruction
  • Load monitoring: Calculate current output percentage via effort / effort_limit
Default effort_limit is 1.5A, maximum 3.5A.

SetEnabled Service

wujihand_msgs/srv/SetEnabled: Enable or disable joints.

ResetError Service

wujihand_msgs/srv/ResetError: Reset joint error states.

Service Calls

Enable/Disable Joints

Reset Errors

Topic Control

Send Joint Position Commands

Joint positions are sent via the /{hand_name}/joint_commands topic using the sensor_msgs/msg/JointState message type. Method 1: Position Array (20 joints)
Method 2: Specify Joint Names

Smooth Homing

home.launch.py smoothly interpolates from the current pose back to zero, avoiding an abrupt snap:

Read Joint States

Code Examples

The following examples demonstrate how to create a ROS2 node to control the dexterous hand:
  • Subscribe to joint state topics for real-time position feedback
  • Publish joint position commands to control hand movement

Python

How to Run
  1. Save the above code as wujihand_controller.py
  2. Start the driver in terminal 1:
  1. Run the example code in terminal 2:
Expected Output The hand moves to zero position. Terminal continuously prints joint positions (~10Hz). Press Ctrl+C to exit:

C++

How to Run C++ examples require creating a ROS2 package to compile.
  1. Create a test package:
  1. Save the above code as ~/test/test_wujihand/src/wujihand_controller.cpp
  2. Add the following to the end of ~/test/test_wujihand/CMakeLists.txt:
  1. Start the driver in terminal 1:
  1. Build and run in terminal 2:
Expected Output The hand moves to zero position. Terminal continuously prints joint positions (~10Hz). Press Ctrl+C to exit: