This is a prioritized inverse kinematics solver. More...
#include <hpp/gik/core/solver-basic.hh>
Public Member Functions | |
ChppGikSolverBasic (unsigned int numberParam) | |
Constructor. More... | |
bool | weights (vectorN &inWeights) |
Set the diagonal weights for the Weighted Pseudoinverse. More... | |
unsigned int | resetSolution () |
Clear solution. More... | |
bool | setActiveParameters (const vectorN &inMask) |
Set active paramters for nest solved task. More... | |
bool | solveTask (CjrlGikStateConstraint *inConstraint, double inSRcoef=0.0, bool projectJacobian=false, bool inComputeNullspace=false) |
solve one constraint in the current null space. More... | |
const vectorN & | solution () |
get the solution to last serie of calls of solveTask More... | |
void | SVDThreshold (double i_threshold) |
Set the minimum singular value. More... | |
const vectorN & | penroseMask () const |
Get Penrose mask vector (debug method) More... | |
~ChppGikSolverBasic () | |
Destructor. More... | |
This is a prioritized inverse kinematics solver.
It can be used to solve a sequence of linear systems from highest to lowest priority. A linear system is provided by a CjrlGikStateConstraint object through its methods jacobian() and value(). These are assumed to be already computed.
Each linear system is solved by a pseudo inversion. The weighted pseudo inverse is used.
ChppGikSolverBasic::ChppGikSolverBasic | ( | unsigned int | numberParam | ) |
Constructor.
numberParam | is the size of the variables vector |
ChppGikSolverBasic::~ChppGikSolverBasic | ( | ) |
Destructor.
const vectorN& ChppGikSolverBasic::penroseMask | ( | ) | const |
Get Penrose mask vector (debug method)
unsigned int ChppGikSolverBasic::resetSolution | ( | ) |
Clear solution.
Reset nullspace and analyze weights to determine which parameters are being used and optimize computation accordingly. Call this prior to solving the first task of every stack of tasks.
bool ChppGikSolverBasic::setActiveParameters | ( | const vectorN & | inMask | ) |
Set active paramters for nest solved task.
const vectorN& ChppGikSolverBasic::solution | ( | ) |
get the solution to last serie of calls of solveTask
Up to last resetSolution call
bool ChppGikSolverBasic::solveTask | ( | CjrlGikStateConstraint * | inConstraint, |
double | inSRcoef = 0.0 , |
||
bool | projectJacobian = false , |
||
bool | inComputeNullspace = false |
||
) |
solve one constraint in the current null space.
The solution is added to ChppGikSolver::DeltaQ and ChppGikSolver::NullSpace is updated by the following procedure.
inConstraint | a constraint to be solved |
inSRcoef | if non-zero value is given, ![]() |
projectJacobian | set to true to project connstaint jacobian on nullspace |
inComputeNullspace | set to true to update null space projector |
void ChppGikSolverBasic::SVDThreshold | ( | double | i_threshold | ) |
Set the minimum singular value.
If a singular value is smaller than this value, it is set to zero in the computation process of pseudo inverse.
i_threshold | the minimum singular value |
bool ChppGikSolverBasic::weights | ( | vectorN & | inWeights | ) |
Set the diagonal weights for the Weighted Pseudoinverse.
This calls resetSolution() before returning true.