Unitree Robot RH56DFX Inspire Hand Controller.
The user sends unitree_go::msg::dds::MotorCmds_
messages to the rt/inspire/cmd
topic to control the dexterous hand,
and receives unitree_go::msg::dds::MotorStates_
messages from the rt/inspire/state
topic to obtain its status.
graph LR
A(user) --rt/inspire/cmd--> B(H1 or G1)
B --rt/inspire/state--> A
The IDL data is an array containing joint-level values for all 12 motors of both hands.
Currently the dexterous hand only supports joint control, i.e. only the parameter q
makes sense in the idl format. The others are reserved.
Id | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
Joint | Right Hand | Left Hand | ||||||||||
pinky | ring | middle | index | thumb-bend | thumb-rotation | pinky | ring | middle | index | thumb-bend | thumb-rotation |
sudo apt install libboost-all-dev libspdlog-dev
# Build project
mkdir build & cd build
cmake ..
make -j6
# Terminal 1. Run h1 inspire hand service
sudo ./inspire_h1 -s /dev/ttyUSB0
# Terminal 2. Run example
./hand_example
sudo apt install libboost-all-dev libspdlog-dev
# Build project
mkdir build & cd build
cmake ..
make -j6
# Terminal 1. Run g1 inspire hand service
# The serial port name is hard-coded; if it doesn’t match your setup, please edit it directly in the source.
sudo ./inspire_g1
# Terminal 2. Run example
./hand_example
- Error when
make -j6
please compile and install... /usr/bin/ld: inspire_ctrl.cpp:(.text._Z14serialize_intoIN10unitree_go3msg4dds_12MotorStates_EN3org7eclipse10cyclonedds4core3cdr14xcdr_v2_streamEEbPvmRKT_b[_Z14serialize_intoIN10unitree_go3msg4dds_12MotorStates_EN3org7eclipse10cyclonedds4core3cdr14xcdr_v2_streamEEbPvmRKT_b]+0x2be): undefined reference to `org::eclipse::cyclonedds::core::cdr::xcdr_v2_stream::finish_member(org::eclipse::cyclonedds::core::cdr::entity_properties&, bool)' /usr/bin/ld: inspire_ctrl.cpp:(.text._Z14serialize_intoIN10unitree_go3msg4dds_12MotorStates_EN3org7eclipse10cyclonedds4core3cdr14xcdr_v2_streamEEbPvmRKT_b[_Z14serialize_intoIN10unitree_go3msg4dds_12MotorStates_EN3org7eclipse10cyclonedds4core3cdr14xcdr_v2_streamEEbPvmRKT_b]+0x2d9): undefined reference to `org::eclipse::cyclonedds::core::cdr::xcdr_v2_stream::finish_struct(org::eclipse::cyclonedds::core::cdr::entity_properties&)'
unitree_sdk2
:cd ~ git clone https://github.com/unitreerobotics/unitree_sdk2 cd unitree_sdk2 mkdir build & cd build cmake .. sudo make install
- Error when run
sudo ./inspire_h1 -s /dev/ttyUSB0
orsudo ./inspire_g1
For Unitree h1, use the--- Unitree Robotics --- Inspire Hand Controller Open serial port /dev/ttyUSB* failed
-s
parameter to change the serial port name.
For Unitree g1, modify the serial port name directly in the source code.