27 m_desiredVelocity(0, 0, 0),
28 m_desiredPosition(0,0,0,1),
29 m_use_multi_dof_params(false),
34 m_maxAppliedImpulseMultiDof(maxMotorImpulse, maxMotorImpulse, maxMotorImpulse),
35 m_damping(1.0, 1.0, 1.0)
146 btScalar velocityError = (desiredVelocity - currentVelocity) * kd;
160 posError = kp*angleDiff[row % 3];
166 -max_applied_impulse, max_applied_impulse,
true,
@ MULTIBODY_CONSTRAINT_SPHERICAL_MOTOR
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
T & expandNonInitializing()
static bool matrixToEulerXYZ(const btMatrix3x3 &mat, btVector3 &xyz)
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
void setIdentity()
Set the matrix to the identity.
btVector3 getColumn(int i) const
Get a column of the matrix as a vector.
btScalar * jacobianA(int row)
btScalar m_maxAppliedImpulse
void allocateJacobiansMultiDof()
btScalar fillMultiBodyConstraint(btMultiBodySolverConstraint &solverConstraint, btMultiBodyJacobianData &data, btScalar *jacOrgA, btScalar *jacOrgB, const btVector3 &constraintNormalAng, const btVector3 &constraintNormalLin, const btVector3 &posAworld, const btVector3 &posBworld, btScalar posError, const btContactSolverInfo &infoGlobal, btScalar lowerLimit, btScalar upperLimit, bool angConstraint=false, btScalar relaxation=1.f, bool isFriction=false, btScalar desiredVelocity=0, btScalar cfmSlip=0, btScalar damping=1.0)
virtual int getIslandIdA() const
btVector3 m_desiredVelocity
btVector3 m_maxAppliedImpulseMultiDof
btMultiBodySphericalJointMotor(btMultiBody *body, int link, btScalar maxMotorImpulse)
This file was written by Erwin Coumans.
virtual void finalizeMultiDof()
virtual void createConstraintRows(btMultiBodyConstraintArray &constraintRows, btMultiBodyJacobianData &data, const btContactSolverInfo &infoGlobal)
virtual int getIslandIdB() const
btQuaternion m_desiredPosition
bool m_use_multi_dof_params
virtual ~btMultiBodySphericalJointMotor()
btMatrix3x3 localFrameToWorld(int i, const btMatrix3x3 &local_frame) const
btScalar * getJointPosMultiDof(int i)
const btMultibodyLink & getLink(int index) const
const btMultiBodyLinkCollider * getBaseCollider() const
btScalar * getJointVelMultiDof(int i)
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
btQuaternion inverse() const
Return the inverse of this quaternion.
btVector3 can be used to represent 3D points and vectors.
1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and fr...
btMultiBodyConstraint * m_orgConstraint
class btMultiBodyLinkCollider * m_collider
eFeatherstoneJointType m_jointType