All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | List of all members
gazebo::physics::SimbodyScrewJoint Class Reference

A screw joint. More...

#include <SimbodyScrewJoint.hh>

Inheritance diagram for gazebo::physics::SimbodyScrewJoint:
Inheritance graph
[legend]

Public Member Functions

 SimbodyScrewJoint (SimTK::MultibodySystem *_world, BasePtr _parent)
 Constructor. More...
 
virtual ~SimbodyScrewJoint ()
 Destructor. More...
 
virtual math::Angle GetAngleImpl (int _index) const
 Get the angle of an axis helper function. More...
 
virtual math::Vector3 GetGlobalAxis (int _index) const
 Get the axis of rotation in global cooridnate frame. More...
 
virtual math::Angle GetHighStop (int _index)
 Get the high stop of an axis(index). More...
 
virtual math::Angle GetLowStop (int _index)
 Get the low stop of an axis(index). More...
 
virtual double GetMaxForce (int _index)
 Get the max allowed force of an axis(index). More...
 
virtual double GetThreadPitch (unsigned int)
 Get screw joint thread pitch. More...
 
virtual double GetVelocity (int _index) const
 Get the rotation rate of an axis(index) More...
 
virtual void Init ()
 Initialize a joint. More...
 
virtual void SetAxis (int _index, const math::Vector3 &_axis)
 Set the axis of rotation where axis is specified in local joint frame. More...
 
virtual void SetDamping (int _index, double _damping)
 Set the joint damping. More...
 
virtual void SetHighStop (int _index, const math::Angle &_angle)
 Set the high stop of an axis(index). More...
 
virtual void SetLowStop (int _index, const math::Angle &_angle)
 Set the low stop of an axis(index). More...
 
virtual void SetMaxForce (int _index, double _t)
 Set the max allowed force of an axis(index). More...
 
virtual void SetThreadPitch (int _index, double _threadPitch)
 Set screw joint thread pitch. More...
 
virtual void SetVelocity (int _index, double _angle)
 Set the velocity of an axis(index). More...
 
- Public Member Functions inherited from gazebo::physics::ScrewJoint< SimbodyJoint >
 ScrewJoint (BasePtr _parent)
 Constructor. More...
 
virtual ~ScrewJoint ()
 Destructor. More...
 
virtual math::Vector3 GetAnchor (int _index) const
 Get the anchor. More...
 
virtual unsigned int GetAngleCount () const
  More...
 
virtual void SetAnchor (int _index, const math::Vector3 &_anchor)
 Set the anchor. More...
 
- Public Member Functions inherited from gazebo::physics::SimbodyJoint
 SimbodyJoint (BasePtr _parent)
 Constructor. More...
 
virtual ~SimbodyJoint ()
 Destructor. More...
 
virtual bool AreConnected (LinkPtr _one, LinkPtr _two) const
 Determines of the two bodies are connected by a joint. More...
 
virtual void CacheForceTorque ()
 Cache Joint Force Torque Values if necessary for physics engine. More...
 
virtual void Detach ()
 Detach this joint from all links. More...
 
virtual double GetAttribute (const std::string &_key, unsigned int _index)
 Get a non-generic parameter for the joint. More...
 
virtual double GetForce (unsigned int _index)
 
virtual JointWrench GetForceTorque (unsigned int _index)
 get internal force and torque values at a joint. More...
 
virtual LinkPtr GetJointLink (int _index) const
 Get the link to which the joint is attached according the _index. More...
 
virtual math::Vector3 GetLinkForce (unsigned int _index) const
 Get the forces applied to the center of mass of a physics::Link due to the existence of this Joint. More...
 
virtual math::Vector3 GetLinkTorque (unsigned int _index) const
 Get the torque applied to the center of mass of a physics::Link due to the existence of this Joint. More...
 
virtual void Reset ()
 Reset the joint. More...
 
virtual void RestoreSimbodyState (SimTK::State &_state)
 
virtual void SaveSimbodyState (const SimTK::State &_state)
 
virtual void SetAttribute (Attribute, int _index, double _value)
 Set a parameter for the joint. More...
 
virtual void SetAttribute (const std::string &_key, int _index, const boost::any &_value)
 Set a non-generic parameter for the joint. More...
 
virtual void SetForce (int _index, double _force)
 Set the force applied to this physics::Joint. More...
 
- Public Member Functions inherited from gazebo::physics::Joint
 Joint (BasePtr _parent)
 Constructor. More...
 
virtual ~Joint ()
 Destructor. More...
 
virtual void ApplyDamping ()
 Callback to apply damping force to joint. More...
 
virtual void Attach (LinkPtr _parent, LinkPtr _child)
 Attach the two bodies with this joint. More...
 
double CheckAndTruncateForce (int _index, double _effort)
 check if the force against velocityLimit and effortLimit, truncate if necessary. More...
 
template<typename T >
event::ConnectionPtr ConnectJointUpdate (T _subscriber)
 Connect a boost::slot the the joint update signal. More...
 
void DisconnectJointUpdate (event::ConnectionPtr &_conn)
 Disconnect a boost::slot the the joint update signal. More...
 
void FillMsg (msgs::Joint &_msg)
 Fill a joint message. More...
 
math::Angle GetAngle (int _index) const
 Get the angle of rotation of an axis(index) More...
 
LinkPtr GetChild () const
 Get the child link. More...
 
double GetDamping (int _index)
 Returns the current joint damping coefficient. More...
 
double GetDampingCoefficient () const
 Get damping coefficient of this joint. More...
 
virtual double GetEffortLimit (int _index)
 Get the effort limit on axis(index). More...
 
double GetInertiaRatio (unsigned int _index) const
 Accessor to inertia ratio across this joint. More...
 
math::Vector3 GetLocalAxis (int _index) const
 Get the axis of rotation. More...
 
math::Angle GetLowerLimit (unsigned int _index) const
 : get the joint upper limit (replaces GetLowStop and GetHighStop) More...
 
LinkPtr GetParent () const
 Get the parent link. More...
 
math::Angle GetUpperLimit (unsigned int _index) const
 : get the joint lower limit (replacee GetLowStop and GetHighStop) More...
 
virtual double GetVelocityLimit (int _index)
 Get the velocity limit on axis(index). More...
 
void Load (LinkPtr _parent, LinkPtr _child, const math::Pose &_pose)
 Set pose, parent and child links of a physics::Joint. More...
 
void SetAngle (int _index, math::Angle _angle)
 If the Joint is static, Gazebo stores the state of this Joint as a scalar inside the Joint class, so this call will NOT move the joint dynamically for a static Model. More...
 
void SetModel (ModelPtr _model)
 Set the model this joint belongs too. More...
 
virtual void SetProvideFeedback (bool _enable)
 Set whether the joint should generate feedback. More...
 
void SetState (const JointState &_state)
 Set the joint state. More...
 
void Update ()
 Update the joint. More...
 
virtual void UpdateParameters (sdf::ElementPtr _sdf)
 Update the parameters using new sdf values. More...
 
- Public Member Functions inherited from gazebo::physics::Base
 Base (BasePtr _parent)
 Constructor. More...
 
virtual ~Base ()
 Destructor. More...
 
void AddChild (BasePtr _child)
 Add a child to this entity. More...
 
void AddType (EntityType _type)
 Add a type specifier. More...
 
virtual void Fini ()
 Finialize the object. More...
 
BasePtr GetByName (const std::string &_name)
 Get by name. More...
 
BasePtr GetChild (unsigned int _i) const
 Get a child by index. More...
 
BasePtr GetChild (const std::string &_name)
 Get a child by name. More...
 
unsigned int GetChildCount () const
 Get the number of children. More...
 
uint32_t GetId () const
 Return the ID of this entity. More...
 
std::string GetName () const
 Return the name of the entity. More...
 
BasePtr GetParent () const
 Get the parent. More...
 
int GetParentId () const
 Return the ID of the parent. More...
 
bool GetSaveable () const
 Get whether the object should be "saved", when the user selects to save the world to xml. More...
 
std::string GetScopedName () const
 Return the name of this entity with the model scope world::model1::...::modelN::entityName. More...
 
virtual const sdf::ElementPtr GetSDF ()
 Get the SDF values for the object. More...
 
unsigned int GetType () const
 Get the full type definition. More...
 
const WorldPtrGetWorld () const
 Get the World this object is in. More...
 
bool HasType (const EntityType &_t) const
 Returns true if this object's type definition has the given type. More...
 
bool IsSelected () const
 True if the entity is selected by the user. More...
 
bool operator== (const Base &_ent) const
 Returns true if the entities are the same. More...
 
void Print (const std::string &_prefix)
 Print this object to screen via gzmsg. More...
 
virtual void RemoveChild (unsigned int _id)
 Remove a child from this entity. More...
 
void RemoveChild (const std::string &_name)
 Remove a child by name. More...
 
void RemoveChildren ()
 Remove all children. More...
 
virtual void Reset (Base::EntityType _resetType)
 Calls recursive Reset on one of the Base::EntityType's. More...
 
virtual void SetName (const std::string &_name)
 Set the name of the entity. More...
 
void SetParent (BasePtr _parent)
 Set the parent. More...
 
void SetSaveable (bool _v)
 Set whether the object should be "saved", when the user selects to save the world to xml. More...
 
virtual bool SetSelected (bool _show)
 Set whether this entity has been selected by the user through the gui. More...
 
void SetWorld (const WorldPtr &_newWorld)
 Set the world this object belongs to. More...
 

Protected Member Functions

virtual void Load (sdf::ElementPtr _sdf)
 Load a ScrewJoint. More...
 
virtual void SetForceImpl (int _index, double _force)
 Set the force applied to this physics::Joint. More...
 

Additional Inherited Members

- Public Types inherited from gazebo::physics::Joint
enum  Attribute {
  FUDGE_FACTOR, SUSPENSION_ERP, SUSPENSION_CFM, STOP_ERP,
  STOP_CFM, ERP, CFM, FMAX,
  VEL, HI_STOP, LO_STOP
}
 Joint attribute types. More...
 
- Public Attributes inherited from gazebo::physics::SimbodyJoint
SimTK::Constraint constraint
 : isValid() if we used a constraint to model this joint. More...
 
SimTK::Force::MobilityLinearDamper damper
 : for enforcing joint damping forces. More...
 
SimTK::Transform defxAB
 default mobilizer pose More...
 
bool isReversed
 : if mobilizer, did it reverse parent&child? Set when we build the Simbody model. More...
 
SimTK::Force::MobilityLinearStop limitForce
 : for enforcing joint stops Set when we build the Simbody model. More...
 
SimTK::MobilizedBody mobod
 Use isValid() if we used a mobilizer Set when we build the Simbody model. More...
 
bool mustBreakLoopHere
 Force Simbody to break a loop by using a weld constraint. More...
 
bool physicsInitialized
 
SimTK::Transform xCB
 child body frame to mobilizer frame More...
 
SimTK::Transform xPA
 Normally A=F, B=M. More...
 
- Protected Attributes inherited from gazebo::physics::ScrewJoint< SimbodyJoint >
math::Vector3 fakeAnchor
 The anchor value is not used internally. More...
 
double threadPitch
 Pitch of the thread. More...
 

Detailed Description

A screw joint.

Constructor & Destructor Documentation

gazebo::physics::SimbodyScrewJoint::SimbodyScrewJoint ( SimTK::MultibodySystem *  _world,
BasePtr  _parent 
)

Constructor.

Parameters
[in]_worldPointer to the Simbody world.
[in]_parentParent of the screw joint.
virtual gazebo::physics::SimbodyScrewJoint::~SimbodyScrewJoint ( )
virtual

Destructor.

Member Function Documentation

virtual math::Angle gazebo::physics::SimbodyScrewJoint::GetAngleImpl ( int  _index) const
virtual

Get the angle of an axis helper function.

Parameters
[in]_indexIndex of the axis.
Returns
Angle of the axis.

Implements gazebo::physics::Joint.

virtual math::Vector3 gazebo::physics::SimbodyScrewJoint::GetGlobalAxis ( int  _index) const
virtual

Get the axis of rotation in global cooridnate frame.

Parameters
[in]_indexIndex of the axis to get.
Returns
Axis value for the provided index.

Implements gazebo::physics::Joint.

virtual math::Angle gazebo::physics::SimbodyScrewJoint::GetHighStop ( int  _index)
virtual

Get the high stop of an axis(index).

This function is replaced by GetUpperLimit(unsigned int). If you are interested in getting the value of dParamHiStop*, use GetAttribute(hi_stop, _index)

Parameters
[in]_indexIndex of the axis.
Returns
Angle of the high stop value.

Implements gazebo::physics::Joint.

virtual math::Angle gazebo::physics::SimbodyScrewJoint::GetLowStop ( int  _index)
virtual

Get the low stop of an axis(index).

This function is replaced by GetLowerLimit(unsigned int). If you are interested in getting the value of dParamHiStop*, use GetAttribute(hi_stop, _index)

Parameters
[in]_indexIndex of the axis.
Returns
Angle of the low stop value.

Implements gazebo::physics::Joint.

virtual double gazebo::physics::SimbodyScrewJoint::GetMaxForce ( int  _index)
virtual

Get the max allowed force of an axis(index).

Note that the unit of force should be consistent with the rest of the simulation scales.

Parameters
[in]_indexIndex of the axis.
Returns
The maximum force.

Implements gazebo::physics::Joint.

virtual double gazebo::physics::SimbodyScrewJoint::GetThreadPitch ( unsigned int  _index)
virtual

Get screw joint thread pitch.

This must be implemented in a child class

Parameters
[in]_indexIndex of the axis.
Returns
_threadPitch Thread pitch value.

Implements gazebo::physics::ScrewJoint< SimbodyJoint >.

virtual double gazebo::physics::SimbodyScrewJoint::GetVelocity ( int  _index) const
virtual

Get the rotation rate of an axis(index)

Parameters
[in]_indexIndex of the axis.
Returns
The rotaional velocity of the joint axis.

Implements gazebo::physics::Joint.

virtual void gazebo::physics::SimbodyScrewJoint::Init ( )
virtual

Initialize a joint.

Reimplemented from gazebo::physics::Joint.

virtual void gazebo::physics::SimbodyScrewJoint::Load ( sdf::ElementPtr  _sdf)
protectedvirtual

Load a ScrewJoint.

Parameters
[in]_sdfSDF value to load from

Reimplemented from gazebo::physics::ScrewJoint< SimbodyJoint >.

virtual void gazebo::physics::SimbodyScrewJoint::SetAxis ( int  _index,
const math::Vector3 _axis 
)
virtual

Set the axis of rotation where axis is specified in local joint frame.

Parameters
[in]_indexIndex of the axis to set.
[in]_axisVector in local joint frame of axis direction (must have length greater than zero).

Reimplemented from gazebo::physics::SimbodyJoint.

virtual void gazebo::physics::SimbodyScrewJoint::SetDamping ( int  _index,
double  _damping 
)
virtual

Set the joint damping.

Parameters
[in]_indexIndex of the axis to set, currently ignored, to be implemented.
[in]_dampingDamping value for the axis.

Reimplemented from gazebo::physics::SimbodyJoint.

virtual void gazebo::physics::SimbodyScrewJoint::SetForceImpl ( int  _index,
double  _force 
)
protectedvirtual

Set the force applied to this physics::Joint.

Note that the unit of force should be consistent with the rest of the simulation scales. Force is additive (multiple calls to SetForceImpl to the same joint in the same time step will accumulate forces on that Joint).

Parameters
[in]_indexIndex of the axis.
[in]_forceForce value. internal force, e.g. damping forces. This way, Joint::appliedForce keep track of external forces only.

Implements gazebo::physics::SimbodyJoint.

virtual void gazebo::physics::SimbodyScrewJoint::SetHighStop ( int  _index,
const math::Angle _angle 
)
virtual

Set the high stop of an axis(index).

Parameters
[in]_indexIndex of the axis.
[in]_angleHigh stop angle.

Reimplemented from gazebo::physics::Joint.

virtual void gazebo::physics::SimbodyScrewJoint::SetLowStop ( int  _index,
const math::Angle _angle 
)
virtual

Set the low stop of an axis(index).

Parameters
[in]_indexIndex of the axis.
[in]_angleLow stop angle.

Reimplemented from gazebo::physics::Joint.

virtual void gazebo::physics::SimbodyScrewJoint::SetMaxForce ( int  _index,
double  _force 
)
virtual

Set the max allowed force of an axis(index).

Note that the unit of force should be consistent with the rest of the simulation scales.

Parameters
[in]_indexIndex of the axis.
[in]_forceMaximum force that can be applied to the axis.

Implements gazebo::physics::Joint.

virtual void gazebo::physics::SimbodyScrewJoint::SetThreadPitch ( int  _index,
double  _threadPitch 
)
virtual

Set screw joint thread pitch.

This must be implemented in a child class

Parameters
[in]_indexIndex of the axis.
[in]_threadPitchThread pitch value.

Implements gazebo::physics::ScrewJoint< SimbodyJoint >.

virtual void gazebo::physics::SimbodyScrewJoint::SetVelocity ( int  _index,
double  _vel 
)
virtual

Set the velocity of an axis(index).

Parameters
[in]_indexIndex of the axis.
[in]_velVelocity.

Implements gazebo::physics::Joint.


The documentation for this class was generated from the following file: