33 #ifndef DART_CONSTRAINT_BALLJOINTCONSTRAINT_HPP_ 34 #define DART_CONSTRAINT_BALLJOINTCONSTRAINT_HPP_ 36 #include <Eigen/Dense> 38 #include "dart/dynamics/JointConstraint.hpp" 39 #include "dart/math/MathTypes.hpp" 63 const Eigen::Vector3d& _jointPos);
69 const std::string&
getType()
const override;
104 dynamics::SkeletonPtr getRootSkeleton()
const override;
107 void uniteSkeletons()
override;
112 Eigen::Vector3d mOffset1;
116 Eigen::Vector3d mOffset2;
119 Eigen::Vector3d mViolation;
122 Eigen::Matrix<double, 3, 6> mJacobian1;
125 Eigen::Matrix<double, 3, 6> mJacobian2;
131 std::size_t mAppliedImpulseIndex;
135 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
141 #endif // DART_CONSTRAINT_BALLJOINTCONSTRAINT_HPP_ void excite() override
Excite the constraint.
Definition: BallJointConstraint.cpp:292
void applyImpulse(double *_lambda) override
Apply computed constraint impulse to constrained skeletons.
Definition: BallJointConstraint.cpp:318
void getInformation(ConstraintInfo *_lcp) override
Fill LCP variables.
Definition: BallJointConstraint.cpp:142
static const std::string & getStaticType()
Returns constraint type for this class.
Definition: BallJointConstraint.cpp:100
BallJointConstraint represents ball joint constraint between a body and the world or between two bodi...
Definition: BallJointConstraint.hpp:46
void update() override
Update constraint using updated Skeleton's states.
Definition: BallJointConstraint.cpp:107
void getVelocityChange(double *_vel, bool _withCfm) override
Get velocity change due to the uint impulse.
Definition: BallJointConstraint.cpp:257
class JointConstraint
Definition: JointConstraint.hpp:47
void applyUnitImpulse(std::size_t _index) override
Apply unit impulse to constraint space.
Definition: BallJointConstraint.cpp:179
ConstraintInfo.
Definition: ConstraintBase.hpp:49
void unexcite() override
Unexcite the constraint.
Definition: BallJointConstraint.cpp:305
Definition: Aspect.cpp:40
BallJointConstraint(dynamics::BodyNode *_body, const Eigen::Vector3d &_jointPos)
Constructor that takes one body and the joint position in the world frame.
Definition: BallJointConstraint.cpp:44
virtual ~BallJointConstraint()
Destructor.
Definition: BallJointConstraint.cpp:89
BodyNode class represents a single node of the skeleton.
Definition: BodyNode.hpp:74
const std::string & getType() const override
Returns a string representing the constraint type.
Definition: BallJointConstraint.cpp:94
bool isActive() const override
Return true if this constraint is active.
Definition: BallJointConstraint.cpp:395