Loading...
Searching...
No Matches
Public Member Functions | List of all members
sdf::SDF_VERSION_NAMESPACE::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.
 
double Damping () const
 Get the physical velocity dependent viscous damping coefficient of the joint axis.
 
double Dissipation () const
 Get the joint stop dissipation.
 
double Effort () const
 Get the value for enforcing the maximum absolute joint effort that can be applied.
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load.
 
double Friction () const
 Get the physical static friction value of the joint.
 
Errors Load (ElementPtr _sdf)
 Load the joint axis based on a element pointer.
 
double Lower () const
 Get the lower joint axis limit (radians for revolute joints, meters for prismatic joints).
 
double MaxVelocity () const
 Get the value for enforcing the maximum absolute joint velocity.
 
std::optional< MimicConstraintMimic () const
 Get the Mimic constraint parameters.
 
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.
 
void SetDamping (const double _damping)
 Set the physical velocity dependent viscous damping coefficient of the joint axis.
 
void SetDissipation (const double _dissipation)
 Set the joint stop dissipation.
 
void SetEffort (double _effort)
 Set the value for enforcing the maximum absolute joint effort that can be applied.
 
void SetFriction (const double _friction)
 Set the physical static friction value of the joint.
 
void SetLower (const double _lower)
 Set the lower joint axis limit (radians for revolute joints, meters for prismatic joints).
 
void SetMaxVelocity (const double _velocity)
 Set the value for enforcing the maximum absolute joint velocity.
 
void SetMimic (const MimicConstraint &_mimic)
 Set the Mimic constraint parameters.
 
void SetSpringReference (const double _spring)
 Set the spring reference position for this joint axis.
 
void SetSpringStiffness (const double _spring)
 Set the spring stiffness for this joint axis.
 
void SetStiffness (const double _stiffness)
 Get the joint stop stiffness.
 
void SetUpper (const double _upper)
 Set the upper joint axis limit (radians for revolute joints, meters for prismatic joints).
 
sdf::Errors SetXyz (const gz::math::Vector3d &_xyz)
 Set the x,y,z components of the axis unit vector.
 
void SetXyzExpressedIn (const std::string &_frame)
 Set the name of the coordinate frame in which this joint axis's unit vector is expressed.
 
double SpringReference () const
 Get the spring reference position for this joint axis.
 
double SpringStiffness () const
 Get the spring stiffness for this joint axis.
 
double Stiffness () const
 Get the joint stop stiffness.
 
sdf::ElementPtr ToElement (sdf::Errors &_errors, unsigned int _index=0u) const
 Create and return an SDF element filled with data from this joint axis.
 
sdf::ElementPtr ToElement (unsigned int _index=0u) const
 Create and return an SDF element filled with data from this joint axis.
 
double Upper () const
 Get the upper joint axis limit (radians for revolute joints, meters for prismatic joints).
 
gz::math::Vector3d Xyz () const
 Get the x,y,z components of the axis unit vector.
 
const std::string & XyzExpressedIn () const
 Get the name of the coordinate frame in which this joint axis's unit vector is expressed.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ JointAxis()

sdf::SDF_VERSION_NAMESPACE::JointAxis::JointAxis ( )

Default constructor.

Member Function Documentation

◆ Damping()

double sdf::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::JointAxis::Effort ( ) const

Get the value for enforcing the maximum absolute joint effort that can be applied.

The limit is not enforced if the value is infinity. The default value is infinity.

Returns
Symmetric effort limit.
See also
void SetEffort(double _effort)

◆ Element()

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::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)

◆ Load()

Errors sdf::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::JointAxis::MaxVelocity ( ) const

Get the value for enforcing the maximum absolute joint velocity.

The default value is infinity.

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

◆ Mimic()

std::optional< MimicConstraint > sdf::SDF_VERSION_NAMESPACE::JointAxis::Mimic ( ) const

Get the Mimic constraint parameters.

Returns
A MimicConstraint object containing the leader joint and axis names names, multiplier, offset, and reference to be used for mimicking.
See also
void SetMimic(const MimicConstraint)

◆ ResolveXyz()

Errors sdf::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::JointAxis::SetDissipation ( const double  _dissipation)

Set the joint stop dissipation.

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

◆ SetEffort()

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

Set the value for enforcing the maximum absolute joint effort that can be applied.

The limit is not enforced if the value is infinity.

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

◆ SetFriction()

void sdf::SDF_VERSION_NAMESPACE::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()

◆ SetLower()

void sdf::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::JointAxis::SetMaxVelocity ( const double  _velocity)

Set the value for enforcing the maximum absolute joint velocity.

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

◆ SetMimic()

void sdf::SDF_VERSION_NAMESPACE::JointAxis::SetMimic ( const MimicConstraint _mimic)

Set the Mimic constraint parameters.

Parameters
[in]_mimicA MimicConstraint object containing the leader joint and axis names names, multiplier, offset, and reference to be used for mimicking.
See also
MimicConstraint Mimic()

◆ SetSpringReference()

void sdf::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::JointAxis::SetStiffness ( const double  _stiffness)

Get the joint stop stiffness.

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

◆ SetUpper()

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

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

◆ SetXyz()

sdf::Errors sdf::SDF_VERSION_NAMESPACE::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
Returns
Errors will have an entry if the norm of the xyz vector is 0.

◆ SetXyzExpressedIn()

void sdf::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::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::SDF_VERSION_NAMESPACE::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

◆ ToElement() [1/2]

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::JointAxis::ToElement ( sdf::Errors _errors,
unsigned int  _index = 0u 
) const

Create and return an SDF element filled with data from this joint axis.

Note that parameter passing functionality is not captured with this function.

Parameters
[out]_errorsVector of errors.
[in]_indexIndex of this joint axis
Returns
SDF element pointer with updated joint values.

◆ ToElement() [2/2]

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::JointAxis::ToElement ( unsigned int  _index = 0u) const

Create and return an SDF element filled with data from this joint axis.

Note that parameter passing functionality is not captured with this function.

Parameters
[in]_indexIndex of this joint axis
Returns
SDF element pointer with updated joint values.

◆ Upper()

double sdf::SDF_VERSION_NAMESPACE::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

◆ Xyz()

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

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

The axis is expressed in the frame named in XyzExpressedIn() and defaults to the joint frame if that method returns an empty string. 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::SDF_VERSION_NAMESPACE::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: