A hand with tendon information. More...
#include <humanHand.h>
Public Member Functions | |
int | contactEquilibrium (std::list< Contact * > contacts, const std::set< size_t > &activeTendons, std::vector< double > &activeTendonForces, double &unbalanced_magnitude) |
Computes tendon forces that attempt to balance equal 1N forces at all contacts. | |
int | contactForcesFromTendonForces (std::list< Contact * > contacts, std::vector< double > &contactForces, const std::set< size_t > &activeTendons, const std::vector< double > &activeTendonForces) |
Computes contact forces that attempt to balance given tendon forces. | |
int | contactTorques (std::list< Contact * > contacts, std::vector< double > &jointTorques) |
void | deselectTendon (int i) |
virtual void | DOFController (double timeStep) |
Applies tendon forces rather than calling the PD Controller. | |
int | getNumTendons () |
int | getNumTendonWrappers () |
Tendon * | getTendon (int i) |
TendonWrapper * | getTendonWrapper (int i) |
HumanHand (World *, const char *) | |
bool | insPointInsideWrapper () |
Returns true if any of the tendons has a permanent insertion point inside a wrapper. | |
virtual int | loadFromXml (const TiXmlElement *root, QString rootPath) |
double | minInsPointDistance () |
void | removeTemporaryInsertionPoints () |
Removes temporary insertion points for all tendons. | |
void | selectTendon (int i) |
void | setRestPosition () |
virtual int | tendonEquilibrium (const std::set< size_t > &activeTendons, const std::set< size_t > &passiveTendons, bool compute_tendon_forces, std::vector< double > &activeTendonForces, std::vector< double > &jointResiduals, double &unbalanced_magnitude, bool useJointSprings=true) |
Computes if tendon forces (active and passive) are self-balanced around all joints of the hand. | |
void | updateTendonGeometry () |
virtual | ~HumanHand () |
Protected Member Functions | |
void | applyTendonForces () |
Applies dynamic tendon forces, to be called during an interation of the dynamic engine. | |
Protected Attributes | |
std::vector< Tendon * > | mTendonVec |
std::vector< TendonWrapper * > | mTendonWrapperVec |
A hand with tendon information.
Currently, the only thing that a human hand has different from a robotic hand is a list of tendons. It will load these tendons from the .cfg file and display them, and the GUI can be used to visualize the tendon geometry, excursion, etc. In the future, the human hand might gain more features.
Definition at line 404 of file humanHand.h.
HumanHand::HumanHand | ( | World * | w, | |
const char * | name | |||
) |
Definition at line 1138 of file humanHand.cpp.
virtual HumanHand::~HumanHand | ( | ) | [inline, virtual] |
Definition at line 416 of file humanHand.h.
void HumanHand::applyTendonForces | ( | ) | [protected] |
Applies dynamic tendon forces, to be called during an interation of the dynamic engine.
Definition at line 1193 of file humanHand.cpp.
int HumanHand::contactEquilibrium | ( | std::list< Contact * > | contacts, | |
const std::set< size_t > & | activeTendons, | |||
std::vector< double > & | activeTendonForces, | |||
double & | unbalanced_magnitude | |||
) |
Computes tendon forces that attempt to balance equal 1N forces at all contacts.
Definition at line 1406 of file humanHand.cpp.
int HumanHand::contactForcesFromTendonForces | ( | std::list< Contact * > | contacts, | |
std::vector< double > & | contactForces, | |||
const std::set< size_t > & | activeTendons, | |||
const std::vector< double > & | activeTendonForces | |||
) |
Computes contact forces that attempt to balance given tendon forces.
Solves: JTc c = JTt f where Jt is the Jacobian of tendon insertion points and Jc is the Jacobian of contacts. Uses passed in tendon forces for f Returns the c that minimizes error norm (unbalanced magnitude).
Definition at line 1521 of file humanHand.cpp.
int HumanHand::contactTorques | ( | std::list< Contact * > | contacts, | |
std::vector< double > & | jointTorques | |||
) |
Returns the joint torques created by the given contacts applying 1N of force along their normals. Does not care about tendons.
Computes the following: JTc c = tau where Jc is the Jacobian of the contacts Returns tau.
Definition at line 1360 of file humanHand.cpp.
void HumanHand::deselectTendon | ( | int | i | ) | [inline] |
Definition at line 432 of file humanHand.h.
void HumanHand::DOFController | ( | double | timeStep | ) | [virtual] |
Applies tendon forces rather than calling the PD Controller.
Applies tendon forces; for now both active and passive.
Reimplemented from Robot.
Definition at line 1201 of file humanHand.cpp.
int HumanHand::getNumTendons | ( | ) | [inline] |
Definition at line 422 of file humanHand.h.
int HumanHand::getNumTendonWrappers | ( | ) | [inline] |
Definition at line 424 of file humanHand.h.
Tendon* HumanHand::getTendon | ( | int | i | ) | [inline] |
Definition at line 426 of file humanHand.h.
TendonWrapper* HumanHand::getTendonWrapper | ( | int | i | ) | [inline] |
Definition at line 428 of file humanHand.h.
bool HumanHand::insPointInsideWrapper | ( | ) |
Returns true if any of the tendons has a permanent insertion point inside a wrapper.
Definition at line 1644 of file humanHand.cpp.
int HumanHand::loadFromXml | ( | const TiXmlElement * | root, | |
QString | rootPath | |||
) | [virtual] |
First calls the super to load the hand like a regular one (all kinematic chains, links etc). Then loads tendon information from the same file.
Reimplemented from Robot.
Reimplemented in McGrip.
Definition at line 1146 of file humanHand.cpp.
double HumanHand::minInsPointDistance | ( | ) | [inline] |
Returns the minimum distance between consecutive permanent insertion points for all tendons Does not look at distances accross tendons
Definition at line 502 of file humanHand.h.
void HumanHand::removeTemporaryInsertionPoints | ( | ) | [inline] |
Removes temporary insertion points for all tendons.
Definition at line 492 of file humanHand.h.
void HumanHand::selectTendon | ( | int | i | ) | [inline] |
Definition at line 430 of file humanHand.h.
void HumanHand::setRestPosition | ( | ) | [inline] |
Sets the rest position of all tendons to their default values, or, if they don't have one, to their current value.
Definition at line 468 of file humanHand.h.
int HumanHand::tendonEquilibrium | ( | const std::set< size_t > & | activeTendons, | |
const std::set< size_t > & | passiveTendons, | |||
bool | compute_tendon_forces, | |||
std::vector< double > & | activeTendonForces, | |||
std::vector< double > & | jointResiduals, | |||
double & | unbalanced_magnitude, | |||
bool | useJointSprings = true | |||
) | [virtual] |
Computes if tendon forces (active and passive) are self-balanced around all joints of the hand.
Definition at line 1223 of file humanHand.cpp.
void HumanHand::updateTendonGeometry | ( | ) |
Definition at line 1186 of file humanHand.cpp.
std::vector<Tendon *> HumanHand::mTendonVec [protected] |
Definition at line 407 of file humanHand.h.
std::vector<TendonWrapper *> HumanHand::mTendonWrapperVec [protected] |
Definition at line 409 of file humanHand.h.