#include <eigenTorques.h>
Public Member Functions | |
virtual void | finalize () |
Actually run the optimization. | |
McGripOptimizer (Hand *h) | |
virtual void | processGrasp () |
Adds the individual matrices for the current grasp to the respective list. | |
virtual void | reset () |
Clears all the lists of matrices. | |
virtual | ~McGripOptimizer () |
Private Member Functions | |
void | clearList (std::list< Matrix * > &list) |
Clears the list and deletes all matrices inside. | |
void | printList (const std::list< Matrix * > &list, FILE *fp) |
Prints all matrices in the list into a file. | |
Private Attributes | |
std::list< Matrix * > | FO_list |
A list of the [F 0] matrices for each grasp. | |
std::list< Matrix * > | GO_list |
A list of the [G 0] matrices for each grasp. | |
std::list< Matrix * > | JTD_negI_list |
A list of the [JTD -I] matrices for each grasp. | |
std::list< Matrix * > | lowerBounds_list |
A list of the lower bounds vector for each grasp. | |
std::list< Matrix * > | NegB_list |
A list of the -B matrices for each grasp. | |
std::list< Matrix * > | SO_list |
A list of the [S 0] matrices for each grasp. | |
std::list< Matrix * > | Th_list |
A list of the delta_Theta matrices for each grasp. | |
std::list< Matrix * > | upperBounds_list |
A list of the upper bounds vector for each grasp. |
Builds a large optimization problem for the McGrip over a set of multiple grasps. This optimization attempts to solve for both contact forces for each grasp and hand construction parameters over all grasps that provide the most stable grasps.
For each grasps, it computes the respective blocks of the optimization equations. Then, in the finalize() stage, it puts them all together into one big optimization and (hopefully) solves it.
Definition at line 133 of file eigenTorques.h.
McGripOptimizer::McGripOptimizer | ( | Hand * | h | ) | [inline] |
Definition at line 158 of file eigenTorques.h.
virtual McGripOptimizer::~McGripOptimizer | ( | ) | [inline, virtual] |
Definition at line 159 of file eigenTorques.h.
void McGripOptimizer::clearList | ( | std::list< Matrix * > & | list | ) | [private] |
Clears the list and deletes all matrices inside.
Definition at line 231 of file eigenTorques.cpp.
void McGripOptimizer::finalize | ( | ) | [virtual] |
Actually run the optimization.
This is the overall form of the optimization:
x = [beta_1 a_1 beta_2 a_2 ... beta_n a_n l r d]^T
| J_1TD_1 -I -B_1 | | J_2TD_2 -I -B_2 | | ... | = Q | J_nTD_n -I -B_n |
| F_1 0 0 | | F_2 0 0 | | ... 0 | = F | F_n 0 0 |
| G_1 0 0 | | G_2 0 0 | | ... 0 | = G | G_n 0 0 |
| 1 0 0 | | 1 0 0 | | ... 0 | = S | 1 0 0 |
lowerBounds = [ 0 a_1 0 a_2 ... 0 a_n l_min r_min d_min ] ^T upperBounds = [ inf a_1 inf a_2 ... inf a_n l_max r_max d_max ] ^T
Minimize x^T Q^T Q x (joint equilibrium) subject to: G x = 0 (no resultant wrench on object) S x = 1 (some contact force applied to object) F x <= 0 (all contact forces inside friction cones) lowerBounds <= x <= upperBounds
Implements GraspProcessor.
Definition at line 361 of file eigenTorques.cpp.
void McGripOptimizer::printList | ( | const std::list< Matrix * > & | list, | |
FILE * | fp | |||
) | [private] |
Prints all matrices in the list into a file.
Definition at line 239 of file eigenTorques.cpp.
void McGripOptimizer::processGrasp | ( | ) | [virtual] |
Adds the individual matrices for the current grasp to the respective list.
Implements GraspProcessor.
Definition at line 263 of file eigenTorques.cpp.
void McGripOptimizer::reset | ( | ) | [virtual] |
Clears all the lists of matrices.
Reimplemented from GraspProcessor.
Definition at line 250 of file eigenTorques.cpp.
std::list<Matrix*> McGripOptimizer::FO_list [private] |
A list of the [F 0] matrices for each grasp.
Definition at line 145 of file eigenTorques.h.
std::list<Matrix*> McGripOptimizer::GO_list [private] |
A list of the [G 0] matrices for each grasp.
Definition at line 143 of file eigenTorques.h.
std::list<Matrix*> McGripOptimizer::JTD_negI_list [private] |
A list of the [JTD -I] matrices for each grasp.
Definition at line 137 of file eigenTorques.h.
std::list<Matrix*> McGripOptimizer::lowerBounds_list [private] |
A list of the lower bounds vector for each grasp.
Definition at line 149 of file eigenTorques.h.
std::list<Matrix*> McGripOptimizer::NegB_list [private] |
A list of the -B matrices for each grasp.
Definition at line 139 of file eigenTorques.h.
std::list<Matrix*> McGripOptimizer::SO_list [private] |
A list of the [S 0] matrices for each grasp.
Definition at line 147 of file eigenTorques.h.
std::list<Matrix*> McGripOptimizer::Th_list [private] |
A list of the delta_Theta matrices for each grasp.
Definition at line 141 of file eigenTorques.h.
std::list<Matrix*> McGripOptimizer::upperBounds_list [private] |
A list of the upper bounds vector for each grasp.
Definition at line 151 of file eigenTorques.h.