Go to the documentation of this file.
18 #ifndef _GAZEBO_DARTJOINT_HH_
19 #define _GAZEBO_DARTJOINT_HH_
21 #include <boost/any.hpp>
35 class DARTJointPrivate;
51 public:
virtual void Load(sdf::ElementPtr _sdf)
override;
54 public:
virtual void Init()
override;
57 public:
virtual void SetName(
const std::string &_name)
override;
60 public:
virtual void Reset()
override;
63 public:
virtual LinkPtr GetJointLink(
unsigned int _index)
const override;
66 public:
virtual bool AreConnected(
LinkPtr _one,
LinkPtr _two)
const
70 public:
virtual void Attach(
LinkPtr _parent,
LinkPtr _child)
override;
73 public:
virtual void Detach()
override;
76 public:
virtual void SetDamping(
unsigned int _index,
double _damping)
80 public:
virtual void SetStiffnessDamping(
unsigned int _index,
81 double _stiffness,
double _damping,
double _reference = 0)
override;
84 public:
virtual void SetStiffness(
unsigned int _index,
85 const double _stiffness)
override;
88 public:
virtual void SetAnchor(
const unsigned int ,
89 const ignition::math::Vector3d &)
override;
91 public:
virtual ignition::math::Vector3d Anchor(
92 const unsigned int )
const override final;
95 public:
virtual void SetVelocity(
unsigned int _index,
double _vel)
99 public:
virtual double GetVelocity(
unsigned int _index)
103 public:
virtual void SetForce(
unsigned int _index,
double _force)
107 public:
virtual double GetForce(
unsigned int _index)
override;
110 public:
virtual JointWrench GetForceTorque(
unsigned int _index)
override;
113 public:
virtual bool SetPosition(
114 const unsigned int _index,
115 const double _position,
116 const bool _preserveWorldVelocity =
false)
120 public:
virtual ignition::math::Vector3d LinkForce(
121 const unsigned int _index)
const override;
124 public:
virtual ignition::math::Vector3d LinkTorque(
125 const unsigned int _index)
const override;
128 public:
virtual bool SetParam(
const std::string &_key,
130 const boost::any &_value)
override;
133 public:
virtual double GetParam(
const std::string &_key,
134 unsigned int _index)
override;
137 public:
virtual double LowerLimit(
const unsigned int _index)
const
141 public:
virtual double UpperLimit(
const unsigned int _index)
const
145 public:
virtual void SetLowerLimit(
const unsigned int _index,
146 const double _limit)
override;
149 public:
virtual void SetUpperLimit(
const unsigned int _index,
150 const double _limit)
override;
153 public:
virtual void CacheForceTorque()
override;
156 protected:
virtual double PositionImpl(
const unsigned int _index = 0)
160 public:
virtual void ApplyDamping();
170 protected:
void SetForceImpl(
unsigned int _index,
double _force);
175 private:
void SaveForce(
unsigned int _index,
double _force);
186 public:
void SetDARTJoint(dart::dynamics::Joint *_dtJoint);
190 public: dart::dynamics::Joint *GetDARTJoint();
void SetDARTJoint(dart::dynamics::Joint *_dtJoint)
Set DART joint pointer.
DARTModelPtr GetDARTModel() const
Get DART model pointer.
virtual ~DARTJoint()
Destructor.
void SetForceImpl(unsigned int _index, double _force)
Set the force applied to this physics::Joint.
virtual void CacheForceTorque() override
Cache Joint Force Torque Values if necessary for physics engine.
virtual void Attach(LinkPtr _parent, LinkPtr _child) override
Attach the two bodies with this joint.
virtual void SetVelocity(unsigned int _index, double _vel) override final
Set the velocity of an axis(index).
virtual void SetStiffness(unsigned int _index, const double _stiffness) override
Set the joint spring stiffness.
virtual ignition::math::Vector3d Anchor(const unsigned int) const override final
Get the anchor point.
virtual void SetForce(unsigned int _index, double _force) override
Set the force applied to this physics::Joint.
Forward declarations for the common classes.
Definition: Animation.hh:26
virtual double UpperLimit(const unsigned int _index) const override
Get the joint's upper limit.
virtual void Load(sdf::ElementPtr _sdf) override
Load physics::Joint from a SDF sdf::Element.
virtual bool AreConnected(LinkPtr _one, LinkPtr _two) const override
Determines of the two bodies are connected by a joint.
virtual void Init() override
Initialize a joint.
virtual double LowerLimit(const unsigned int _index) const override
Get the joint's lower limit.
virtual void SetUpperLimit(const unsigned int _index, const double _limit) override
Set the joint's upper limit.
virtual void SetAnchor(const unsigned int, const ignition::math::Vector3d &) override
Set the anchor point.
virtual void ApplyDamping()
virtual LinkPtr GetJointLink(unsigned int _index) const override
Get the link to which the joint is attached according the _index.
virtual ignition::math::Vector3d LinkForce(const unsigned int _index) const override
Get the forces applied to the center of mass of a physics::Link due to the existence of this Joint.
virtual double GetParam(const std::string &_key, unsigned int _index) override
Get a non-generic parameter for the joint.
DARTJointPropPtr DARTProperties() const
Get DART Joint properties.
Base class for all joints.
Definition: Joint.hh:50
virtual double PositionImpl(const unsigned int _index=0) const override
Helper function to get the position of an axis.
virtual bool SetParam(const std::string &_key, unsigned int _index, const boost::any &_value) override
Set a non-generic parameter for the joint.
dart::dynamics::Joint * GetDARTJoint()
Get DART joint pointer.
virtual bool SetPosition(const unsigned int _index, const double _position, const bool _preserveWorldVelocity=false) override final
The child links of this joint are updated based on desired position.
DARTJointPrivate * dataPtr
Definition: DARTJoint.hh:194
virtual JointWrench GetForceTorque(unsigned int _index) override
get internal force and torque values at a joint.
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:78
virtual void SetStiffnessDamping(unsigned int _index, double _stiffness, double _damping, double _reference=0) override
Set the joint spring stiffness.
virtual double GetForce(unsigned int _index) override
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< DARTModel > DARTModelPtr
Definition: DARTTypes.hh:46
virtual void Reset() override
Reset the joint.
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:110
virtual void SetName(const std::string &_name) override
Set the name of the entity.
virtual void SetLowerLimit(const unsigned int _index, const double _limit) override
Set the joint's lower limit.
virtual double GetVelocity(unsigned int _index) const override
Get the rotation rate of an axis(index)
virtual void Detach() override
Detach this joint from all links.
std::shared_ptr< dart::dynamics::Joint::Properties > DARTJointPropPtr
Definition: DARTTypes.hh:56
virtual void SetDamping(unsigned int _index, double _damping) override
Set the joint damping.
DARTJoint(BasePtr _parent)
Constructor.
virtual ignition::math::Vector3d LinkTorque(const unsigned int _index) const override
Get the torque applied to the center of mass of a physics::Link due to the existence of this Joint.
Wrench information from a joint. These are forces and torques on parent and child Links,...
Definition: JointWrench.hh:40
DART joint interface.
Definition: DARTJoint.hh:41