Drake
PositionConstraintForceEvaluator Class Reference

Evaluates the generalized constraint force from RigidBodyTree::positionConstraint. More...

#include <drake/systems/trajectory_optimization/position_constraint_force_evaluator.h>

Inheritance diagram for PositionConstraintForceEvaluator:
[legend]
Collaboration diagram for PositionConstraintForceEvaluator:
[legend]

Public Member Functions

 PositionConstraintForceEvaluator (const RigidBodyTree< double > &tree, std::shared_ptr< plants::KinematicsCacheHelper< AutoDiffXd >> kinematics_cache_helper)
 Constructor. More...
 
 ~PositionConstraintForceEvaluator () override
 
int generalized_positions_size () const
 The size of the generalized position vector to evaluate the position constraint Jacobian. More...
 
Does not allow copy, move, or assignment
 PositionConstraintForceEvaluator (const PositionConstraintForceEvaluator &)=delete
 
PositionConstraintForceEvaluatoroperator= (const PositionConstraintForceEvaluator &)=delete
 
 PositionConstraintForceEvaluator (PositionConstraintForceEvaluator &&)=delete
 
PositionConstraintForceEvaluatoroperator= (PositionConstraintForceEvaluator &&)=delete
 
- Public Member Functions inherited from GeneralizedConstraintForceEvaluator
 GeneralizedConstraintForceEvaluator (const RigidBodyTree< double > &tree, int num_vars, int lambda_size)
 Constructor. More...
 
 ~GeneralizedConstraintForceEvaluator () override
 
int non_lambda_size () const
 Getter for the size of non_lambda part in the evaluator variables. More...
 
int lambda_size () const
 Getter for lambda_size. More...
 
const RigidBodyTree< double > * tree () const
 Getter for the tree. More...
 
template<typename DerivedNonLambda , typename DerivedLambda >
std::enable_if< is_eigen_vector_of< DerivedNonLambda, typename DerivedLambda::Scalar >::value &&is_eigen_vector< DerivedLambda >::value, VectorX< typename DerivedLambda::Scalar > >::type ComposeEvalInputVector (const Eigen::MatrixBase< DerivedNonLambda > &non_lambda, const Eigen::MatrixBase< DerivedLambda > &lambda) const
 Compose the input x to the Eval function, given λ and the part of x that is not in λ. More...
 
template<typename Derived >
auto GetLambdaFromEvalInputVector (const Eigen::MatrixBase< Derived > &x) const
 Get the non-lambda part from the eval input vector. More...
 
template<typename Derived >
auto GetNonLambdaFromEvalInputVector (const Eigen::MatrixBase< Derived > &x) const
 Get the lambda part from the eval input vector. More...
 
- Public Member Functions inherited from EvaluatorBase
virtual ~EvaluatorBase ()
 
void Eval (const Eigen::Ref< const Eigen::VectorXd > &x, Eigen::VectorXd &y) const
 Evaluates the expression with a scalar type of double. More...
 
void Eval (const Eigen::Ref< const AutoDiffVecXd > &x, AutoDiffVecXd &y) const
 Evaluates the expression with a scalar type of AutoDiffXd. More...
 
void set_description (const std::string &description)
 Set a human-friendly description for the evaluator. More...
 
const std::string & get_description () const
 Getter for a human-friendly description for the evaluator. More...
 
int num_vars () const
 Getter for the number of variables, namely the number of rows in x, as used in Eval(x, y). More...
 
int num_outputs () const
 Getter for the number of outputs, namely the number of rows in y, as used in Eval(x, y). More...
 
 EvaluatorBase (const EvaluatorBase &)=delete
 
EvaluatorBaseoperator= (const EvaluatorBase &)=delete
 
 EvaluatorBase (EvaluatorBase &&)=delete
 
EvaluatorBaseoperator= (EvaluatorBase &&)=delete
 

Protected Member Functions

Eigen::MatrixXd EvalConstraintJacobian (const Eigen::Ref< const Eigen::VectorXd > &q) const override
 
MatrixX< AutoDiffXdEvalConstraintJacobian (const Eigen::Ref< const AutoDiffVecXd > &q) const override
 
- Protected Member Functions inherited from GeneralizedConstraintForceEvaluator
void DoEval (const Eigen::Ref< const Eigen::VectorXd > &x, Eigen::VectorXd &y) const override
 Implements expression evaluation for scalar type double. More...
 
void DoEval (const Eigen::Ref< const AutoDiffVecXd > &x, AutoDiffVecXd &y) const override
 Implements expression evaluation for scalar type AutoDiffXd. More...
 
template<typename DerivedX , typename DerivedY >
std::enable_if< std::is_same< typename DerivedX::Scalar, typename DerivedY::Scalar >::value &&is_eigen_vector< DerivedX >::value &&is_eigen_vector< DerivedY >::value >::type DoEvalGeneric (const Eigen::MatrixBase< DerivedX > &x, Eigen::MatrixBase< DerivedY > *y) const
 
- Protected Member Functions inherited from EvaluatorBase
 EvaluatorBase (int num_outputs, int num_vars, const std::string &description="")
 Constructs a evaluator. More...
 
void set_num_outputs (int num_outputs)
 

Detailed Description

Evaluates the generalized constraint force from RigidBodyTree::positionConstraint.

For example, loop joint constraint is a position constraint.

Constructor & Destructor Documentation

PositionConstraintForceEvaluator ( const RigidBodyTree< double > &  tree,
std::shared_ptr< plants::KinematicsCacheHelper< AutoDiffXd >>  kinematics_cache_helper 
)

Constructor.

Parameters
treeThe tree on which the position constraint force is evaluated.
kinematics_cache_helper.The helper class to update the kinematics cache. The kinematics cache is useful when computing the Jacobian of the position constraint.
~PositionConstraintForceEvaluator ( )
inlineoverride

Member Function Documentation

Eigen::MatrixXd EvalConstraintJacobian ( const Eigen::Ref< const Eigen::VectorXd > &  q) const
overrideprotectedvirtual

Implements GeneralizedConstraintForceEvaluator.

Here is the call graph for this function:

Here is the caller graph for this function:

MatrixX< AutoDiffXd > EvalConstraintJacobian ( const Eigen::Ref< const AutoDiffVecXd > &  q) const
overrideprotectedvirtual

Implements GeneralizedConstraintForceEvaluator.

Here is the call graph for this function:

int generalized_positions_size ( ) const
inline

The size of the generalized position vector to evaluate the position constraint Jacobian.

Here is the call graph for this function:


The documentation for this class was generated from the following files: