17#ifndef GAZEBO_PHYSICS_SIMBODY_SIMBODYLINK_HH_
18#define GAZEBO_PHYSICS_SIMBODY_SIMBODYLINK_HH_
47 public:
virtual void Load(sdf::ElementPtr _ptr);
50 public:
virtual void Init();
53 public:
virtual void Fini();
65 public:
virtual void SetLinearVel(
const ignition::math::Vector3d &_vel);
68 public:
virtual void SetAngularVel(
const ignition::math::Vector3d &_vel);
71 public:
virtual void SetForce(
const ignition::math::Vector3d &_force);
74 public:
virtual void SetTorque(
const ignition::math::Vector3d &_force);
78 const ignition::math::Vector3d &_vector3)
const;
82 const ignition::math::Vector3d &_offset,
83 const ignition::math::Quaterniond &_q)
const;
92 public:
virtual ignition::math::Vector3d
WorldForce()
const;
113 public:
virtual void AddForce(
const ignition::math::Vector3d &_force);
117 const ignition::math::Vector3d &_force);
121 const ignition::math::Vector3d &_force,
122 const ignition::math::Vector3d &_pos);
126 const ignition::math::Vector3d &_force,
127 const ignition::math::Vector3d &_relpos);
130 public:
virtual void AddLinkForce(
const ignition::math::Vector3d &_force,
131 const ignition::math::Vector3d &_offset =
132 ignition::math::Vector3d::Zero);
135 public:
virtual void AddTorque(
const ignition::math::Vector3d &_torque);
139 const ignition::math::Vector3d &_torque);
163 int _numFragments)
const;
174 private:
void ProcessSetGravityMode();
178 private:
void ProcessSetLinkStatic();
199 private:
bool gravityMode;
202 private:
bool staticLinkDirty;
205 private:
bool gravityModeDirty;
208 private:
bool staticLink;
217 private: std::vector<double> simbodyQ;
220 private: std::vector<double> simbodyU;
Simbody wrapper forward declarations and typedefs.
Link class defines a rigid body entity, containing information on inertia, visual and collision prope...
Definition Link.hh:53
Simbody Link class.
Definition SimbodyLink.hh:39
bool physicsInitialized
Definition SimbodyLink.hh:189
virtual ignition::math::Vector3d WorldLinearVel(const ignition::math::Vector3d &_vector3) const
Get the linear velocity of a point on the body in the world frame, using an offset expressed in a bod...
virtual void SetAngularVel(const ignition::math::Vector3d &_vel)
Set the angular velocity of the body.
virtual void UpdateMass()
Update the mass matrix.
virtual void Fini()
Finalize the body.
virtual void RestoreSimbodyState(SimTK::State &_state)
SimTK::MassProperties GetEffectiveMassProps(int _numFragments) const
virtual void SetLinearDamping(double _damping)
Set the linear damping factor.
virtual void Init()
Initialize the body.
SimTK::MobilizedBody masterMobod
Definition SimbodyLink.hh:186
virtual void AddRelativeForce(const ignition::math::Vector3d &_force)
Add a force to the body, components are relative to the body's own frame of reference.
virtual bool GetEnabled() const
Get whether this body is enabled in the physics engine.
virtual void Load(sdf::ElementPtr _ptr)
Load the body based on an SDF element.
virtual bool GetGravityMode() const
Get the gravity mode.
virtual void SetForce(const ignition::math::Vector3d &_force)
Set the force applied to the body.
virtual void SetSelfCollide(bool _collide)
Set whether this body will collide with others in the model.
bool mustBeBaseLink
: Force this link to be a base body, where its inboard body is the world with 6DOF.
Definition SimbodyLink.hh:182
virtual void SetAutoDisable(bool _disable)
Allow the link to auto disable.
virtual void SetLinkStatic(bool _static)
If the inboard body of this link is ground, simply lock the inboard joint to freeze it to ground.
virtual ignition::math::Vector3d WorldAngularVel() const
Get the angular velocity of the entity in the world frame.
void SetDirtyPose(const ignition::math::Pose3d &_pose)
Set the dirty pose.
virtual void SaveSimbodyState(const SimTK::State &_state)
virtual void AddTorque(const ignition::math::Vector3d &_torque)
Add a torque to the body.
virtual void AddLinkForce(const ignition::math::Vector3d &_force, const ignition::math::Vector3d &_offset=ignition::math::Vector3d::Zero)
Add a force expressed in the link frame.
virtual void AddForceAtWorldPosition(const ignition::math::Vector3d &_force, const ignition::math::Vector3d &_pos)
Add a force to the body using a global position.
virtual void SetEnabled(bool enable) const
Set whether this body is enabled.
virtual ignition::math::Vector3d WorldForce() const
Get the force applied to the body in the world frame.
virtual void SetLinearVel(const ignition::math::Vector3d &_vel)
Set the linear velocity of the body.
virtual void SetGravityMode(bool _mode)
Set whether gravity affects this body.
virtual void AddForceAtRelativePosition(const ignition::math::Vector3d &_force, const ignition::math::Vector3d &_relpos)
Add a force (in world frame coordinates) to the body at a position relative to the center of mass whi...
virtual void AddForce(const ignition::math::Vector3d &_force)
Add a force to the body.
virtual ignition::math::Vector3d WorldCoGLinearVel() const
Get the linear velocity at the body's center of gravity in the world frame.
virtual ignition::math::Vector3d WorldLinearVel(const ignition::math::Vector3d &_offset, const ignition::math::Quaterniond &_q) const
Get the linear velocity of a point on the body in the world frame, using an offset expressed in an ar...
virtual ignition::math::Vector3d WorldTorque() const
Get the torque applied to the body about the center of mass in world frame coordinates.
virtual void OnPoseChange()
This function is called when the entity's (or one of its parents) pose of the parent has changed.
SimTK::MassProperties GetMassProperties() const
Convert Gazebo Inertia to Simbody MassProperties Where Simbody MassProperties contains mass,...
virtual void SetAngularDamping(double _damping)
Set the angular damping factor.
std::vector< SimTK::Constraint::Weld > slaveWelds
Definition SimbodyLink.hh:196
virtual void AddRelativeTorque(const ignition::math::Vector3d &_torque)
Add a torque to the body, components are relative to the body's own frame of reference.
virtual void SetTorque(const ignition::math::Vector3d &_force)
Set the torque applied to the body.
std::vector< SimTK::MobilizedBody > slaveMobods
Definition SimbodyLink.hh:193
virtual ~SimbodyLink()
Destructor.
SimbodyLink(EntityPtr _parent)
Constructor.
boost::shared_ptr< SimbodyPhysics > SimbodyPhysicsPtr
Definition SimbodyTypes.hh:40
boost::shared_ptr< Connection > ConnectionPtr
Definition CommonTypes.hh:134
boost::shared_ptr< Entity > EntityPtr
Definition PhysicsTypes.hh:85
Forward declarations for the common classes.
Definition Animation.hh:27