Public Member Functions | List of all members
sdf::v9::JointAxis Class Reference

Parameters related to the axis of rotation for rotational joints, and the axis of translation for prismatic joints. More...

#include <JointAxis.hh>

Public Member Functions

 JointAxis ()
 Default constructor. More...
 
 JointAxis (const JointAxis &_jointAxis)
 Copy constructor. More...
 
 JointAxis (JointAxis &&_jointAxis) noexcept
 Move constructor. More...
 
 ~JointAxis ()
 Destructor. More...
 
double Damping () const
 Get the physical velocity dependent viscous damping coefficient of the joint axis. More...
 
double Dissipation () const
 Get the joint stop dissipation. More...
 
double Effort () const
 Get the value for enforcing the maximum joint effort applied. More...
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load. More...
 
double Friction () const
 Get the physical static friction value of the joint. More...
 
double InitialPosition () const
 Get the initial joint position for this joint axis. More...
 
Errors Load (ElementPtr _sdf)
 Load the joint axis based on a element pointer. More...
 
double Lower () const
 Get the lower joint axis limit (radians for revolute joints, meters for prismatic joints). More...
 
double MaxVelocity () const
 Get the value for enforcing the maximum joint velocity. More...
 
JointAxisoperator= (const JointAxis &_jointAxis)
 Copy assignment operator. More...
 
JointAxisoperator= (JointAxis &&_jointAxis)
 Move assignment operator. More...
 
Errors ResolveXyz (gz::math::Vector3d &_xyz, const std::string &_resolveTo="") const
 Express xyz unit vector of this axis in the coordinates of another named frame. More...
 
void SetDamping (const double _damping)
 Set the physical velocity dependent viscous damping coefficient of the joint axis. More...
 
void SetDissipation (const double _dissipation) const
 Set the joint stop dissipation. More...
 
void SetEffort (double _effort)
 Set the value for enforcing the maximum joint effort applied. More...
 
void SetFriction (const double _friction)
 Set the physical static friction value of the joint. More...
 
void SetInitialPosition (const double _pos)
 Set the initial joint position for this joint axis. More...
 
void SetLower (const double _lower)
 Set the lower joint axis limit (radians for revolute joints, meters for prismatic joints). More...
 
void SetMaxVelocity (const double _velocity) const
 Set the value for enforcing the maximum joint velocity. More...
 
void SetSpringReference (const double _spring)
 Set the spring reference position for this joint axis. More...
 
void SetSpringStiffness (const double _spring)
 Set the spring stiffness for this joint axis. More...
 
void SetStiffness (const double _stiffness) const
 Get the joint stop stiffness. More...
 
void SetUpper (const double _upper) const
 Set the upper joint axis limit (radians for revolute joints, meters for prismatic joints). More...
 
void SetUseParentModelFrame (const bool _parentModelFrame) SDF_DEPRECATED(9.0)
 Set whether to interpret the axis xyz value in the parent model instead of the joint frame. More...
 
void SetXyz (const gz::math::Vector3d &_xyz)
 Set the x,y,z components of the axis unit vector. More...
 
void SetXyzExpressedIn (const std::string &_frame)
 Set the name of the coordinate frame in which this joint axis's unit vector is expressed. More...
 
double SpringReference () const
 Get the spring reference position for this joint axis. More...
 
double SpringStiffness () const
 Get the spring stiffness for this joint axis. More...
 
double Stiffness () const
 Get the joint stop stiffness. More...
 
double Upper () const
 Get the upper joint axis limit (radians for revolute joints, meters for prismatic joints). More...
 
bool UseParentModelFrame () const SDF_DEPRECATED(9.0)
 Get whether to interpret the axis xyz value in the parent model frame instead of joint frame. More...
 
gz::math::Vector3d Xyz () const
 Get the x,y,z components of the axis unit vector. More...
 
const std::string & XyzExpressedIn () const
 Get the name of the coordinate frame in which this joint axis's unit vector is expressed. More...
 

Detailed Description

Parameters related to the axis of rotation for rotational joints, and the axis of translation for prismatic joints.

Constructor & Destructor Documentation

◆ JointAxis() [1/3]

sdf::v9::JointAxis::JointAxis ( )

Default constructor.

◆ JointAxis() [2/3]

sdf::v9::JointAxis::JointAxis ( const JointAxis _jointAxis)

Copy constructor.

Parameters
[in]_jointAxisJoint axis to copy.

◆ JointAxis() [3/3]

sdf::v9::JointAxis::JointAxis ( JointAxis &&  _jointAxis)
noexcept

Move constructor.

Parameters
[in]_jointAxisJoint axis to move.

◆ ~JointAxis()

sdf::v9::JointAxis::~JointAxis ( )

Destructor.

Member Function Documentation

◆ Damping()

double sdf::v9::JointAxis::Damping ( ) const

Get the physical velocity dependent viscous damping coefficient of the joint axis.

The default value is zero (0.0).

Returns
The physical velocity dependent viscous damping coefficient of the joint axis
See also
void SetDamping(const double _damping)

◆ Dissipation()

double sdf::v9::JointAxis::Dissipation ( ) const

Get the joint stop dissipation.

The default value is 1.0.

Returns
The joint stop dissipation.
See also
void SetDissipation(const double _dissipation) const

◆ Effort()

double sdf::v9::JointAxis::Effort ( ) const

Get the value for enforcing the maximum joint effort applied.

Limit is not enforced if value is negative. The default value is -1.

Returns
Effort limit.
See also
void SetEffort(double _effort)

◆ Element()

sdf::ElementPtr sdf::v9::JointAxis::Element ( ) const

Get a pointer to the SDF element that was used during load.

Returns
SDF element pointer. The value will be nullptr if Load has not been called.

◆ Friction()

double sdf::v9::JointAxis::Friction ( ) const

Get the physical static friction value of the joint.

The default value is zero (0.0).

Returns
The physical static friction value of the joint.
See also
void SetFriction(const double _friction)

◆ InitialPosition()

double sdf::v9::JointAxis::InitialPosition ( ) const

Get the initial joint position for this joint axis.

The default value is zero (0.0).

Returns
The initial joint position.
See also
void SetInitialPosition(const double _pos)

◆ Load()

Errors sdf::v9::JointAxis::Load ( ElementPtr  _sdf)

Load the joint axis based on a element pointer.

This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.

Parameters
[in]_sdfThe SDF Element pointer
Returns
Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.

◆ Lower()

double sdf::v9::JointAxis::Lower ( ) const

Get the lower joint axis limit (radians for revolute joints, meters for prismatic joints).

Not valid if the joint that uses this axis is continuous. The default value is -1e16.

Returns
The lower joint axis limit
See also
void SetLower(const double _lower)

◆ MaxVelocity()

double sdf::v9::JointAxis::MaxVelocity ( ) const

Get the value for enforcing the maximum joint velocity.

The default value is -1.

Returns
The value for enforcing the maximum joint velocity.
See also
void SetVelocity(const double _velocity) const

◆ operator=() [1/2]

JointAxis& sdf::v9::JointAxis::operator= ( const JointAxis _jointAxis)

Copy assignment operator.

Parameters
[in]_jointAxisJointAxis component to copy.
Returns
Reference to this.

◆ operator=() [2/2]

JointAxis& sdf::v9::JointAxis::operator= ( JointAxis &&  _jointAxis)

Move assignment operator.

Parameters
[in]_jointAxisJointAxis component to move.
Returns
Reference to this.

◆ ResolveXyz()

Errors sdf::v9::JointAxis::ResolveXyz ( gz::math::Vector3d &  _xyz,
const std::string &  _resolveTo = "" 
) const

Express xyz unit vector of this axis in the coordinates of another named frame.

Parameters
[out]_xyzResolved unit vector.
[in]_resolveToName of frame in whose coordinates this object should be resolved. If unset, it is resolved in the coordinates of its xml parent object, which is always a joint frame.
Returns
Errors.

◆ SetDamping()

void sdf::v9::JointAxis::SetDamping ( const double  _damping)

Set the physical velocity dependent viscous damping coefficient of the joint axis.

Parameters
[in]_dampingThe physical velocity dependent viscous damping coefficient of the joint axis
See also
double Damping() const

◆ SetDissipation()

void sdf::v9::JointAxis::SetDissipation ( const double  _dissipation) const

Set the joint stop dissipation.

Parameters
[in]_dissipationThe joint stop dissipation.
See also
double Dissipation() const

◆ SetEffort()

void sdf::v9::JointAxis::SetEffort ( double  _effort)

Set the value for enforcing the maximum joint effort applied.

Limit is not enforced if value is negative.

Parameters
[in]_effortEffort limit.
See also
double Effort() const

◆ SetFriction()

void sdf::v9::JointAxis::SetFriction ( const double  _friction)

Set the physical static friction value of the joint.

Parameters
[in]_frictionThe physical static friction value of the joint.
See also
double Friction()

◆ SetInitialPosition()

void sdf::v9::JointAxis::SetInitialPosition ( const double  _pos)

Set the initial joint position for this joint axis.

Parameters
[in]_posThe initial joint position.
See also
double InitialPosition() const

◆ SetLower()

void sdf::v9::JointAxis::SetLower ( const double  _lower)

Set the lower joint axis limit (radians for revolute joints, meters for prismatic joints).

Not valid if the joint that uses this axis is continuous.

Parameters
[in]_lowerThe lower joint axis limit
See also
double Lower() const

◆ SetMaxVelocity()

void sdf::v9::JointAxis::SetMaxVelocity ( const double  _velocity) const

Set the value for enforcing the maximum joint velocity.

Parameters
[in]_velocityThe value for enforcing the maximum joint velocity.
See also
double Velocity() const

◆ SetSpringReference()

void sdf::v9::JointAxis::SetSpringReference ( const double  _spring)

Set the spring reference position for this joint axis.

Parameters
[in]_springThe spring reference position for this joint axis.
See also
double SpringReference() const

◆ SetSpringStiffness()

void sdf::v9::JointAxis::SetSpringStiffness ( const double  _spring)

Set the spring stiffness for this joint axis.

Parameters
[in]_springThe spring stiffness for this joint axis.
See also
double SpringStiffness() const

◆ SetStiffness()

void sdf::v9::JointAxis::SetStiffness ( const double  _stiffness) const

Get the joint stop stiffness.

Parameters
[in]_stiffnessThe joint stop stiffness.
Returns
The joint stop stiffness.
See also
double Stiffness() const

◆ SetUpper()

void sdf::v9::JointAxis::SetUpper ( const double  _upper) const

Set the upper joint axis limit (radians for revolute joints, meters for prismatic joints).

Not valid if joint that uses this axis is continuous.

Parameters
[in]_upperThe upper joint axis limit.
See also
double Upper() const

◆ SetUseParentModelFrame()

void sdf::v9::JointAxis::SetUseParentModelFrame ( const bool  _parentModelFrame)

Set whether to interpret the axis xyz value in the parent model instead of the joint frame.

Parameters
[in]_parentModelFrameTrue to interpret the axis xyz value in the parent model frame, false to use the joint frame.
See also
bool UseParentModelFrame() const

◆ SetXyz()

void sdf::v9::JointAxis::SetXyz ( const gz::math::Vector3d &  _xyz)

Set the x,y,z components of the axis unit vector.

Parameters
[in]_xyzThe x,y,z components of the axis unit vector.
See also
gz::math::Vector3d Xyz() const

◆ SetXyzExpressedIn()

void sdf::v9::JointAxis::SetXyzExpressedIn ( const std::string &  _frame)

Set the name of the coordinate frame in which this joint axis's unit vector is expressed.

An empty value implies the parent (joint) frame.

Parameters
[in]Thename of the xyz expressed-in frame.

◆ SpringReference()

double sdf::v9::JointAxis::SpringReference ( ) const

Get the spring reference position for this joint axis.

The default value is zero (0.0).

Returns
The spring reference position for this joint axis.
See also
void SetSpringReference(const double _spring)

◆ SpringStiffness()

double sdf::v9::JointAxis::SpringStiffness ( ) const

Get the spring stiffness for this joint axis.

The default value is zero (0.0).

Returns
The spring stiffness for this joint axis.
See also
void SetSpringStiffness(const double _spring)

◆ Stiffness()

double sdf::v9::JointAxis::Stiffness ( ) const

Get the joint stop stiffness.

The default value is 1e8.

Returns
The joint stop stiffness.
See also
void SetStiffness(const double _stiffness) const

◆ Upper()

double sdf::v9::JointAxis::Upper ( ) const

Get the upper joint axis limit (radians for revolute joints, meters for prismatic joints).

Not valid if joint that uses this axis is continuous. The default value is 1e16.

Returns
The upper joint axis limit.
See also
double SetUpper(const double _upper) const

◆ UseParentModelFrame()

bool sdf::v9::JointAxis::UseParentModelFrame ( ) const

Get whether to interpret the axis xyz value in the parent model frame instead of joint frame.

The default value is false.

Returns
True to interpret the axis xyz value in the parent model frame, false to use the joint frame.
See also
void SetUseParentModelFrame(const bool _parentModelFrame)

◆ Xyz()

gz::math::Vector3d sdf::v9::JointAxis::Xyz ( ) const

Get the x,y,z components of the axis unit vector.

The axis is expressed in the joint frame unless UseParentModelFrame is true. The vector should be normalized. The default value is gz::math::Vector3d::UnitZ which equals (0, 0, 1).

Returns
The x,y,z components of the axis unit vector.
See also
void SetXyz(const gz::math::Vector3d &_xyz)

◆ XyzExpressedIn()

const std::string& sdf::v9::JointAxis::XyzExpressedIn ( ) const

Get the name of the coordinate frame in which this joint axis's unit vector is expressed.

An empty value implies the parent (joint) frame.

Returns
The name of the xyz expressed-in frame.

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