Drake
Drake C++ Documentation
DifferentialInverseKinematicsSystem::Ingredient Class Referenceabstract

Detailed Description

(Internal use only) A user-provided set of constraint(s) and/or cost(s) for a DifferentialInverseKinematicsSystem recipe, to allow for user customization of the mathematical program formulation.

TODO(jeremy-nimmer) In the future, we should remove "internal use only" so that users can officially bake their own recipes for DifferentialInverseKinematicsSystem.

#include <drake/multibody/inverse_kinematics/differential_inverse_kinematics_system.h>

Public Member Functions

virtual ~Ingredient ()
 
virtual std::vector< solvers::Binding< solvers::EvaluatorBase > > AddToProgram (CallbackDetails *details) const =0
 Adds this ingredient into DifferentialInverseKinematicsSystem's mathematical program, returning the listing of bindings for all newly-added costs and/or constraints. More...
 
Does not allow copy, move, or assignment
 Ingredient (const Ingredient &)=delete
 
Ingredientoperator= (const Ingredient &)=delete
 
 Ingredient (Ingredient &&)=delete
 
Ingredientoperator= (Ingredient &&)=delete
 

Protected Member Functions

 Ingredient ()=default
 

Static Protected Member Functions

static Eigen::DiagonalMatrix< double, Eigen::Dynamic > BuildBlockDiagonalAxisSelector (const std::vector< const Frame< double > * > &frame_list, const string_unordered_map< Vector6d > &cartesian_axis_masks)
 Constructs a block-diagonal matrix selecting Cartesian velocity axes for each goal frame, based on per-frame axis masks. More...
 

Constructor & Destructor Documentation

◆ Ingredient() [1/3]

Ingredient ( const Ingredient )
delete

◆ Ingredient() [2/3]

Ingredient ( Ingredient &&  )
delete

◆ ~Ingredient()

virtual ~Ingredient ( )
virtual

◆ Ingredient() [3/3]

Ingredient ( )
protecteddefault

Member Function Documentation

◆ AddToProgram()

virtual std::vector<solvers::Binding<solvers::EvaluatorBase> > AddToProgram ( CallbackDetails details) const
pure virtual

◆ BuildBlockDiagonalAxisSelector()

static Eigen::DiagonalMatrix<double, Eigen::Dynamic> BuildBlockDiagonalAxisSelector ( const std::vector< const Frame< double > * > &  frame_list,
const string_unordered_map< Vector6d > &  cartesian_axis_masks 
)
staticprotected

Constructs a block-diagonal matrix selecting Cartesian velocity axes for each goal frame, based on per-frame axis masks.

This operation is common to several ingredients so is offered as a utility function this base class.

Each controlled frame Gi has a 6×6 diagonal mask matrix selecting which spatial velocity components (angular, linear) are active. These individual mask matrices are stacked into a single block-diagonal matrix for use in constraints and cost terms.

For example, given N goal frames, the output matrix has size 6N × 6N and has the form:

[ diag(mask_G₁) 0 ... 0 ] [ 0 diag(mask_G₂) ... 0 ] [ ... ... ... ... ] [ 0 0 ... diag(mask_Gₙ)]

Parameters
frame_listThe list of controlled frames {Gi}, borrowed from the plant.
cartesian_axis_masksMap from fully-scoped frame names to their 6D axis mask.
Returns
6N × 6N block-diagonal matrix applying the per-frame axis mask.

◆ operator=() [1/2]

Ingredient& operator= ( const Ingredient )
delete

◆ operator=() [2/2]

Ingredient& operator= ( Ingredient &&  )
delete

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