Detecting the state of the fingers: whether the joints are moving, or reached the destination, or got stuck by external collisions in the midway.
The class uses only the hand status from the MBP as the input, and calculate the state according to the position, velocity, and command position of each joint. The class also contains two commonly used pre-set joint state for opening the hand and closing the hand for grasping.
#include <drake/examples/allegro_hand/allegro_common.h>
Public Member Functions | |
AllegroHandMotionState () | |
void | Update (const lcmt_allegro_status &allegro_state_msg) |
Update the states of the joints and fingers upon receiving the new message about hand staties. More... | |
Eigen::Vector4d | FingerGraspJointPosition (int finger_index) const |
Pre-set joint positions for grasping objects and open hands. More... | |
Eigen::Vector4d | FingerOpenJointPosition (int finger_index) const |
bool | IsFingerStuck (int finger_index) const |
Returns true when the finger is stuck, which means the joints on the finger stops moving or back driving, regardless of it having reached the target position or not. More... | |
bool | IsAllFingersStuck () const |
bool | IsAnyHighFingersStuck () const |
Return whether any of the fingers, other than the thumb, is stuck. More... | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
AllegroHandMotionState (const AllegroHandMotionState &)=default | |
AllegroHandMotionState & | operator= (const AllegroHandMotionState &)=default |
AllegroHandMotionState (AllegroHandMotionState &&)=default | |
AllegroHandMotionState & | operator= (AllegroHandMotionState &&)=default |
|
default |
|
default |
Eigen::Vector4d FingerGraspJointPosition | ( | int | finger_index | ) | const |
Pre-set joint positions for grasping objects and open hands.
finger_index | the index of the fingers whose joint values are in request. |
Eigen::Vector4d FingerOpenJointPosition | ( | int | finger_index | ) | const |
bool IsAllFingersStuck | ( | ) | const |
bool IsAnyHighFingersStuck | ( | ) | const |
Return whether any of the fingers, other than the thumb, is stuck.
bool IsFingerStuck | ( | int | finger_index | ) | const |
Returns true when the finger is stuck, which means the joints on the finger stops moving or back driving, regardless of it having reached the target position or not.
|
default |
|
default |
void Update | ( | const lcmt_allegro_status & | allegro_state_msg | ) |
Update the states of the joints and fingers upon receiving the new message about hand staties.