18 #ifndef _SIMBODY_JOINT_HH_
19 #define _SIMBODY_JOINT_HH_
21 #include <boost/any.hpp>
46 public:
virtual void Load(sdf::ElementPtr _sdf);
49 public:
virtual void Reset();
52 public:
virtual LinkPtr GetJointLink(
unsigned int _index)
const;
55 public:
virtual bool AreConnected(
LinkPtr _one,
LinkPtr _two)
const;
58 public:
virtual void Detach();
61 public:
virtual void SetAnchor(
const unsigned int _index,
62 const ignition::math::Vector3d &_anchor);
65 public:
virtual void SetDamping(
unsigned int _index,
66 const double _damping);
69 public:
virtual void SetStiffness(
unsigned int _index,
70 const double _stiffness);
73 public:
virtual void SetStiffnessDamping(
unsigned int _index,
74 double _stiffness,
double _damping,
double _reference = 0);
77 public:
virtual ignition::math::Vector3d Anchor(
78 const unsigned int _index)
const;
81 public:
virtual ignition::math::Vector3d LinkForce(
82 const unsigned int _index)
const;
85 public:
virtual ignition::math::Vector3d LinkTorque(
86 const unsigned int _index)
const;
89 public:
virtual bool SetParam(
const std::string &_key,
91 const boost::any &_value);
94 public:
virtual double GetParam(
const std::string &_key,
98 public:
virtual void SaveSimbodyState(
const SimTK::State &_state);
101 public:
virtual void RestoreSimbodyState(SimTK::State &_state);
104 public:
virtual void SetForce(
unsigned int _index,
double _force);
107 public:
virtual double GetForce(
unsigned int _index);
110 public:
virtual void SetAxis(
const unsigned int _index,
111 const ignition::math::Vector3d &_axis);
114 public:
virtual JointWrench GetForceTorque(
unsigned int _index);
126 protected:
virtual void SetForceImpl(
unsigned int _index,
132 private:
void SaveForce(
unsigned int _index,
double _force);
135 public:
virtual void CacheForceTorque();
144 public: SimTK::Transform
xPA;
147 public: SimTK::Transform
xCB;
194 public:
virtual void SetUpperLimit(
const unsigned int _index,
195 const double _limit);
198 public:
virtual void SetLowerLimit(
const unsigned int _index,
199 const double _limit);
202 public:
virtual double UpperLimit(
const unsigned int _index)
const;
205 public:
virtual double LowerLimit(
const unsigned int _index)
const;
208 protected: SimTK::MultibodySystem *
world;
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:109
SimTK::Constraint constraint
: isValid() if we used a constraint to model this joint.
Definition: SimbodyJoint.hh:188
bool isReversed
: if mobilizer, did it reverse parent&child? Set when we build the Simbody model. ...
Definition: SimbodyJoint.hh:181
SimTK::Transform xCB
child body frame to mobilizer frame
Definition: SimbodyJoint.hh:147
SimTK::Transform xPA
Normally A=F, B=M.
Definition: SimbodyJoint.hh:144
SimbodyPhysicsPtr simbodyPhysics
keep a pointer to the simbody physics engine for convenience
Definition: SimbodyJoint.hh:211
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:42
SimTK::MultibodySystem * world
Simbody Multibody System.
Definition: SimbodyJoint.hh:208
SimTK::Transform defxAB
default mobilizer pose
Definition: SimbodyJoint.hh:150
Base class for all joints.
Definition: Joint.hh:53
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:177
bool physicsInitialized
Definition: SimbodyJoint.hh:191
bool mustBreakLoopHere
Force Simbody to break a loop by using a weld constraint.
Definition: SimbodyJoint.hh:140
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