Drake
SingleTimeLinearPostureConstraint Class Reference

Constrain the posture satisfies lb <= A_mat * q <= ub at any time, where A_mat is a sparse matrix. More...

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

Public Member Functions

 SingleTimeLinearPostureConstraint (RigidBodyTree< double > *robot, const Eigen::VectorXi &iAfun, const Eigen::VectorXi &jAvar, const Eigen::VectorXd &A, const Eigen::VectorXd &lb, const Eigen::VectorXd &ub, const Eigen::Vector2d &tspan=DrakeRigidBodyConstraint::default_tspan)
 
virtual ~SingleTimeLinearPostureConstraint (void)
 
bool isTimeValid (const double *t) const
 
int getNumConstraint (const double *t) const
 
void bounds (const double *t, Eigen::VectorXd &lb, Eigen::VectorXd &ub) const
 
void feval (const double *t, const Eigen::VectorXd &q, Eigen::VectorXd &c) const
 Return the value of the constraint. More...
 
void geval (const double *t, Eigen::VectorXi &iAfun, Eigen::VectorXi &jAvar, Eigen::VectorXd &A) const
 Return the gradient of the constraint, written in the sprase matrix form. More...
 
void eval (const double *t, const Eigen::VectorXd &q, Eigen::VectorXd &c, Eigen::SparseMatrix< double > &dc) const
 Return the value and gradient of the constraint. More...
 
void name (const double *t, std::vector< std::string > &name_str) const
 
- 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 posture satisfies lb <= A_mat * q <= ub at any time, where A_mat is a sparse matrix.

Constructor & Destructor Documentation

◆ SingleTimeLinearPostureConstraint()

SingleTimeLinearPostureConstraint ( RigidBodyTree< double > *  robot,
const Eigen::VectorXi &  iAfun,
const Eigen::VectorXi &  jAvar,
const Eigen::VectorXd &  A,
const Eigen::VectorXd &  lb,
const Eigen::VectorXd &  ub,
const Eigen::Vector2d tspan = DrakeRigidBodyConstraint::default_tspan 
)
Parameters
[in]robot
[in]iAfunrow indices of non zero entries
[in]jAvarcolumn indices of non zero entries
[in]Avalues of non zero entries
[in]lblower bound of the constraint, a column vector.
[in]ubupper bound of the constraint, a column vector.
[in]tspantime span [tspan[0] tspan[1]] is the time span of the constraint being active.

◆ ~SingleTimeLinearPostureConstraint()

virtual ~SingleTimeLinearPostureConstraint ( void  )
inlinevirtual

Member Function Documentation

◆ bounds()

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

◆ eval()

void eval ( const double t,
const Eigen::VectorXd &  q,
Eigen::VectorXd &  c,
Eigen::SparseMatrix< double > &  dc 
) const

Return the value and gradient of the constraint.

Parameters
[in]tArray of time.
[in]n_breaksLength of array t.
[in]qq.col(i) is the posture at t[i].
[out]cValue of the constraint.
[out]dcGradient of the constraint w.r.t. q.

◆ feval()

void feval ( const double t,
const Eigen::VectorXd &  q,
Eigen::VectorXd &  c 
) const

Return the value of the constraint.

◆ getNumConstraint()

int getNumConstraint ( const double t) const

◆ geval()

void geval ( const double t,
Eigen::VectorXi &  iAfun,
Eigen::VectorXi &  jAvar,
Eigen::VectorXd &  A 
) const

Return the gradient of the constraint, written in the sprase matrix form.

Parameters
[out]iAfunRow index of the non-zero entries in the gradient matrix.
[out]jAvarColumn index of the non-zero entries in the gradient matrix.
[out]AValue of the non-zero entries in the gradient matrix

◆ isTimeValid()

bool isTimeValid ( const double t) const

◆ name()

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

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