17#ifndef _GAZEBO_BULLET_UNIVERSAL_CONSTRAINT_
18#define _GAZEBO_BULLET_UNIVERSAL_CONSTRAINT_
29: public btGeneric6DofConstraint
43 const btVector3 &_anchor,
44 const btVector3 &_axis1,
45 const btVector3 &_axis2);
55 const btVector3 &_anchor,
56 const btVector3 &_axis1,
57 const btVector3 &_axis2);
106 public:
void setAxis(
const btVector3 &_axis1,
const btVector3 &_axis2);
138 private: btScalar maxMotorImpulse[2];
Functions that implement a universal joint/constraint using bullet.
Definition gzBtUniversalConstraint.hh:30
btScalar getAngle1()
Get the value of angle 1 in radians.
BT_DECLARE_ALIGNED_ALLOCATOR()
void getUpperLimit(btScalar &_ang1max, btScalar &_ang2max)
Get upper limits.
btScalar getMaxMotorImpulse2() const
Get the maximum allowed motor impluse for the second axis of rotation.
const btVector3 & getAnchor()
Get the anchor point in link A reference frame.
const btVector3 & getAnchor2()
Get the anchor point in link B reference frame.
btScalar getMaxMotorImpulse1() const
Get the maximum allowed motor impluse for the first axis of rotation.
void setUpperLimit(btScalar _ang1max, btScalar _ang2max)
Set upper limits.
void setAxis(const btVector3 &_axis1, const btVector3 &_axis2)
Set the axis of rotation.
btVector3 m_axis1
First axis of rotation.
Definition gzBtUniversalConstraint.hh:132
void setMaxMotorImpulse2(btScalar _i)
Set the maximum allowed motor impluse for the second axis of rotation.
void getLowerLimit(btScalar &_ang1min, btScalar &_ang2min)
Get lower limits.
btVector3 m_axis2
Second axis of rotation.
Definition gzBtUniversalConstraint.hh:135
gzBtUniversalConstraint(btRigidBody &_rbA, const btVector3 &_anchor, const btVector3 &_axis1, const btVector3 &_axis2)
Constructor.
gzBtUniversalConstraint(btRigidBody &_rbA, btRigidBody &_rbB, const btVector3 &_anchor, const btVector3 &_axis1, const btVector3 &_axis2)
Constructor.
btScalar getAngle2()
Get the value of angle 2 in radians.
void setMaxMotorImpulse1(btScalar _i)
Set the maximum allowed motor impluse for the first axis of rotation.
const btVector3 & getAxis2()
Get the second axis of rotation.
void setLowerLimit(btScalar _ang1min, btScalar _ang2min)
Set lower limits.
btVector3 m_anchor
Anchor point in world coordinate frame.
Definition gzBtUniversalConstraint.hh:129
const btVector3 & getAxis1()
Get the first axis of rotation.