Simox  2.3.74.0
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)
 
Eigen::MatrixXf getJacobianMatrix () override
 
Eigen::MatrixXf getJacobianMatrix (SceneObjectPtr tcp) override
 
Eigen::VectorXf getError (float stepSize=1.0f) override
 
bool checkTolerances () override
 
virtual bool usingCollisionModel ()
 
- 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 Eigen::VectorXf regularization=Eigen::VectorXf()) const
 
virtual Eigen::MatrixXd computePseudoInverseJacobianMatrixD (const Eigen::MatrixXd &m, const Eigen::VectorXd regularization=Eigen::VectorXd()) const
 
virtual Eigen::MatrixXf computePseudoInverseJacobianMatrix (const Eigen::MatrixXf &m, float invParameter, const Eigen::VectorXf regularization=Eigen::VectorXf()) const
 
virtual Eigen::MatrixXd computePseudoInverseJacobianMatrixD (const Eigen::MatrixXd &m, double invParameter, const Eigen::VectorXd regularization=Eigen::VectorXd()) const
 
virtual void updatePseudoInverseJacobianMatrix (Eigen::MatrixXf &invJac, const Eigen::MatrixXf &m, float invParameter=0.0f, Eigen::VectorXf regularization=Eigen::VectorXf()) const
 
virtual void updatePseudoInverseJacobianMatrixD (Eigen::MatrixXd &invJac, const Eigen::MatrixXd &m, double invParameter=0.0, Eigen::VectorXd regularization=Eigen::VectorXd()) const
 
virtual Eigen::MatrixXf getPseudoInverseJacobianMatrix (const Eigen::VectorXf regularization=Eigen::VectorXf())
 
virtual Eigen::MatrixXd getPseudoInverseJacobianMatrixD (const Eigen::VectorXd regularization=Eigen::VectorXd())
 
virtual Eigen::MatrixXf getPseudoInverseJacobianMatrix (SceneObjectPtr tcp, const Eigen::VectorXf regularization=Eigen::VectorXf())
 
virtual Eigen::MatrixXd getPseudoInverseJacobianMatrixD (SceneObjectPtr tcp, const Eigen::VectorXd regularization=Eigen::VectorXd())
 
virtual Eigen::VectorXf getJacobiRegularization (IKSolver::CartesianSelection mode=IKSolver::All)
 
VirtualRobot::RobotNodeSetPtr getRobotNodeSet ()
 
bool isInitialized ()
 
void setJointWeights (const Eigen::VectorXf &jointWeights)
 
virtual void print ()
 print Print current status of the IK solver More...
 
float getDampedSvdLambda () const
 
void setDampedSvdLambda (float value)
 
float getJacobiMMRegularization () const
 
void setJacobiMMRegularization (float value)
 
float getJacobiRadianRegularization () const
 
void setJacobiRadianRegularization (float value)
 

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 Member Functions inherited from VirtualRobot::JacobiProvider
virtual void updatePseudoInverseJacobianMatrixInternal (Eigen::MatrixXf &invJac, const Eigen::MatrixXf &m, float invParameter=0.0f) const
 
virtual void updatePseudoInverseJacobianMatrixDInternal (Eigen::MatrixXd &invJac, const Eigen::MatrixXd &m, double invParameter=0.0) const
 

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
 
float dampedSvdLambda
 
float jacobiMMRegularization
 
float jacobiRadianRegularization
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ Constraint()

Constraint::Constraint ( const RobotNodeSetPtr nodeSet)

Member Function Documentation

◆ addEqualityConstraint()

void Constraint::addEqualityConstraint ( unsigned int  id,
bool  soft = false 
)
protected

◆ addInequalityConstraint()

void Constraint::addInequalityConstraint ( unsigned int  id,
bool  soft = false 
)
protected

◆ addOptimizationFunction()

void Constraint::addOptimizationFunction ( unsigned int  id,
bool  soft = false 
)
protected

◆ checkTolerances()

bool Constraint::checkTolerances ( )
overridevirtual

◆ getEqualityConstraints()

const std::vector< OptimizationFunctionSetup > & Constraint::getEqualityConstraints ( )

◆ getError()

Eigen::VectorXf Constraint::getError ( float  stepSize = 1.0f)
overridevirtual

The error vector. the value depends on the implementation.

Implements VirtualRobot::JacobiProvider.

◆ getErrorDifference()

float Constraint::getErrorDifference ( )

◆ getInequalityConstraints()

const std::vector< OptimizationFunctionSetup > & Constraint::getInequalityConstraints ( )

◆ getJacobianMatrix() [1/2]

Eigen::MatrixXf Constraint::getJacobianMatrix ( )
overridevirtual

◆ getJacobianMatrix() [2/2]

Eigen::MatrixXf Constraint::getJacobianMatrix ( SceneObjectPtr  tcp)
overridevirtual

◆ getOptimizationFunctionFactor()

float Constraint::getOptimizationFunctionFactor ( )

◆ getOptimizationFunctions()

const std::vector< OptimizationFunctionSetup > & Constraint::getOptimizationFunctions ( )

◆ getRobotPoseForConstraint()

bool Constraint::getRobotPoseForConstraint ( Eigen::Matrix4f &  pose)
virtual

◆ initialize()

void Constraint::initialize ( )

◆ optimizationFunction()

double Constraint::optimizationFunction ( unsigned int  id)
virtual

◆ optimizationGradient()

Eigen::VectorXf Constraint::optimizationGradient ( unsigned int  id)
virtual

◆ setOptimizationFunctionFactor()

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.

◆ usingCollisionModel()

bool Constraint::usingCollisionModel ( )
virtual

Field Documentation

◆ equalityConstraints

std::vector<OptimizationFunctionSetup> VirtualRobot::Constraint::equalityConstraints
protected

◆ inequalityConstraints

std::vector<OptimizationFunctionSetup> VirtualRobot::Constraint::inequalityConstraints
protected

◆ lastError

float VirtualRobot::Constraint::lastError
protected

◆ lastLastError

float VirtualRobot::Constraint::lastLastError
protected

◆ optimizationFunctionFactor

float VirtualRobot::Constraint::optimizationFunctionFactor
protected

◆ optimizationFunctions

std::vector<OptimizationFunctionSetup> VirtualRobot::Constraint::optimizationFunctions
protected