(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 | |
Ingredient & | operator= (const Ingredient &)=delete |
Ingredient (Ingredient &&)=delete | |
Ingredient & | operator= (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... | |
|
delete |
|
delete |
|
virtual |
|
protecteddefault |
|
pure virtual |
Adds this ingredient into DifferentialInverseKinematicsSystem's mathematical program, returning the listing of bindings for all newly-added costs and/or constraints.
[in,out] | details | A group of arguments commonly used by most costs and constraints. |
Implemented in DifferentialInverseKinematicsSystem::JointVelocityLimitConstraint, DifferentialInverseKinematicsSystem::CollisionConstraint, DifferentialInverseKinematicsSystem::CartesianVelocityLimitConstraint, DifferentialInverseKinematicsSystem::CartesianPositionLimitConstraint, DifferentialInverseKinematicsSystem::JointCenteringCost, and DifferentialInverseKinematicsSystem::LeastSquaresCost.
|
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ₙ)]
frame_list | The list of controlled frames {Gi}, borrowed from the plant. |
cartesian_axis_masks | Map from fully-scoped frame names to their 6D axis mask. |
|
delete |
|
delete |