33 #ifndef DART_DYNAMICS_DEGREEOFFREEDOM_HPP_ 34 #define DART_DYNAMICS_DEGREEOFFREEDOM_HPP_ 40 #include "dart/common/ClassWithVirtualBase.hpp" 41 #include "dart/common/Subject.hpp" 42 #include "dart/dynamics/SmartPointer.hpp" 53 DART_DECLARE_CLASS_WITH_VIRTUAL_BASE_BEGIN
71 const std::string& _name,
bool _preserveName =
true);
88 const std::string&
getName()
const;
408 DART_DECLARE_CLASS_WITH_VIRTUAL_BASE_END
413 #endif // DART_DYNAMICS_DEGREEOFFREEDOM_HPP_ std::size_t mIndexInSkeleton
Index of this DegreeOfFreedom within its Skeleton.
Definition: DegreeOfFreedom.hpp:395
double getForce() const
Get the generalized force of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:341
void setDampingCoefficient(double _coeff)
Set coefficient of damping (viscous friction) force for this generalized coordinate.
Definition: DegreeOfFreedom.cpp:456
double getVelocity() const
Get the velocity of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:202
void setSpringStiffness(double _k)
Set stiffness of the spring force for this generalized coordinate.
Definition: DegreeOfFreedom.cpp:432
std::pair< double, double > getAccelerationLimits() const
Get the acceleration limits of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:304
The Subject class is a base class for any object that wants to report when it gets destroyed...
Definition: Subject.hpp:57
std::size_t mIndexInJoint
Index of this DegreeOfFreedom within its Joint.
Definition: DegreeOfFreedom.hpp:392
class Joint
Definition: Joint.hpp:57
void resetVelocityChange()
Set the velocity change of this DegreeOfFreedom to zero.
Definition: DegreeOfFreedom.cpp:408
std::size_t mIndexInTree
Index of this DegreeOfFreedom within its tree.
Definition: DegreeOfFreedom.hpp:398
double getPositionUpperLimit() const
Get the upper position limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:160
std::size_t getIndexInJoint() const
Get this DegreeOfFreedom's index within its Joint.
Definition: DegreeOfFreedom.cpp:78
std::pair< double, double > getForceLimits() const
Get the generalized force limits of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:366
void setRestPosition(double _q0)
Set rest position for the spring force of this generalized coordinate.
Definition: DegreeOfFreedom.cpp:444
BodyNode * getChildBodyNode()
Get the BodyNode downstream of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:504
void preserveName(bool _preserve)
Prevent Joint::updateDegreeOfFreedomNames() from changing the name of this degree of freedom...
Definition: DegreeOfFreedom.cpp:54
double getAcceleration() const
Get the acceleration of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:277
double getPositionLowerLimit() const
Get the lower position limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:148
void setCoulombFriction(double _friction)
Set Coulomb friction force for this generalized coordinate.
Definition: DegreeOfFreedom.cpp:468
void setInitialVelocity(double _initial)
Change the velocity that resetVelocity() will give to this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:259
void setCommand(double _command)
Set the command of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:90
void resetAcceleration()
Set the acceleration of this DegreeOfFreedom to zero.
Definition: DegreeOfFreedom.cpp:283
void setForceLimits(double _lowerLimit, double _upperLimit)
Set the generalized force limits of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:353
void setConstraintImpulse(double _impulse)
Set the constraint impulse of this generalized coordinate.
Definition: DegreeOfFreedom.cpp:414
double getConstraintImpulse() const
Get the constraint impulse of this generalized coordinate.
Definition: DegreeOfFreedom.cpp:420
void setAcceleration(double _acceleration)
Set the acceleration of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:271
std::size_t getIndexInTree() const
Get this DegreeOfFreedom's index within its tree.
Definition: DegreeOfFreedom.cpp:72
void resetForce()
Set the generalized force of this DegreeOfFreedom to zero.
Definition: DegreeOfFreedom.cpp:347
void setPosition(double _position)
Set the position of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:108
void setVelocityLimits(double _lowerLimit, double _upperLimit)
Set the velocity limits of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:214
void setAccelerationUpperLimit(double _limit)
Set the upper acceleration limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:323
void setAccelerationLowerLimit(double _limit)
Set the lower acceleration limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:311
double getCoulombFriction() const
Get Coulomb friction force for this generalized coordinate.
Definition: DegreeOfFreedom.cpp:474
Definition: Aspect.cpp:40
void resetConstraintImpulse()
Set the constraint impulse of this generalized coordinate to zero.
Definition: DegreeOfFreedom.cpp:426
double getCommand() const
Get the command of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:96
std::size_t getIndexInSkeleton() const
Get this DegreeOfFreedom's index within its Skeleton.
Definition: DegreeOfFreedom.cpp:66
double getInitialVelocity() const
Get the velocity that resetVelocity() will give to this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:265
void setForceUpperLimit(double _limit)
Set the upper generalized force limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:384
double getForceLowerLimit() const
Get the lower generalized force limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:378
void setPositionUpperLimit(double _limit)
Set the upper position limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:154
double getAccelerationUpperLimit() const
Get the upper acceleration limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:329
bool hasPositionLimit() const
Get whether the position of this DegreeOfFreedom has limits.
Definition: DegreeOfFreedom.cpp:166
const std::string & setName(const std::string &_name, bool _preserveName=true)
Change the name of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:41
Joint * mJoint
The joint that this DegreeOfFreedom belongs to.
Definition: DegreeOfFreedom.hpp:401
void setPositionLimits(double _lowerLimit, double _upperLimit)
Set the position limits of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:120
void setPositionLowerLimit(double _limit)
Set the lower position limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:142
Joint * getJoint()
Get the Joint that this DegreeOfFreedom belongs to.
Definition: DegreeOfFreedom.cpp:480
void setAccelerationLimits(double _lowerLimit, double _upperLimit)
Set the acceleration limits of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:289
double getForceUpperLimit() const
Get the upper generalized force limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:390
double getVelocityLowerLimit() const
Get the lower velocity limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:241
void setForceLowerLimit(double _limit)
Set the lower generalized force limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:372
double getVelocityChange() const
Get the velocity change of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:402
double getDampingCoefficient() const
Get coefficient of damping (viscous friction) force for this generalized coordinate.
Definition: DegreeOfFreedom.cpp:462
BodyNode class represents a single node of the skeleton.
Definition: BodyNode.hpp:74
DegreeOfFreedom class is a proxy class for accessing single degrees of freedom (aka generalized coord...
Definition: DegreeOfFreedom.hpp:54
double getPosition() const
Get the position of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:114
std::pair< double, double > getPositionLimits() const
Get the position limits of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:134
void setVelocityLowerLimit(double _limit)
Set the lower velocity limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:235
Definition: GenericJointAspect.hpp:45
double getAccelerationLowerLimit() const
Get the lower acceleration limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:317
SkeletonPtr getSkeleton()
Get the Skeleton that this DegreeOfFreedom is inside of.
Definition: DegreeOfFreedom.cpp:492
void resetCommand()
Set the command of this DegreeOfFreedom to zero.
Definition: DegreeOfFreedom.cpp:102
void setInitialPosition(double _initial)
Change the position that resetPosition() will give to this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:184
const std::string & getName() const
Get the name of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:48
BodyNode * getParentBodyNode()
Get the BodyNode upstream of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:516
void setVelocity(double _velocity)
Set the velocity of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:196
double getInitialPosition() const
Get the position that resetPosition() will give to this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:190
void setVelocityUpperLimit(double _limit)
Set the upper velocity limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:247
double getRestPosition() const
Get rest position for the spring force of this generalized coordinate.
Definition: DegreeOfFreedom.cpp:450
bool isNamePreserved() const
Check whether DegreeOfFreedom::lockName(bool) is activate.
Definition: DegreeOfFreedom.cpp:60
void resetVelocity()
Set the velocity of this DegreeOfFreedom to zero.
Definition: DegreeOfFreedom.cpp:208
class Skeleton
Definition: Skeleton.hpp:55
double getSpringStiffness() const
Get stiffness of the spring force for this generalized coordinate.
Definition: DegreeOfFreedom.cpp:438
std::pair< double, double > getVelocityLimits() const
Get the velocity limits of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:228
bool isCyclic() const
Get whether this DOF is cyclic.
Definition: DegreeOfFreedom.cpp:172
double getVelocityUpperLimit() const
Get the upper Velocity limit of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:253
std::size_t getTreeIndex() const
Get the index of the tree that this DegreeOfFreedom belongs to.
Definition: DegreeOfFreedom.cpp:84
void setVelocityChange(double _velocityChange)
Set the velocity change of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:396
void resetPosition()
Set the position of this DegreeOfFreedom to zero.
Definition: DegreeOfFreedom.cpp:178
void setForce(double _force)
Set the generalized force of this DegreeOfFreedom.
Definition: DegreeOfFreedom.cpp:335