33 #ifndef DART_CONSTRAINT_BALLJOINTCONSTRAINT_HPP_
34 #define DART_CONSTRAINT_BALLJOINTCONSTRAINT_HPP_
36 #include <Eigen/Dense>
42 namespace constraint {
52 const Eigen::Vector3d& _jointPos);
59 const Eigen::Vector3d& _jointPos);
125 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
BallJointConstraint represents ball joint constraint between a body and the world or between two bodi...
Definition: BallJointConstraint.hpp:47
void excite() override
Excite the constraint.
Definition: BallJointConstraint.cpp:276
void unexcite() override
Unexcite the constraint.
Definition: BallJointConstraint.cpp:289
void getInformation(ConstraintInfo *_lcp) override
Fill LCP variables.
Definition: BallJointConstraint.cpp:127
Eigen::Matrix< double, 3, 6 > mJacobian1
Linear map between constraint space and Cartesian space for body1.
Definition: BallJointConstraint.hpp:112
Eigen::Vector3d mOffset2
Offset from the origin of body frame 2 to the ball joint position where the offset is expressed in bo...
Definition: BallJointConstraint.hpp:106
Eigen::Vector3d mOffset1
Offset from the origin of body frame 1 to the ball joint position where the offset is expressed in bo...
Definition: BallJointConstraint.hpp:102
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
void applyImpulse(double *_lambda) override
Apply computed constraint impulse to constrained skeletons.
Definition: BallJointConstraint.cpp:302
Eigen::Matrix< double, 3, 6 > mJacobian2
Linear map between constraint space and Cartesian space for body2.
Definition: BallJointConstraint.hpp:115
dynamics::SkeletonPtr getRootSkeleton() const override
Definition: BallJointConstraint.cpp:319
void uniteSkeletons() override
Definition: BallJointConstraint.cpp:344
void applyUnitImpulse(std::size_t _index) override
Apply unit impulse to constraint space.
Definition: BallJointConstraint.cpp:163
virtual ~BallJointConstraint()
Destructor.
Definition: BallJointConstraint.cpp:88
bool isActive() const override
Return true if this constraint is active.
Definition: BallJointConstraint.cpp:378
void update() override
Update constraint using updated Skeleton's states.
Definition: BallJointConstraint.cpp:93
double mOldX[3]
Definition: BallJointConstraint.hpp:118
std::size_t mAppliedImpulseIndex
Index of applied impulse.
Definition: BallJointConstraint.hpp:121
void getVelocityChange(double *_vel, bool _withCfm) override
Get velocity change due to the uint impulse.
Definition: BallJointConstraint.cpp:239
Eigen::Vector3d mViolation
Position constraint violation expressed in body frame 1.
Definition: BallJointConstraint.hpp:109
class JointConstraint
Definition: JointConstraint.hpp:48
BodyNode class represents a single node of the skeleton.
Definition: BodyNode.hpp:78
std::shared_ptr< Skeleton > SkeletonPtr
Definition: SmartPointer.hpp:60
Definition: BulletCollisionDetector.cpp:63
ConstraintInfo.
Definition: ConstraintBase.hpp:50