DART  6.7.3
dart::dynamics::InverseKinematics::Objective Class Referencefinal

The InverseKinematics::Objective Function is simply used to merge the objective and null space objective functions that are being held by an InverseKinematics module. More...

#include <InverseKinematics.hpp>

Inheritance diagram for dart::dynamics::InverseKinematics::Objective:
dart::dynamics::InverseKinematics::Function dart::optimizer::Function

Public Member Functions

 Objective (InverseKinematics *_ik)
 Constructor. More...
 
virtual ~Objective ()=default
 Virtual destructor. More...
 
optimizer::FunctionPtr clone (InverseKinematics *_newIK) const override
 Enable this function to be cloned to a new IK module. More...
 
double eval (const Eigen::VectorXd &_x) override
 Evaluates and returns the objective function at the point x. More...
 
void evalGradient (const Eigen::VectorXd &_x, Eigen::Map< Eigen::VectorXd > _grad) override
 Evaluates and returns the objective function at the point x. More...
 
virtual void setName (const std::string &newName)
 Sets the name of this Function. More...
 
const std::string & getName () const
 Returns the name of this Function. More...
 
void evalGradient (const Eigen::VectorXd &_x, Eigen::VectorXd &_grad)
 Evaluates and return the objective function at the point x. More...
 
virtual void evalHessian (const Eigen::VectorXd &_x, Eigen::Map< Eigen::VectorXd, Eigen::RowMajor > _Hess)
 Evaluates and return the objective function at the point x. More...
 

Static Public Member Functions

template<typename... Args>
static std::shared_ptr< InverseKinematics::ObjectivecreateShared (Args &&... args)
 

Protected Attributes

sub_ptr< InverseKinematicsmIK
 Pointer to this Objective's IK module. More...
 
Eigen::VectorXd mGradCache
 Cache for the gradient of the Objective. More...
 
Eigen::JacobiSVD< math::JacobianmSVDCache
 Cache for the null space SVD. More...
 
Eigen::MatrixXd mNullSpaceCache
 Cache for the null space. More...
 
std::string mName
 Name of this function. More...
 

Detailed Description

The InverseKinematics::Objective Function is simply used to merge the objective and null space objective functions that are being held by an InverseKinematics module.

This class is not meant to be extended or instantiated by a user. Call InverseKinematics::resetProblem() to set the objective of the module's Problem to an InverseKinematics::Objective.

Constructor & Destructor Documentation

◆ Objective()

dart::dynamics::InverseKinematics::Objective::Objective ( InverseKinematics _ik)

Constructor.

◆ ~Objective()

virtual dart::dynamics::InverseKinematics::Objective::~Objective ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ clone()

optimizer::FunctionPtr dart::dynamics::InverseKinematics::Objective::clone ( InverseKinematics _newIK) const
overridevirtual

Enable this function to be cloned to a new IK module.

Implements dart::dynamics::InverseKinematics::Function.

◆ createShared()

template<typename... Args>
static std::shared_ptr< InverseKinematics::Objective > dart::dynamics::InverseKinematics::Objective::createShared ( Args &&...  args)
inlinestatic

Create shared instance of this class

◆ eval()

double dart::dynamics::InverseKinematics::Objective::eval ( const Eigen::VectorXd &  x)
overridevirtual

Evaluates and returns the objective function at the point x.

Implements dart::optimizer::Function.

◆ evalGradient() [1/2]

void dart::dynamics::InverseKinematics::Objective::evalGradient ( const Eigen::VectorXd &  _x,
Eigen::Map< Eigen::VectorXd >  _grad 
)
overridevirtual

Evaluates and returns the objective function at the point x.

Reimplemented from dart::optimizer::Function.

◆ evalGradient() [2/2]

void dart::optimizer::Function::evalGradient ( const Eigen::VectorXd &  _x,
Eigen::VectorXd &  _grad 
)
inherited

Evaluates and return the objective function at the point x.

If you have a raw array that the gradient will be passed in, then use evalGradient(const Eigen::VectorXd&, Eigen::Map<Eigen::VectorXd>) for better performance.

◆ evalHessian()

void dart::optimizer::Function::evalHessian ( const Eigen::VectorXd &  _x,
Eigen::Map< Eigen::VectorXd, Eigen::RowMajor >  _Hess 
)
virtualinherited

Evaluates and return the objective function at the point x.

Reimplemented in dart::optimizer::NullFunction, and dart::optimizer::ModularFunction.

◆ getName()

const std::string & dart::optimizer::Function::getName ( ) const
inherited

Returns the name of this Function.

◆ setName()

void dart::optimizer::Function::setName ( const std::string &  newName)
virtualinherited

Sets the name of this Function.

Member Data Documentation

◆ mGradCache

Eigen::VectorXd dart::dynamics::InverseKinematics::Objective::mGradCache
protected

Cache for the gradient of the Objective.

◆ mIK

sub_ptr<InverseKinematics> dart::dynamics::InverseKinematics::Objective::mIK
protected

Pointer to this Objective's IK module.

◆ mName

std::string dart::optimizer::Function::mName
protectedinherited

Name of this function.

◆ mNullSpaceCache

Eigen::MatrixXd dart::dynamics::InverseKinematics::Objective::mNullSpaceCache
protected

Cache for the null space.

◆ mSVDCache

Eigen::JacobiSVD<math::Jacobian> dart::dynamics::InverseKinematics::Objective::mSVDCache
protected

Cache for the null space SVD.