22 #ifndef _BULLETJOINT_HH_
23 #define _BULLETJOINT_HH_
25 #include <boost/any.hpp>
50 public:
virtual void Load(sdf::ElementPtr _sdf);
53 public:
virtual void Fini();
56 public:
virtual void Reset();
60 public:
LinkPtr GetJointLink(
unsigned int _index)
const;
66 public:
virtual void Detach();
69 public:
virtual void SetAnchor(
const unsigned int _index,
70 const ignition::math::Vector3d &_anchor);
73 public:
virtual void SetDamping(
unsigned int _index,
double _damping);
76 public:
virtual bool SetPosition(
77 const unsigned int _index,
const double _position,
78 const bool _preserveWorldVelocity =
false)
override;
81 public:
virtual void SetStiffness(
unsigned int _index,
82 const double _stiffness);
85 public:
virtual void SetStiffnessDamping(
unsigned int _index,
86 double _stiffness,
double _damping,
double _reference = 0);
89 public:
virtual ignition::math::Vector3d Anchor(
90 const unsigned int _index)
const;
94 public:
virtual ignition::math::Vector3d LinkForce(
95 const unsigned int _index)
const;
99 public:
virtual ignition::math::Vector3d LinkTorque(
100 const unsigned int _index)
const;
103 public:
virtual bool SetParam(
const std::string &_key,
105 const boost::any &_value);
108 public:
virtual double GetParam(
const std::string &_key,
109 unsigned int _index);
112 public:
virtual void SetProvideFeedback(
bool _enable);
115 public:
virtual void CacheForceTorque();
118 public:
virtual JointWrench GetForceTorque(
unsigned int _index);
121 public:
virtual void SetForce(
unsigned int _index,
double _force);
124 public:
virtual double GetForce(
unsigned int _index);
127 public:
virtual void Init();
130 public:
virtual void ApplyStiffnessDamping();
142 protected:
virtual void SetForceImpl(
unsigned int _index,
147 protected:
void SetupJointFeedback();
152 private:
void SaveForce(
unsigned int _index,
double _force);
161 private: btJointFeedback *feedback;
165 private:
bool stiffnessDampingInitialized;
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:109
btTypedConstraint * constraint
Pointer to a contraint object in Bullet.
Definition: BulletJoint.hh:155
btDynamicsWorld * bulletWorld
Pointer to Bullet's btDynamicsWorld.
Definition: BulletJoint.hh:158
#define MAX_JOINT_AXIS
maximum number of axis per joint anticipated.
Definition: Joint.hh:39
Base class for all joints.
Definition: Joint.hh:50
Wrench information from a joint.
Definition: JointWrench.hh:40
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Base class for all joints.
Definition: BulletJoint.hh:41
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:77
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:44