Simox  2.3.49
VirtualRobot::Constraint Class Reference
Inheritance diagram for VirtualRobot::Constraint:
VirtualRobot::JacobiProvider

Public Member Functions

 Constraint (const RobotNodeSetPtr &nodeSet)
 
void initialize ()
 
virtual bool getRobotPoseForConstraint (Eigen::Matrix4f &pose)
 
float getErrorDifference ()
 
const std::vector< OptimizationFunctionSetup > & getEqualityConstraints ()
 
const std::vector< OptimizationFunctionSetup > & getInequalityConstraints ()
 
const std::vector< OptimizationFunctionSetup > & getOptimizationFunctions ()
 
void setOptimizationFunctionFactor (float factor)
 
float getOptimizationFunctionFactor ()
 
virtual double optimizationFunction (unsigned int id)
 
virtual Eigen::VectorXf optimizationGradient (unsigned int id)
 
virtual Eigen::MatrixXf getJacobianMatrix ()
 
virtual Eigen::MatrixXf getJacobianMatrix (SceneObjectPtr tcp)
 
virtual Eigen::VectorXf getError (float stepSize=1.0f)
 
virtual bool checkTolerances ()
 
- Public Member Functions inherited from VirtualRobot::JacobiProvider
 JacobiProvider (RobotNodeSetPtr rns, InverseJacobiMethod invJacMethod=eSVD)
 
virtual ~JacobiProvider ()
 
virtual Eigen::MatrixXd getJacobianMatrixD ()
 
virtual Eigen::MatrixXd getJacobianMatrixD (SceneObjectPtr tcp)
 
virtual Eigen::MatrixXf computePseudoInverseJacobianMatrix (const Eigen::MatrixXf &m) const
 
virtual Eigen::MatrixXd computePseudoInverseJacobianMatrixD (const Eigen::MatrixXd &m) const
 
virtual Eigen::MatrixXf computePseudoInverseJacobianMatrix (const Eigen::MatrixXf &m, float invParameter) const
 
virtual Eigen::MatrixXd computePseudoInverseJacobianMatrixD (const Eigen::MatrixXd &m, double invParameter) const
 
virtual void updatePseudoInverseJacobianMatrix (Eigen::MatrixXf &invJac, const Eigen::MatrixXf &m, float invParameter=0.0f) const
 
virtual void updatePseudoInverseJacobianMatrixD (Eigen::MatrixXd &invJac, const Eigen::MatrixXd &m, double invParameter=0.0) const
 
virtual Eigen::MatrixXf getPseudoInverseJacobianMatrix ()
 
virtual Eigen::MatrixXd getPseudoInverseJacobianMatrixD ()
 
virtual Eigen::MatrixXf getPseudoInverseJacobianMatrix (SceneObjectPtr tcp)
 
virtual Eigen::MatrixXd getPseudoInverseJacobianMatrixD (SceneObjectPtr tcp)
 
VirtualRobot::RobotNodeSetPtr getRobotNodeSet ()
 
bool isInitialized ()
 
void setJointWeights (const Eigen::VectorXf &jointWeights)
 
virtual void print ()
 print Print current status of the IK solver More...
 

Protected Member Functions

void addEqualityConstraint (unsigned int id, bool soft=false)
 
void addInequalityConstraint (unsigned int id, bool soft=false)
 
void addOptimizationFunction (unsigned int id, bool soft=false)
 

Protected Attributes

std::vector< OptimizationFunctionSetupequalityConstraints
 
std::vector< OptimizationFunctionSetupinequalityConstraints
 
std::vector< OptimizationFunctionSetupoptimizationFunctions
 
float lastError
 
float lastLastError
 
float optimizationFunctionFactor
 
- Protected Attributes inherited from VirtualRobot::JacobiProvider
std::string name
 
RobotNodeSetPtr rns
 
InverseJacobiMethod inverseMethod
 
bool initialized
 
Eigen::VectorXf jointWeights
 

Additional Inherited Members

- Public Types inherited from VirtualRobot::JacobiProvider
enum  InverseJacobiMethod { eSVD, eSVDDamped, eTranspose }
 Several methods are offered for inverting the Jacobi (i.e. building the Pseudoinverse) More...
 

Constructor & Destructor Documentation

Constraint::Constraint ( const RobotNodeSetPtr nodeSet)

Member Function Documentation

void Constraint::addEqualityConstraint ( unsigned int  id,
bool  soft = false 
)
protected
void Constraint::addInequalityConstraint ( unsigned int  id,
bool  soft = false 
)
protected
void Constraint::addOptimizationFunction ( unsigned int  id,
bool  soft = false 
)
protected
bool Constraint::checkTolerances ( )
virtual
const std::vector< OptimizationFunctionSetup > & Constraint::getEqualityConstraints ( )
Eigen::VectorXf Constraint::getError ( float  stepSize = 1.0f)
virtual

The error vector. the value depends on the implementation.

Implements VirtualRobot::JacobiProvider.

float Constraint::getErrorDifference ( )
const std::vector< OptimizationFunctionSetup > & Constraint::getInequalityConstraints ( )
Eigen::MatrixXf Constraint::getJacobianMatrix ( )
virtual
Eigen::MatrixXf Constraint::getJacobianMatrix ( SceneObjectPtr  tcp)
virtual
float Constraint::getOptimizationFunctionFactor ( )
const std::vector< OptimizationFunctionSetup > & Constraint::getOptimizationFunctions ( )
bool Constraint::getRobotPoseForConstraint ( Eigen::Matrix4f &  pose)
virtual
void Constraint::initialize ( )
double Constraint::optimizationFunction ( unsigned int  id)
virtual
Eigen::VectorXf Constraint::optimizationGradient ( unsigned int  id)
virtual
void Constraint::setOptimizationFunctionFactor ( float  factor)

Each constraint implements its own optimization function that contributes to a combined optimization function of a constrained IK problem.

The individual optimization function value of a constraint is multiplied by the given factor in order to weigh the contribution of the individual constraint.

The default value of this factor is 1.

Field Documentation

std::vector<OptimizationFunctionSetup> VirtualRobot::Constraint::equalityConstraints
protected
std::vector<OptimizationFunctionSetup> VirtualRobot::Constraint::inequalityConstraints
protected
float VirtualRobot::Constraint::lastError
protected
float VirtualRobot::Constraint::lastLastError
protected
float VirtualRobot::Constraint::optimizationFunctionFactor
protected
std::vector<OptimizationFunctionSetup> VirtualRobot::Constraint::optimizationFunctions
protected