DART  6.7.3
dart::dynamics::DegreeOfFreedom Class Reference

DegreeOfFreedom class is a proxy class for accessing single degrees of freedom (aka generalized coordinates) of the Skeleton. More...

#include <DegreeOfFreedom.hpp>

Inheritance diagram for dart::dynamics::DegreeOfFreedom:
dart::common::Subject

Public Member Functions

 DegreeOfFreedom (const DegreeOfFreedom &)=delete
 
const std::string & setName (const std::string &_name, bool _preserveName=true)
 Change the name of this DegreeOfFreedom. More...
 
const std::string & getName () const
 Get the name of this DegreeOfFreedom. More...
 
void preserveName (bool _preserve)
 Prevent Joint::updateDegreeOfFreedomNames() from changing the name of this degree of freedom. More...
 
bool isNamePreserved () const
 Check whether DegreeOfFreedom::lockName(bool) is activate. More...
 
std::size_t getIndexInSkeleton () const
 Get this DegreeOfFreedom's index within its Skeleton. More...
 
std::size_t getIndexInTree () const
 Get this DegreeOfFreedom's index within its tree. More...
 
std::size_t getIndexInJoint () const
 Get this DegreeOfFreedom's index within its Joint. More...
 
std::size_t getTreeIndex () const
 Get the index of the tree that this DegreeOfFreedom belongs to. More...
 
Command
void setCommand (double _command)
 Set the command of this DegreeOfFreedom. More...
 
double getCommand () const
 Get the command of this DegreeOfFreedom. More...
 
void resetCommand ()
 Set the command of this DegreeOfFreedom to zero. More...
 
Position
void setPosition (double _position)
 Set the position of this DegreeOfFreedom. More...
 
double getPosition () const
 Get the position of this DegreeOfFreedom. More...
 
void setPositionLimits (double _lowerLimit, double _upperLimit)
 Set the position limits of this DegreeOfFreedom. More...
 
void setPositionLimits (const std::pair< double, double > &_limits)
 Set the position limits of this DegreeOfFreedom. More...
 
std::pair< double, double > getPositionLimits () const
 Get the position limits of this DegreeOfFreedom. More...
 
void setPositionLowerLimit (double _limit)
 Set the lower position limit of this DegreeOfFreedom. More...
 
double getPositionLowerLimit () const
 Get the lower position limit of this DegreeOfFreedom. More...
 
void setPositionUpperLimit (double _limit)
 Set the upper position limit of this DegreeOfFreedom. More...
 
double getPositionUpperLimit () const
 Get the upper position limit of this DegreeOfFreedom. More...
 
bool isCyclic () const
 Get whether this DOF is cyclic. More...
 
bool hasPositionLimit () const
 Get whether the position of this DegreeOfFreedom has limits. More...
 
void resetPosition ()
 Set the position of this DegreeOfFreedom to zero. More...
 
void setInitialPosition (double _initial)
 Change the position that resetPosition() will give to this DegreeOfFreedom. More...
 
double getInitialPosition () const
 Get the position that resetPosition() will give to this DegreeOfFreedom. More...
 
Velocity
void setVelocity (double _velocity)
 Set the velocity of this DegreeOfFreedom. More...
 
double getVelocity () const
 Get the velocity of this DegreeOfFreedom. More...
 
void setVelocityLimits (double _lowerLimit, double _upperLimit)
 Set the velocity limits of this DegreeOfFreedom. More...
 
void setVelocityLimits (const std::pair< double, double > &_limits)
 Set the velocity limtis of this DegreeOfFreedom. More...
 
std::pair< double, double > getVelocityLimits () const
 Get the velocity limits of this DegreeOfFreedom. More...
 
void setVelocityLowerLimit (double _limit)
 Set the lower velocity limit of this DegreeOfFreedom. More...
 
double getVelocityLowerLimit () const
 Get the lower velocity limit of this DegreeOfFreedom. More...
 
void setVelocityUpperLimit (double _limit)
 Set the upper velocity limit of this DegreeOfFreedom. More...
 
double getVelocityUpperLimit () const
 Get the upper Velocity limit of this DegreeOfFreedom. More...
 
void resetVelocity ()
 Set the velocity of this DegreeOfFreedom to zero. More...
 
void setInitialVelocity (double _initial)
 Change the velocity that resetVelocity() will give to this DegreeOfFreedom. More...
 
double getInitialVelocity () const
 Get the velocity that resetVelocity() will give to this DegreeOfFreedom. More...
 
Acceleration
void setAcceleration (double _acceleration)
 Set the acceleration of this DegreeOfFreedom. More...
 
double getAcceleration () const
 Get the acceleration of this DegreeOfFreedom. More...
 
void resetAcceleration ()
 Set the acceleration of this DegreeOfFreedom to zero. More...
 
void setAccelerationLimits (double _lowerLimit, double _upperLimit)
 Set the acceleration limits of this DegreeOfFreedom. More...
 
void setAccelerationLimits (const std::pair< double, double > &_limits)
 Set the acceleartion limits of this DegreeOfFreedom. More...
 
std::pair< double, double > getAccelerationLimits () const
 Get the acceleration limits of this DegreeOfFreedom. More...
 
void setAccelerationLowerLimit (double _limit)
 Set the lower acceleration limit of this DegreeOfFreedom. More...
 
double getAccelerationLowerLimit () const
 Get the lower acceleration limit of this DegreeOfFreedom. More...
 
void setAccelerationUpperLimit (double _limit)
 Set the upper acceleration limit of this DegreeOfFreedom. More...
 
double getAccelerationUpperLimit () const
 Get the upper acceleration limit of this DegreeOfFreedom. More...
 
Force
void setForce (double _force)
 Set the generalized force of this DegreeOfFreedom. More...
 
double getForce () const
 Get the generalized force of this DegreeOfFreedom. More...
 
void resetForce ()
 Set the generalized force of this DegreeOfFreedom to zero. More...
 
void setForceLimits (double _lowerLimit, double _upperLimit)
 Set the generalized force limits of this DegreeOfFreedom. More...
 
void setForceLimits (const std::pair< double, double > &_limits)
 Set the generalized force limits of this DegreeOfFreedom. More...
 
std::pair< double, double > getForceLimits () const
 Get the generalized force limits of this DegreeOfFreedom. More...
 
void setForceLowerLimit (double _limit)
 Set the lower generalized force limit of this DegreeOfFreedom. More...
 
double getForceLowerLimit () const
 Get the lower generalized force limit of this DegreeOfFreedom. More...
 
void setForceUpperLimit (double _limit)
 Set the upper generalized force limit of this DegreeOfFreedom. More...
 
double getForceUpperLimit () const
 Get the upper generalized force limit of this DegreeOfFreedom. More...
 
Velocity change
void setVelocityChange (double _velocityChange)
 Set the velocity change of this DegreeOfFreedom. More...
 
double getVelocityChange () const
 Get the velocity change of this DegreeOfFreedom. More...
 
void resetVelocityChange ()
 Set the velocity change of this DegreeOfFreedom to zero. More...
 
Constraint impulse
void setConstraintImpulse (double _impulse)
 Set the constraint impulse of this generalized coordinate. More...
 
double getConstraintImpulse () const
 Get the constraint impulse of this generalized coordinate. More...
 
void resetConstraintImpulse ()
 Set the constraint impulse of this generalized coordinate to zero. More...
 
Passive forces - spring, viscous friction, Coulomb friction
void setSpringStiffness (double _k)
 Set stiffness of the spring force for this generalized coordinate. More...
 
double getSpringStiffness () const
 Get stiffness of the spring force for this generalized coordinate. More...
 
void setRestPosition (double _q0)
 Set rest position for the spring force of this generalized coordinate. More...
 
double getRestPosition () const
 Get rest position for the spring force of this generalized coordinate. More...
 
void setDampingCoefficient (double _coeff)
 Set coefficient of damping (viscous friction) force for this generalized coordinate. More...
 
double getDampingCoefficient () const
 Get coefficient of damping (viscous friction) force for this generalized coordinate. More...
 
void setCoulombFriction (double _friction)
 Set Coulomb friction force for this generalized coordinate. More...
 
double getCoulombFriction () const
 Get Coulomb friction force for this generalized coordinate. More...
 
Relationships
JointgetJoint ()
 Get the Joint that this DegreeOfFreedom belongs to. More...
 
const JointgetJoint () const
 Get the Joint that this DegreeOfFreedom belongs to. More...
 
SkeletonPtr getSkeleton ()
 Get the Skeleton that this DegreeOfFreedom is inside of. More...
 
ConstSkeletonPtr getSkeleton () const
 Get the Skeleton that this DegreeOfFreedom is inside of. More...
 
BodyNodegetChildBodyNode ()
 Get the BodyNode downstream of this DegreeOfFreedom. More...
 
const BodyNodegetChildBodyNode () const
 Get the BodyNode downstream of this DegreeOfFreedom. More...
 
BodyNodegetParentBodyNode ()
 Get the BodyNode upstream of this DegreeOfFreedom. More...
 
const BodyNodegetParentBodyNode () const
 Get the BodyNode upstream of this DegreeOfFreedom. More...
 

Protected Member Functions

 DegreeOfFreedom (Joint *_joint, std::size_t _indexInJoint)
 The constructor is protected so that only Joints can create DegreeOfFreedom classes. More...
 
void sendDestructionNotification () const
 Send a destruction notification to all Observers. More...
 
void addObserver (Observer *_observer) const
 Add an Observer to the list of Observers. More...
 
void removeObserver (Observer *_observer) const
 Remove an Observer from the list of Observers. More...
 

Protected Attributes

std::size_t mIndexInJoint
 Index of this DegreeOfFreedom within its Joint. More...
 
std::size_t mIndexInSkeleton
 Index of this DegreeOfFreedom within its Skeleton. More...
 
std::size_t mIndexInTree
 Index of this DegreeOfFreedom within its tree. More...
 
JointmJoint
 The joint that this DegreeOfFreedom belongs to. More...
 
std::set< Observer * > mObservers
 List of current Observers. More...
 

Friends

class Joint
 
template<class >
class GenericJoint
 
class Skeleton
 

Detailed Description

DegreeOfFreedom class is a proxy class for accessing single degrees of freedom (aka generalized coordinates) of the Skeleton.

Constructor & Destructor Documentation

◆ DegreeOfFreedom() [1/2]

dart::dynamics::DegreeOfFreedom::DegreeOfFreedom ( const DegreeOfFreedom )
delete

◆ DegreeOfFreedom() [2/2]

dart::dynamics::DegreeOfFreedom::DegreeOfFreedom ( Joint _joint,
std::size_t  _indexInJoint 
)
protected

The constructor is protected so that only Joints can create DegreeOfFreedom classes.

Member Function Documentation

◆ addObserver()

void dart::common::Subject::addObserver ( Observer _observer) const
protectedinherited

Add an Observer to the list of Observers.

◆ getAcceleration()

double dart::dynamics::DegreeOfFreedom::getAcceleration ( ) const

Get the acceleration of this DegreeOfFreedom.

◆ getAccelerationLimits()

std::pair< double, double > dart::dynamics::DegreeOfFreedom::getAccelerationLimits ( ) const

Get the acceleration limits of this DegreeOfFreedom.

◆ getAccelerationLowerLimit()

double dart::dynamics::DegreeOfFreedom::getAccelerationLowerLimit ( ) const

Get the lower acceleration limit of this DegreeOfFreedom.

◆ getAccelerationUpperLimit()

double dart::dynamics::DegreeOfFreedom::getAccelerationUpperLimit ( ) const

Get the upper acceleration limit of this DegreeOfFreedom.

◆ getChildBodyNode() [1/2]

BodyNode * dart::dynamics::DegreeOfFreedom::getChildBodyNode ( )

Get the BodyNode downstream of this DegreeOfFreedom.

◆ getChildBodyNode() [2/2]

const BodyNode * dart::dynamics::DegreeOfFreedom::getChildBodyNode ( ) const

Get the BodyNode downstream of this DegreeOfFreedom.

◆ getCommand()

double dart::dynamics::DegreeOfFreedom::getCommand ( ) const

Get the command of this DegreeOfFreedom.

◆ getConstraintImpulse()

double dart::dynamics::DegreeOfFreedom::getConstraintImpulse ( ) const

Get the constraint impulse of this generalized coordinate.

◆ getCoulombFriction()

double dart::dynamics::DegreeOfFreedom::getCoulombFriction ( ) const

Get Coulomb friction force for this generalized coordinate.

◆ getDampingCoefficient()

double dart::dynamics::DegreeOfFreedom::getDampingCoefficient ( ) const

Get coefficient of damping (viscous friction) force for this generalized coordinate.

◆ getForce()

double dart::dynamics::DegreeOfFreedom::getForce ( ) const

Get the generalized force of this DegreeOfFreedom.

◆ getForceLimits()

std::pair< double, double > dart::dynamics::DegreeOfFreedom::getForceLimits ( ) const

Get the generalized force limits of this DegreeOfFreedom.

◆ getForceLowerLimit()

double dart::dynamics::DegreeOfFreedom::getForceLowerLimit ( ) const

Get the lower generalized force limit of this DegreeOfFreedom.

◆ getForceUpperLimit()

double dart::dynamics::DegreeOfFreedom::getForceUpperLimit ( ) const

Get the upper generalized force limit of this DegreeOfFreedom.

◆ getIndexInJoint()

std::size_t dart::dynamics::DegreeOfFreedom::getIndexInJoint ( ) const

Get this DegreeOfFreedom's index within its Joint.

◆ getIndexInSkeleton()

std::size_t dart::dynamics::DegreeOfFreedom::getIndexInSkeleton ( ) const

Get this DegreeOfFreedom's index within its Skeleton.

◆ getIndexInTree()

std::size_t dart::dynamics::DegreeOfFreedom::getIndexInTree ( ) const

Get this DegreeOfFreedom's index within its tree.

◆ getInitialPosition()

double dart::dynamics::DegreeOfFreedom::getInitialPosition ( ) const

Get the position that resetPosition() will give to this DegreeOfFreedom.

◆ getInitialVelocity()

double dart::dynamics::DegreeOfFreedom::getInitialVelocity ( ) const

Get the velocity that resetVelocity() will give to this DegreeOfFreedom.

◆ getJoint() [1/2]

Joint * dart::dynamics::DegreeOfFreedom::getJoint ( )

Get the Joint that this DegreeOfFreedom belongs to.

◆ getJoint() [2/2]

const Joint * dart::dynamics::DegreeOfFreedom::getJoint ( ) const

Get the Joint that this DegreeOfFreedom belongs to.

◆ getName()

const std::string & dart::dynamics::DegreeOfFreedom::getName ( ) const

Get the name of this DegreeOfFreedom.

DegreeOfFreedom's name will be automatically given by the joint it belongs to. Below is the naming policy:

  • GenericJoint<RealSpace>
    Same name as the joint it belongs to.
  • GenericJoint<[multi_dof_joint_space]>
    "[Joint_name]+[affix]" is used. The affix is determined according to the role they play in the joint. For example, suppose there's a TranslationalJoint named "trans_joint". Then the each dof to be named "trans_joint_x", "trans_joint_y", and "trans_joint_z".
  • ZeroDofJoint
    ZeroDofJoint doesn't have dof.

The default name can be renamed by setName() as well.

◆ getParentBodyNode() [1/2]

BodyNode * dart::dynamics::DegreeOfFreedom::getParentBodyNode ( )

Get the BodyNode upstream of this DegreeOfFreedom.

◆ getParentBodyNode() [2/2]

const BodyNode * dart::dynamics::DegreeOfFreedom::getParentBodyNode ( ) const

Get the BodyNode upstream of this DegreeOfFreedom.

◆ getPosition()

double dart::dynamics::DegreeOfFreedom::getPosition ( ) const

Get the position of this DegreeOfFreedom.

◆ getPositionLimits()

std::pair< double, double > dart::dynamics::DegreeOfFreedom::getPositionLimits ( ) const

Get the position limits of this DegreeOfFreedom.

◆ getPositionLowerLimit()

double dart::dynamics::DegreeOfFreedom::getPositionLowerLimit ( ) const

Get the lower position limit of this DegreeOfFreedom.

◆ getPositionUpperLimit()

double dart::dynamics::DegreeOfFreedom::getPositionUpperLimit ( ) const

Get the upper position limit of this DegreeOfFreedom.

◆ getRestPosition()

double dart::dynamics::DegreeOfFreedom::getRestPosition ( ) const

Get rest position for the spring force of this generalized coordinate.

◆ getSkeleton() [1/2]

SkeletonPtr dart::dynamics::DegreeOfFreedom::getSkeleton ( )

Get the Skeleton that this DegreeOfFreedom is inside of.

◆ getSkeleton() [2/2]

ConstSkeletonPtr dart::dynamics::DegreeOfFreedom::getSkeleton ( ) const

Get the Skeleton that this DegreeOfFreedom is inside of.

◆ getSpringStiffness()

double dart::dynamics::DegreeOfFreedom::getSpringStiffness ( ) const

Get stiffness of the spring force for this generalized coordinate.

◆ getTreeIndex()

std::size_t dart::dynamics::DegreeOfFreedom::getTreeIndex ( ) const

Get the index of the tree that this DegreeOfFreedom belongs to.

◆ getVelocity()

double dart::dynamics::DegreeOfFreedom::getVelocity ( ) const

Get the velocity of this DegreeOfFreedom.

◆ getVelocityChange()

double dart::dynamics::DegreeOfFreedom::getVelocityChange ( ) const

Get the velocity change of this DegreeOfFreedom.

◆ getVelocityLimits()

std::pair< double, double > dart::dynamics::DegreeOfFreedom::getVelocityLimits ( ) const

Get the velocity limits of this DegreeOfFreedom.

◆ getVelocityLowerLimit()

double dart::dynamics::DegreeOfFreedom::getVelocityLowerLimit ( ) const

Get the lower velocity limit of this DegreeOfFreedom.

◆ getVelocityUpperLimit()

double dart::dynamics::DegreeOfFreedom::getVelocityUpperLimit ( ) const

Get the upper Velocity limit of this DegreeOfFreedom.

◆ hasPositionLimit()

bool dart::dynamics::DegreeOfFreedom::hasPositionLimit ( ) const

Get whether the position of this DegreeOfFreedom has limits.

◆ isCyclic()

bool dart::dynamics::DegreeOfFreedom::isCyclic ( ) const

Get whether this DOF is cyclic.

Return true if and only if an infinite number of DOF positions produce the same local transform. If this DOF is part of a multi-DOF joint, then producing a cycle may require altering the position of the Joint's other DOFs.

◆ isNamePreserved()

bool dart::dynamics::DegreeOfFreedom::isNamePreserved ( ) const

Check whether DegreeOfFreedom::lockName(bool) is activate.

◆ preserveName()

void dart::dynamics::DegreeOfFreedom::preserveName ( bool  _preserve)

Prevent Joint::updateDegreeOfFreedomNames() from changing the name of this degree of freedom.

This is useful if you (the user) have customized the name for this DegreeOfFreedom and want to prevent DART from automatically updating its name if its parent Joint properties ever change.

◆ removeObserver()

void dart::common::Subject::removeObserver ( Observer _observer) const
protectedinherited

Remove an Observer from the list of Observers.

◆ resetAcceleration()

void dart::dynamics::DegreeOfFreedom::resetAcceleration ( )

Set the acceleration of this DegreeOfFreedom to zero.

◆ resetCommand()

void dart::dynamics::DegreeOfFreedom::resetCommand ( )

Set the command of this DegreeOfFreedom to zero.

◆ resetConstraintImpulse()

void dart::dynamics::DegreeOfFreedom::resetConstraintImpulse ( )

Set the constraint impulse of this generalized coordinate to zero.

◆ resetForce()

void dart::dynamics::DegreeOfFreedom::resetForce ( )

Set the generalized force of this DegreeOfFreedom to zero.

◆ resetPosition()

void dart::dynamics::DegreeOfFreedom::resetPosition ( )

Set the position of this DegreeOfFreedom to zero.

◆ resetVelocity()

void dart::dynamics::DegreeOfFreedom::resetVelocity ( )

Set the velocity of this DegreeOfFreedom to zero.

◆ resetVelocityChange()

void dart::dynamics::DegreeOfFreedom::resetVelocityChange ( )

Set the velocity change of this DegreeOfFreedom to zero.

◆ sendDestructionNotification()

void dart::common::Subject::sendDestructionNotification ( ) const
protectedinherited

Send a destruction notification to all Observers.

This will cause all Observers to behave as if this Subject has been permanently deleted, so it should only be called when that behavior is desired.

◆ setAcceleration()

void dart::dynamics::DegreeOfFreedom::setAcceleration ( double  _acceleration)

Set the acceleration of this DegreeOfFreedom.

◆ setAccelerationLimits() [1/2]

void dart::dynamics::DegreeOfFreedom::setAccelerationLimits ( const std::pair< double, double > &  _limits)

Set the acceleartion limits of this DegreeOfFreedom.

◆ setAccelerationLimits() [2/2]

void dart::dynamics::DegreeOfFreedom::setAccelerationLimits ( double  _lowerLimit,
double  _upperLimit 
)

Set the acceleration limits of this DegreeOfFreedom.

◆ setAccelerationLowerLimit()

void dart::dynamics::DegreeOfFreedom::setAccelerationLowerLimit ( double  _limit)

Set the lower acceleration limit of this DegreeOfFreedom.

◆ setAccelerationUpperLimit()

void dart::dynamics::DegreeOfFreedom::setAccelerationUpperLimit ( double  _limit)

Set the upper acceleration limit of this DegreeOfFreedom.

◆ setCommand()

void dart::dynamics::DegreeOfFreedom::setCommand ( double  _command)

Set the command of this DegreeOfFreedom.

◆ setConstraintImpulse()

void dart::dynamics::DegreeOfFreedom::setConstraintImpulse ( double  _impulse)

Set the constraint impulse of this generalized coordinate.

◆ setCoulombFriction()

void dart::dynamics::DegreeOfFreedom::setCoulombFriction ( double  _friction)

Set Coulomb friction force for this generalized coordinate.

◆ setDampingCoefficient()

void dart::dynamics::DegreeOfFreedom::setDampingCoefficient ( double  _coeff)

Set coefficient of damping (viscous friction) force for this generalized coordinate.

◆ setForce()

void dart::dynamics::DegreeOfFreedom::setForce ( double  _force)

Set the generalized force of this DegreeOfFreedom.

◆ setForceLimits() [1/2]

void dart::dynamics::DegreeOfFreedom::setForceLimits ( const std::pair< double, double > &  _limits)

Set the generalized force limits of this DegreeOfFreedom.

◆ setForceLimits() [2/2]

void dart::dynamics::DegreeOfFreedom::setForceLimits ( double  _lowerLimit,
double  _upperLimit 
)

Set the generalized force limits of this DegreeOfFreedom.

◆ setForceLowerLimit()

void dart::dynamics::DegreeOfFreedom::setForceLowerLimit ( double  _limit)

Set the lower generalized force limit of this DegreeOfFreedom.

◆ setForceUpperLimit()

void dart::dynamics::DegreeOfFreedom::setForceUpperLimit ( double  _limit)

Set the upper generalized force limit of this DegreeOfFreedom.

◆ setInitialPosition()

void dart::dynamics::DegreeOfFreedom::setInitialPosition ( double  _initial)

Change the position that resetPosition() will give to this DegreeOfFreedom.

◆ setInitialVelocity()

void dart::dynamics::DegreeOfFreedom::setInitialVelocity ( double  _initial)

Change the velocity that resetVelocity() will give to this DegreeOfFreedom.

◆ setName()

const std::string & dart::dynamics::DegreeOfFreedom::setName ( const std::string &  _name,
bool  _preserveName = true 
)

Change the name of this DegreeOfFreedom.

The _preserveName argument will be passed to the preserveName(bool) function. Set _preserveName to true when customizing the name of the DegreeOfFreedom; that way the name will not be overwritten if the Joint name changes.

◆ setPosition()

void dart::dynamics::DegreeOfFreedom::setPosition ( double  _position)

Set the position of this DegreeOfFreedom.

◆ setPositionLimits() [1/2]

void dart::dynamics::DegreeOfFreedom::setPositionLimits ( const std::pair< double, double > &  _limits)

Set the position limits of this DegreeOfFreedom.

◆ setPositionLimits() [2/2]

void dart::dynamics::DegreeOfFreedom::setPositionLimits ( double  _lowerLimit,
double  _upperLimit 
)

Set the position limits of this DegreeOfFreedom.

◆ setPositionLowerLimit()

void dart::dynamics::DegreeOfFreedom::setPositionLowerLimit ( double  _limit)

Set the lower position limit of this DegreeOfFreedom.

◆ setPositionUpperLimit()

void dart::dynamics::DegreeOfFreedom::setPositionUpperLimit ( double  _limit)

Set the upper position limit of this DegreeOfFreedom.

◆ setRestPosition()

void dart::dynamics::DegreeOfFreedom::setRestPosition ( double  _q0)

Set rest position for the spring force of this generalized coordinate.

◆ setSpringStiffness()

void dart::dynamics::DegreeOfFreedom::setSpringStiffness ( double  _k)

Set stiffness of the spring force for this generalized coordinate.

◆ setVelocity()

void dart::dynamics::DegreeOfFreedom::setVelocity ( double  _velocity)

Set the velocity of this DegreeOfFreedom.

◆ setVelocityChange()

void dart::dynamics::DegreeOfFreedom::setVelocityChange ( double  _velocityChange)

Set the velocity change of this DegreeOfFreedom.

◆ setVelocityLimits() [1/2]

void dart::dynamics::DegreeOfFreedom::setVelocityLimits ( const std::pair< double, double > &  _limits)

Set the velocity limtis of this DegreeOfFreedom.

◆ setVelocityLimits() [2/2]

void dart::dynamics::DegreeOfFreedom::setVelocityLimits ( double  _lowerLimit,
double  _upperLimit 
)

Set the velocity limits of this DegreeOfFreedom.

◆ setVelocityLowerLimit()

void dart::dynamics::DegreeOfFreedom::setVelocityLowerLimit ( double  _limit)

Set the lower velocity limit of this DegreeOfFreedom.

◆ setVelocityUpperLimit()

void dart::dynamics::DegreeOfFreedom::setVelocityUpperLimit ( double  _limit)

Set the upper velocity limit of this DegreeOfFreedom.

Friends And Related Function Documentation

◆ GenericJoint

template<class >
friend class GenericJoint
friend

◆ Joint

friend class Joint
friend

◆ Skeleton

friend class Skeleton
friend

Member Data Documentation

◆ mIndexInJoint

std::size_t dart::dynamics::DegreeOfFreedom::mIndexInJoint
protected

Index of this DegreeOfFreedom within its Joint.

The index is determined when this DegreeOfFreedom is created by the Joint it belongs to. Note that the index should be unique within the Joint.

◆ mIndexInSkeleton

std::size_t dart::dynamics::DegreeOfFreedom::mIndexInSkeleton
protected

Index of this DegreeOfFreedom within its Skeleton.

◆ mIndexInTree

std::size_t dart::dynamics::DegreeOfFreedom::mIndexInTree
protected

Index of this DegreeOfFreedom within its tree.

◆ mJoint

Joint* dart::dynamics::DegreeOfFreedom::mJoint
protected

The joint that this DegreeOfFreedom belongs to.

◆ mObservers

std::set<Observer*> dart::common::Subject::mObservers
mutableprotectedinherited

List of current Observers.