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
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)
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
-
Save the above code as
wujihand_controller.py - Start the driver in terminal 1:
- Run the example code in terminal 2:
Ctrl+C to exit:
C++
- Create a test package:
-
Save the above code as
~/test/test_wujihand/src/wujihand_controller.cpp -
Add the following to the end of
~/test/test_wujihand/CMakeLists.txt:
- Start the driver in terminal 1:
- Build and run in terminal 2:
Ctrl+C to exit: