20 #include <boost/any.hpp>
40 DAMPING_ACTIVE = 0x00000001,
42 JOINT_LIMIT = 0x00000002
53 public:
virtual void Load(sdf::ElementPtr _sdf);
56 public:
virtual void Reset();
59 public:
virtual LinkPtr GetJointLink(
unsigned int _index)
const;
62 public:
virtual bool AreConnected(
LinkPtr _one,
LinkPtr _two)
const;
65 public:
virtual void CacheForceTorque();
73 public:
virtual double GetParam(
unsigned int _parameter)
const;
81 public:
virtual void SetParam(
unsigned int _parameter,
double _value);
84 public:
virtual void SetDamping(
unsigned int _index,
double _damping);
87 public:
virtual bool SetPosition(
unsigned int _index,
double _position);
90 public:
virtual void SetStiffness(
unsigned int _index,
91 const double _stiffness);
94 public:
virtual void SetStiffnessDamping(
unsigned int _index,
95 double _stiffness,
double _damping,
double _reference = 0);
101 public:
virtual void Detach();
105 public:
void SetERP(
double _erp);
109 public:
double GetERP();
113 public:
void SetCFM(
double _cfm);
117 public:
double GetCFM();
121 public: dJointFeedback *GetFeedback();
125 public:
bool UsesImplicitSpringDamper();
129 public:
void UseImplicitSpringDamper(
const bool _implicit);
133 public:
void ApplyImplicitStiffnessDamping();
136 public:
void ApplyExplicitStiffnessDamping();
142 return this->stopCFM;
149 return this->stopERP;
161 private:
double ApplyAdaptiveDamping(
unsigned int _index,
162 const double _damping);
170 private:
void KpKdToCFMERP(
const double _dt,
171 const double _kp,
const double _kd,
172 double &_cfm,
double &_erp);
180 private:
void CFMERPToKpKd(
const double _dt,
181 const double _cfm,
const double _erp,
182 double &_kp,
double &_kd);
195 private:
bool stiffnessDampingInitialized;
198 private:
bool useImplicitSpringDamper;
201 public:
virtual bool SetHighStop(
unsigned int _index,
205 public:
virtual bool SetLowStop(
unsigned int _index,
209 public:
virtual math::Angle GetHighStop(
unsigned int _index);
212 public:
virtual math::Angle GetLowStop(
unsigned int _index);
215 public:
virtual math::Vector3 GetLinkForce(
unsigned int _index)
const;
218 public:
virtual math::Vector3 GetLinkTorque(
unsigned int _index)
const;
221 public:
virtual void SetAxis(
unsigned int _index,
225 public:
virtual bool SetParam(
const std::string &_key,
227 const boost::any &_value);
230 public:
virtual double GetParam(
const std::string &_key,
231 unsigned int _index);
234 public:
virtual void SetProvideFeedback(
bool _enable);
237 public:
virtual JointWrench GetForceTorque(
unsigned int _index);
240 public:
virtual void SetForce(
unsigned int _index,
double _force);
243 public:
virtual double GetForce(
unsigned int _index);
246 public:
virtual void ApplyStiffnessDamping();
257 protected:
virtual void SetForceImpl(
258 unsigned int _index,
double _force) = 0;
263 private:
void SaveForce(
unsigned int _index,
double _force);
269 private: dJointFeedback *feedback;
272 private:
double stopCFM;
275 private:
double stopERP;
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:68
double GetStopCFM()
Get access to stopCFM.
Definition: ODEJoint.hh:140
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
#define GZ_PHYSICS_ODE_VISIBLE
Definition: system.hh:343
dJointID jointId
This is our ODE ID.
Definition: ODEJoint.hh:266
CFMMode
internal variables used for implicit damping
Definition: ODEJoint.hh:35
#define MAX_JOINT_AXIS
maximum number of axis per joint anticipated.
Definition: Joint.hh:39
double GetStopERP()
Get access to stopERP.
Definition: ODEJoint.hh:147
Base class for all joints.
Definition: Joint.hh:50
Wrench information from a joint.
Definition: JointWrench.hh:39
ODE joint interface.
Definition: ODEJoint.hh:32
An angle and related functions.
Definition: Angle.hh:53
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:92
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:39