33 #ifndef DART_CONSTRAINT_JOINTLIMITCONSTRAINT_HPP_
34 #define DART_CONSTRAINT_JOINTLIMITCONSTRAINT_HPP_
36 #include <Eigen/Dense>
47 namespace constraint {
60 const std::string&
getType()
const override;
std::size_t index
Definition: SkelParser.cpp:1672
ConstrainedGroup is a group of skeletons that interact each other with constraints.
Definition: ConstrainedGroup.hpp:58
Constraint is a base class of concrete constraints classes.
Definition: ConstraintBase.hpp:75
ConstraintSolver manages constraints and computes constraint impulses.
Definition: ConstraintSolver.hpp:57
JointLimitConstraint handles joint position and velocity limits.
Definition: JointLimitConstraint.hpp:51
static double getErrorReductionParameter()
Get global error reduction parameter.
Definition: JointLimitConstraint.cpp:128
static double mMaxErrorReductionVelocity
Maximum error reduction velocity.
Definition: JointLimitConstraint.hpp:174
void unexcite() override
Unexcite the constraint.
Definition: JointLimitConstraint.cpp:430
static double mErrorAllowance
Global constraint error allowance.
Definition: JointLimitConstraint.hpp:167
const std::string & getType() const override
Returns a string representing the constraint type.
Definition: JointLimitConstraint.cpp:74
Eigen::Matrix< bool, 6, 1 > mIsVelocityLimitViolated
Whether joint value exceeds the velocity limit.
Definition: JointLimitConstraint.hpp:149
void getVelocityChange(double *delVel, bool withCfm) override
Get velocity change due to the uint impulse.
Definition: JointLimitConstraint.cpp:390
Eigen::Matrix< double, 6, 1 > mViolation
How much current joint values are exceeded from the limits.
Definition: JointLimitConstraint.hpp:152
Eigen::Matrix< bool, 6, 1 > mIsPositionLimitViolated
Whether joint value exceeds the position limit.
Definition: JointLimitConstraint.hpp:146
Eigen::Matrix< std::size_t, 6, 1 > mLifeTime
Life time of constraint of each DOF.
Definition: JointLimitConstraint.hpp:143
JointLimitConstraint(dynamics::Joint *joint)
Constructor.
Definition: JointLimitConstraint.cpp:58
void getInformation(ConstraintInfo *lcp) override
Fill LCP variables.
Definition: JointLimitConstraint.cpp:289
dynamics::SkeletonPtr getRootSkeleton() const override
Definition: JointLimitConstraint.cpp:458
Eigen::Matrix< double, 6, 1 > mUpperBound
Upper limit of the constraint impulse.
Definition: JointLimitConstraint.hpp:161
static double getConstraintForceMixing()
Get global constraint force mixing parameter.
Definition: JointLimitConstraint.cpp:170
static double getMaxErrorReductionVelocity()
Get global error reduction parameter.
Definition: JointLimitConstraint.cpp:149
Eigen::Matrix< double, 6, 1 > mOldX
Constraint impulse of the previous step.
Definition: JointLimitConstraint.hpp:158
static void setErrorAllowance(double allowance)
Set global error reduction parameter.
Definition: JointLimitConstraint.cpp:87
void update() override
Update constraint using updated Skeleton's states.
Definition: JointLimitConstraint.cpp:176
bool isActive() const override
Return true if this constraint is active.
Definition: JointLimitConstraint.cpp:464
static const std::string & getStaticType()
Returns constraint type for this class.
Definition: JointLimitConstraint.cpp:80
void applyUnitImpulse(std::size_t index) override
Apply unit impulse to constraint space.
Definition: JointLimitConstraint.cpp:358
static void setConstraintForceMixing(double cfm)
Set global constraint force mixing parameter.
Definition: JointLimitConstraint.cpp:155
Eigen::Matrix< double, 6, 1 > mLowerBound
Lower limit of the constraint impulse.
Definition: JointLimitConstraint.hpp:164
std::size_t mAppliedImpulseIndex
Index of applied impulse.
Definition: JointLimitConstraint.hpp:140
dynamics::BodyNode * mBodyNode
The child BodyNode of the Joint that this constraint is associated with.
Definition: JointLimitConstraint.hpp:137
static double getErrorAllowance()
Get global error reduction parameter.
Definition: JointLimitConstraint.cpp:102
static double mConstraintForceMixing
Global constraint force mixing parameter in the range of [1e-9, 1].
Definition: JointLimitConstraint.hpp:179
dynamics::Joint * mJoint
The Joint that this constraint is associated with.
Definition: JointLimitConstraint.hpp:134
void applyImpulse(double *lambda) override
Apply computed constraint impulse to constrained skeletons.
Definition: JointLimitConstraint.cpp:436
static double mErrorReductionParameter
Global constraint error redection parameter in the range of [0, 1].
Definition: JointLimitConstraint.hpp:171
static void setMaxErrorReductionVelocity(double erv)
Set global error reduction parameter.
Definition: JointLimitConstraint.cpp:134
Eigen::Matrix< double, 6, 1 > mNegativeVel
The desired delta velocity to satisfy the joint limit constraint.
Definition: JointLimitConstraint.hpp:155
~JointLimitConstraint() override=default
Destructor.
static void setErrorReductionParameter(double erp)
Set global error reduction parameter.
Definition: JointLimitConstraint.cpp:108
void excite() override
Excite the constraint.
Definition: JointLimitConstraint.cpp:424
BodyNode class represents a single node of the skeleton.
Definition: BodyNode.hpp:79
class Joint
Definition: Joint.hpp:60
std::shared_ptr< Skeleton > SkeletonPtr
Definition: SmartPointer.hpp:60
Definition: BulletCollisionDetector.cpp:65
ConstraintInfo.
Definition: ConstraintBase.hpp:50