QuasiStaticConstraint Class Reference

Constrain the Center of Mass (CoM) within the support polygon. More...

#include <drake/attic/multibody/rigid_body_constraint.h>

Public Member Functions

 QuasiStaticConstraint (RigidBodyTree< double > *robot, const Eigen::Vector2d &tspan=DrakeRigidBodyConstraint::default_tspan, const std::set< int > &model_instance_id_set=QuasiStaticConstraint::defaultRobotNumSet)
 Constrain the Center of Mass (CoM) within the support polygon. More...
virtual ~QuasiStaticConstraint (void)
bool isTimeValid (const double *t) const
int getNumConstraint (const double *t) const
void eval (const double *t, KinematicsCache< double > &cache, const double *weights, Eigen::VectorXd &c, Eigen::MatrixXd &dc) const
 Evaluate the constraint. More...
void bounds (const double *t, Eigen::VectorXd &lb, Eigen::VectorXd &ub) const
void name (const double *t, std::vector< std::string > &name_str) const
bool isActive () const
 Return whether the constraint is on/off. More...
int getNumWeights () const
void addContact (int num_new_bodies, const int *body, const Eigen::Matrix3Xd *body_pts)
 Add contact body and points. More...
void addContact (std::vector< int > body, const Eigen::Matrix3Xd &body_pts)
void setShrinkFactor (double factor)
 Set the factor to shrink the contact polygon. More...
void setActive (bool flag)
void updateRobot (RigidBodyTree< double > *robot)
void updateRobotnum (std::set< int > &model_instance_id_set)
- Public Member Functions inherited from RigidBodyConstraint
 RigidBodyConstraint (int category, RigidBodyTree< double > *robot, const Eigen::Vector2d &tspan=DrakeRigidBodyConstraint::default_tspan)
int getType () const
int getCategory () const
RigidBodyTree< double > * getRobotPointer () const
virtual ~RigidBodyConstraint (void)=0

Additional Inherited Members

- Static Public Attributes inherited from RigidBodyConstraint
static const int SingleTimeKinematicConstraintCategory = -1
static const int MultipleTimeKinematicConstraintCategory = -2
static const int QuasiStaticConstraintCategory = -3
static const int PostureConstraintCategory = -4
static const int MultipleTimeLinearPostureConstraintCategory = -5
static const int SingleTimeLinearPostureConstraintCategory = -6
static const int QuasiStaticConstraintType = 1
static const int PostureConstraintType = 2
static const int SingleTimeLinearPostureConstraintType = 3
static const int AllBodiesClosestDistanceConstraintType = 4
static const int WorldEulerConstraintType = 5
static const int WorldGazeDirConstraintType = 6
static const int WorldGazeOrientConstraintType = 7
static const int WorldGazeTargetConstraintType = 8
static const int RelativeGazeTargetConstraintType = 9
static const int WorldCoMConstraintType = 10
static const int WorldPositionConstraintType = 11
static const int WorldPositionInFrameConstraintType = 12
static const int WorldQuatConstraintType = 13
static const int Point2PointDistanceConstraintType = 14
static const int Point2LineSegDistConstraintType = 15
static const int WorldFixedPositionConstraintType = 16
static const int WorldFixedOrientConstraintType = 17
static const int WorldFixedBodyPoseConstraintType = 18
static const int PostureChangeConstraintType = 19
static const int RelativePositionConstraintType = 20
static const int RelativeQuatConstraintType = 24
static const int RelativeGazeDirConstraintType = 25
static const int MinDistanceConstraintType = 26
static const int GravityCompensationTorqueConstraintType = 27
- Protected Member Functions inherited from RigidBodyConstraint
std::string getTimeString (const double *t) const
void set_type (int type)
void set_robot (RigidBodyTree< double > *robot)
const doubletspan () const

Detailed Description

Constrain the Center of Mass (CoM) within the support polygon.

The support polygon is a shrunk area of the contact polygon/

Constructor & Destructor Documentation

◆ QuasiStaticConstraint()

QuasiStaticConstraint ( RigidBodyTree< double > *  robot,
const Eigen::Vector2d tspan = DrakeRigidBodyConstraint::default_tspan,
const std::set< int > &  model_instance_id_set = QuasiStaticConstraint::defaultRobotNumSet 

Constrain the Center of Mass (CoM) within the support polygon.

tspanThe time span of this constraint being active
model_instance_id_setThe set of the robots in the RigidBodyTree for which the CoM is computed

◆ ~QuasiStaticConstraint()

~QuasiStaticConstraint ( void  )

Member Function Documentation

◆ addContact() [1/2]

void addContact ( int  num_new_bodies,
const int body,
const Eigen::Matrix3Xd *  body_pts 

Add contact body and points.

num_new_bodiesNumber of new contact bodies.
bodyIndex of new contact bodies/frames.
body_ptsbody_pts[i] are the contact points on body[i].

◆ addContact() [2/2]

void addContact ( std::vector< int body,
const Eigen::Matrix3Xd &  body_pts 

◆ bounds()

void bounds ( const double t,
Eigen::VectorXd &  lb,
Eigen::VectorXd &  ub 
) const

◆ eval()

void eval ( const double t,
KinematicsCache< double > &  cache,
const double weights,
Eigen::VectorXd &  c,
Eigen::MatrixXd &  dc 
) const

Evaluate the constraint.

tTime to evaluate the constraint.
weightsWeight associated with each ground contact point.
dcGradient of the constraint.

◆ getNumConstraint()

int getNumConstraint ( const double t) const

◆ getNumWeights()

int getNumWeights ( ) const

◆ isActive()

bool isActive ( ) const

Return whether the constraint is on/off.

If active = false, even the time t is within tspan, the constraint is still inactive.

◆ isTimeValid()

bool isTimeValid ( const double t) const

◆ name()

void name ( const double t,
std::vector< std::string > &  name_str 
) const

◆ setActive()

void setActive ( bool  flag)

◆ setShrinkFactor()

void setShrinkFactor ( double  factor)

Set the factor to shrink the contact polygon.

The shrunk area is the support polygon.

◆ updateRobot()

void updateRobot ( RigidBodyTree< double > *  robot)

◆ updateRobotnum()

void updateRobotnum ( std::set< int > &  model_instance_id_set)

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