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