18 #ifndef _SIMBODY_JOINT_HH_ 19 #define _SIMBODY_JOINT_HH_ 21 #include <boost/any.hpp> 46 public:
virtual void Load(sdf::ElementPtr _sdf)
override;
49 public:
virtual void Reset()
override;
52 public:
virtual LinkPtr GetJointLink(
unsigned int _index)
const override;
55 public:
virtual bool AreConnected(
LinkPtr _one,
LinkPtr _two)
const 59 public:
virtual void Detach()
override;
62 public:
virtual void SetAnchor(
const unsigned int _index,
63 const ignition::math::Vector3d &_anchor)
override;
66 public:
virtual void SetDamping(
unsigned int _index,
67 const double _damping)
override;
70 public:
virtual void SetStiffness(
unsigned int _index,
71 const double _stiffness)
override;
74 public:
virtual void SetStiffnessDamping(
unsigned int _index,
75 double _stiffness,
double _damping,
double _reference = 0)
override;
78 public:
virtual ignition::math::Vector3d Anchor(
79 const unsigned int _index)
const override;
82 public:
virtual bool SetPosition(
83 const unsigned int _index,
84 const double _position,
85 const bool _preserveWorldVelocity =
false)
89 public:
virtual ignition::math::Vector3d LinkForce(
90 const unsigned int _index)
const override;
93 public:
virtual ignition::math::Vector3d LinkTorque(
94 const unsigned int _index)
const override;
97 public:
virtual bool SetParam(
const std::string &_key,
99 const boost::any &_value)
103 public:
virtual double GetParam(
const std::string &_key,
104 unsigned int _index)
override;
107 public:
virtual void SaveSimbodyState(
const SimTK::State &_state);
110 public:
virtual void RestoreSimbodyState(SimTK::State &_state);
113 public:
virtual void SetForce(
unsigned int _index,
double _force)
117 public:
virtual double GetForce(
unsigned int _index)
override;
120 public:
virtual void SetAxis(
const unsigned int _index,
121 const ignition::math::Vector3d &_axis)
125 public:
virtual JointWrench GetForceTorque(
unsigned int _index)
override;
137 protected:
virtual void SetForceImpl(
unsigned int _index,
143 private:
void SaveForce(
unsigned int _index,
double _force);
146 public:
virtual void CacheForceTorque()
override;
155 public: SimTK::Transform
xPA;
158 public: SimTK::Transform
xCB;
205 public:
virtual void SetUpperLimit(
const unsigned int _index,
206 const double _limit)
override;
209 public:
virtual void SetLowerLimit(
const unsigned int _index,
210 const double _limit)
override;
213 public:
virtual double UpperLimit(
const unsigned int _index)
const 217 public:
virtual double LowerLimit(
const unsigned int _index)
const 221 protected: SimTK::MultibodySystem *
world;
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:110
Forward declarations for the common classes.
Definition: Animation.hh:26
SimTK::Constraint constraint
: isValid() if we used a constraint to model this joint.
Definition: SimbodyJoint.hh:199
bool isReversed
: if mobilizer, did it reverse parent&child? Set when we build the Simbody model. ...
Definition: SimbodyJoint.hh:192
SimTK::Transform xCB
child body frame to mobilizer frame
Definition: SimbodyJoint.hh:158
SimTK::Transform xPA
Normally A=F, B=M.
Definition: SimbodyJoint.hh:155
SimbodyPhysicsPtr simbodyPhysics
keep a pointer to the simbody physics engine for convenience
Definition: SimbodyJoint.hh:224
Base class for all joints.
Definition: SimbodyJoint.hh:37
boost::shared_ptr< SimbodyPhysics > SimbodyPhysicsPtr
Definition: SimbodyTypes.hh:40
#define MAX_JOINT_AXIS
maximum number of axis per joint anticipated.
Definition: Joint.hh:39
SimTK::MultibodySystem * world
Simbody Multibody System.
Definition: SimbodyJoint.hh:221
SimTK::Transform defxAB
default mobilizer pose
Definition: SimbodyJoint.hh:161
Base class for all joints.
Definition: Joint.hh:50
Wrench information from a joint.
Definition: JointWrench.hh:40
SimTK::MobilizedBody mobod
Use isValid() if we used a mobilizer Set when we build the Simbody model.
Definition: SimbodyJoint.hh:188
bool physicsInitialized
Definition: SimbodyJoint.hh:202
bool mustBreakLoopHere
Force Simbody to break a loop by using a weld constraint.
Definition: SimbodyJoint.hh:151
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:78
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:47