33 #ifndef DART_DYNAMICS_JOINT_HPP_ 34 #define DART_DYNAMICS_JOINT_HPP_ 40 #include "dart/common/Deprecated.hpp" 41 #include "dart/common/EmbeddedAspect.hpp" 42 #include "dart/common/Subject.hpp" 43 #include "dart/common/VersionCounter.hpp" 44 #include "dart/dynamics/SmartPointer.hpp" 45 #include "dart/dynamics/detail/JointAspect.hpp" 46 #include "dart/math/MathTypes.hpp" 53 class DegreeOfFreedom;
56 DART_DECLARE_CLASS_WITH_VIRTUAL_BASE_BEGIN
65 typedef detail::ActuatorType ActuatorType;
66 static constexpr ActuatorType FORCE = detail::FORCE;
67 static constexpr ActuatorType PASSIVE = detail::PASSIVE;
68 static constexpr ActuatorType SERVO = detail::SERVO;
69 static constexpr ActuatorType MIMIC = detail::MIMIC;
70 static constexpr ActuatorType ACCELERATION = detail::ACCELERATION;
71 static constexpr ActuatorType VELOCITY = detail::VELOCITY;
72 static constexpr ActuatorType LOCKED = detail::LOCKED;
74 DART_BAKE_SPECIALIZED_ASPECT_IRREGULAR(
Aspect, JointAspect)
80 const Properties& standardProperties = Properties(),
85 Properties&& standardProperties,
125 const std::string&
setName(
const std::string& _name,
bool _renameDofs =
true);
128 const std::string&
getName()
const;
131 virtual const std::string&
getType()
const = 0;
141 const Joint* _mimicJoint,
142 double _mimicMultiplier = 1.0,
143 double _mimicOffset = 0.0);
181 std::shared_ptr<const Skeleton>
getSkeleton()
const;
204 DART_DEPRECATED(6.10)
224 DART_DEPRECATED(6.10)
261 std::
size_t _index, const
std::
string& _name,
bool _preserveName = true)
281 virtual
void setCommand(
std::
size_t _index,
double _command) = 0;
302 virtual
void setPosition(
std::
size_t _index,
double _position) = 0;
342 virtual
bool isCyclic(
std::
size_t _index) const = 0;
375 virtual
void setVelocity(
std::
size_t _index,
double _velocity) = 0;
455 std::
size_t _index,
double _acceleration)
470 std::
size_t _index,
double _acceleration)
490 virtual
void setForce(
std::
size_t _index,
double _force) = 0;
493 virtual
double getForce(
std::
size_t _index) const = 0;
537 bool checkSanity(
bool _printWarnings = true) const;
583 const
Eigen::VectorXd& _q2, const
Eigen::VectorXd& _q1) const = 0;
691 const
Eigen::VectorXd& positions) const = 0;
769 virtual Joint*
clone() const = 0;
854 Eigen::Vector6d& _partialAcceleration,
855 const
Eigen::Vector6d& _childVelocity)
867 Eigen::Matrix6d& _parentArtInertia,
868 const
Eigen::Matrix6d& _childArtInertia)
873 Eigen::Matrix6d& _parentArtInertiaImplicit,
874 const
Eigen::Matrix6d& _childArtInertiaImplicit)
883 const
Eigen::Matrix6d& _artInertia,
double _timeStep)
889 Eigen::Vector6d& _parentBiasForce,
890 const
Eigen::Matrix6d& _childArtInertia,
891 const
Eigen::Vector6d& _childBiasForce,
892 const
Eigen::Vector6d& _childPartialAcc)
897 Eigen::Vector6d& _parentBiasImpulse,
898 const
Eigen::Matrix6d& _childArtInertia,
899 const
Eigen::Vector6d& _childBiasImpulse)
904 const
Eigen::Vector6d& _bodyForce,
double _timeStep)
917 const
Eigen::Matrix6d& _artInertia, const
Eigen::Vector6d& _spatialAcc)
924 const
Eigen::Matrix6d& _artInertia,
925 const
Eigen::Vector6d& _velocityChange)
936 const
Eigen::Vector6d& _bodyForce,
938 bool _withDampingForces,
939 bool _withSpringForces)
950 const
Eigen::Vector6d& _bodyForce,
952 bool _withDampingForces,
953 bool _withSpringForces)
973 Eigen::Vector6d& _parentBiasForce,
974 const
Eigen::Matrix6d& _childArtInertia,
975 const
Eigen::Vector6d& _childBiasForce)
980 Eigen::Vector6d& _parentBiasForce,
981 const
Eigen::Matrix6d& _childArtInertia,
982 const
Eigen::Vector6d& _childBiasForce)
986 virtual
void updateTotalForceForInvMassMatrix(
987 const
Eigen::Vector6d& _bodyForce)
991 virtual
void getInvMassMatrixSegment(
992 Eigen::MatrixXd& _invMassMat,
993 const
std::
size_t _col,
994 const
Eigen::Matrix6d& _artInertia,
995 const
Eigen::Vector6d& _spatialAcc)
999 virtual
void getInvAugMassMatrixSegment(
1000 Eigen::MatrixXd& _invMassMat,
1001 const
std::
size_t _col,
1002 const
Eigen::Matrix6d& _artInertia,
1003 const
Eigen::Vector6d& _spatialAcc)
1007 virtual
void addInvMassMatrixSegmentTo(
Eigen::Vector6d& _acc) = 0;
1010 virtual
Eigen::VectorXd getSpatialToGeneralized(
1011 const
Eigen::Vector6d& _spatial)
1073 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1075 DART_DECLARE_CLASS_WITH_VIRTUAL_BASE_END
1080 #endif // DART_DYNAMICS_JOINT_HPP_ Definition: JointAspect.hpp:111
virtual double getVelocityChange(std::size_t _index) const =0
Get a single velocity change.
double getMimicOffset() const
Get mimic joint offset.
Definition: Joint.cpp:229
virtual double getPosition(std::size_t _index) const =0
Get the position of a single generalized coordinate.
virtual void setForceUpperLimits(const Eigen::VectorXd &upperLimits)=0
Set the force upper limits of all the generalized coordinates.
virtual const math::Jacobian getRelativeJacobianTimeDeriv() const =0
Get time derivative of spatial Jacobian of the child BodyNode relative to the parent BodyNode express...
const Joint * getMimicJoint() const
Get mimic joint.
Definition: Joint.cpp:217
const math::Jacobian getLocalJacobian() const
Deprecated. Use getRelativeJacobian() instead.
Definition: Joint.cpp:326
const Eigen::Isometry3d & getTransformFromChildBodyNode() const
Get transformation from child body node to this joint.
Definition: Joint.cpp:513
bool mIsRelativeJacobianTimeDerivDirty
True iff this joint's relative Jacobian time derivative has not been updated since the last position ...
Definition: Joint.hpp:1069
virtual void setForce(std::size_t _index, double _force)=0
Set the force of a single generalized coordinate.
const Eigen::Isometry3d & getLocalTransform() const
Deprecated. Use getRelativeTransform() instead.
Definition: Joint.cpp:302
Eigen::Vector6d mPrimaryAcceleration
J * q_dd.
Definition: Joint.hpp:1041
virtual Eigen::VectorXd getPositionLowerLimits() const =0
Get the position lower limits of all the generalized coordinates.
virtual void updateImpulseFD(const Eigen::Vector6d &_bodyImpulse)=0
Update joint impulses for forward dynamics.
virtual void setInitialPositions(const Eigen::VectorXd &_initial)=0
Change the positions that resetPositions() will give to this Joint's coordinates. ...
virtual double computePotentialEnergy() const =0
Compute and return the potential energy.
virtual void setInitialPosition(std::size_t _index, double _initial)=0
Change the position that resetPositions() will give to this coordinate.
Eigen::Isometry3d mT
Relative transformation of the child BodyNode relative to the parent BodyNode expressed in the child ...
Definition: Joint.hpp:1024
The Subject class is a base class for any object that wants to report when it gets destroyed...
Definition: Subject.hpp:57
bool mNeedSpatialAccelerationUpdate
True iff this joint's position, velocity, or acceleration has changed since the last call to getRelat...
Definition: Joint.hpp:1055
std::size_t getJointIndexInTree() const
Get the index of this Joint within its tree.
Definition: Joint.cpp:422
virtual double getCommand(std::size_t _index) const =0
Get a single command.
class Joint
Definition: Joint.hpp:57
virtual void setCoulombFriction(std::size_t _index, double _friction)=0
Set joint Coulomb friction froce.
virtual void updateTotalForce(const Eigen::Vector6d &_bodyForce, double _timeStep)=0
Update joint total force.
SkeletonPtr getSkeleton()
Get the Skeleton that this Joint belongs to.
Definition: Joint.cpp:290
virtual double getPositionUpperLimit(std::size_t _index) const =0
Get upper limit for position.
virtual void setPartialAccelerationTo(Eigen::Vector6d &_partialAcceleration, const Eigen::Vector6d &_childVelocity)=0
Set joint partial acceleration to _partialAcceleration.
SoftBodyNode represent a soft body that has one deformable skin.
Definition: SoftBodyNode.hpp:45
bool isKinematic() const
Return true if this joint is kinematic joint.
Definition: Joint.cpp:235
virtual double getPositionLowerLimit(std::size_t _index) const =0
Get lower limit for position.
virtual Eigen::VectorXd getForces() const =0
Get the forces of all generalized coordinates in this Joint.
virtual void addChildBiasImpulseTo(Eigen::Vector6d &_parentBiasImpulse, const Eigen::Matrix6d &_childArtInertia, const Eigen::Vector6d &_childBiasImpulse)=0
Add child's bias impulse to parent's one.
void notifyVelocityUpdate()
Notify that a velocity has updated.
Definition: Joint.cpp:646
virtual void resetVelocities()=0
Set the velocities of all generalized coordinates in this Joint to their initial velocities.
virtual double getInitialVelocity(std::size_t _index) const =0
Get the velocity that resetVelocity() will give to this coordinate.
const Properties & getJointProperties() const
Get the Properties of this Joint.
Definition: Joint.cpp:129
Definition: CompositeData.hpp:106
virtual void setAccelerations(const Eigen::VectorXd &_accelerations)=0
Set the accelerations of all generalized coordinates in this Joint.
virtual double getSpringStiffness(std::size_t _index) const =0
Get stiffness of joint spring force.
static const ActuatorType DefaultActuatorType
Default actuator type.
Definition: Joint.hpp:93
virtual void updateRelativeTransform() const =0
Update transform of the child BodyNode relative to the parent BodyNode expressed in the child BodyNod...
virtual Eigen::VectorXd getAccelerations() const =0
Get the accelerations of all generalized coordinates in this Joint.
virtual void addVelocityChangeTo(Eigen::Vector6d &_velocityChange)=0
Add joint velocity change to _velocityChange.
virtual void addVelocityTo(Eigen::Vector6d &_vel)=0
Add joint velocity to _vel.
virtual void setCommands(const Eigen::VectorXd &_commands)=0
Set all commands for this Joint.
virtual void setVelocityUpperLimit(std::size_t _index, double _velocity)=0
Set upper limit for velocity.
virtual void setPositions(const Eigen::VectorXd &_positions)=0
Set the positions of all generalized coordinates in this Joint.
Joint()
Constructor called by inheriting class.
Definition: Joint.cpp:519
virtual void addAccelerationTo(Eigen::Vector6d &_acc)=0
Add joint acceleration to _acc.
Definition: MathTypes.hpp:47
virtual void updateInvProjArtInertia(const Eigen::Matrix6d &_artInertia)=0
Update inverse of projected articulated body inertia.
virtual Eigen::VectorXd getAccelerationLowerLimits() const =0
Get the acceleration upper limits of all the generalized coordinates.
virtual void updateRelativePrimaryAcceleration() const =0
Update J * of this joint.
virtual const std::string & getDofName(std::size_t _index) const =0
Alternative to DegreeOfFreedom::getName()
Definition: SharedLibraryManager.hpp:46
DegreeOfFreedom * createDofPointer(std::size_t _indexInJoint)
Create a DegreeOfFreedom pointer.
Definition: Joint.cpp:536
virtual void resetCommands()=0
Set all the commands for this Joint to zero.
virtual void setPositionLowerLimits(const Eigen::VectorXd &lowerLimits)=0
Set the position lower limits of all the generalized coordinates.
virtual void updateConstrainedTerms(double _timeStep)=0
Update constrained terms for forward dynamics.
Joint & operator=(const Joint &_otherJoint)
Same as copy(const Joint&)
Definition: Joint.cpp:153
Eigen::Vector6d mSpatialVelocity
Relative spatial velocity from parent BodyNode to child BodyNode where the velocity is expressed in c...
Definition: Joint.hpp:1030
VersionCounter is an interface for objects that count their versions.
Definition: VersionCounter.hpp:42
void updateLocalTransform() const
Deprecated. Use updateRelativeTransform() instead.
Definition: Joint.cpp:542
virtual const std::string & setDofName(std::size_t _index, const std::string &_name, bool _preserveName=true)=0
Alternative to DegreeOfFreedom::setName()
virtual const std::string & getType() const =0
Gets a string representing the joint type.
virtual Eigen::VectorXd getVelocities() const =0
Get the velocities of all generalized coordinates in this Joint.
virtual Eigen::VectorXd getPositionUpperLimits() const =0
Get the position upper limits of all the generalized coordinates.
virtual void setTransformFromParentBodyNode(const Eigen::Isometry3d &_T)
Set transformation from parent body node to this joint.
Definition: Joint.cpp:490
virtual void resetVelocity(std::size_t _index)=0
Set the velocity of a generalized coordinate in this Joint to its initial velocity.
virtual void updateRelativeSpatialVelocity() const =0
Update spatial velocity of the child BodyNode relative to the parent BodyNode expressed in the child ...
virtual void setPosition(std::size_t _index, double _position)=0
Set the position of a single generalized coordinate.
virtual void addChildBiasForceForInvMassMatrix(Eigen::Vector6d &_parentBiasForce, const Eigen::Matrix6d &_childArtInertia, const Eigen::Vector6d &_childBiasForce)=0
Add child's bias force to parent's one.
virtual void setVelocityLowerLimit(std::size_t _index, double _velocity)=0
Set lower limit for velocity.
void setLimitEnforcement(bool enforced)
Sets whether enforcing joint position and velocity limits.
Definition: Joint.cpp:398
virtual double getAccelerationUpperLimit(std::size_t _index) const =0
Get upper limit for acceleration.
virtual void updateForceID(const Eigen::Vector6d &_bodyForce, double _timeStep, bool _withDampingForces, bool _withSpringForces)=0
Update joint force for inverse dynamics.
void updateLocalJacobian(bool mandatory=true) const
Deprecated. Use updateRelativeJacobian() instead.
Definition: Joint.cpp:566
virtual void setAccelerationUpperLimits(const Eigen::VectorXd &upperLimits)=0
Set the acceleration upper limits of all the generalized coordinates.
virtual void setVelocityUpperLimits(const Eigen::VectorXd &upperLimits)=0
Set the velocity upper limits of all the generalized coordinates.
void updateLocalJacobianTimeDeriv() const
Deprecated. Use updateRelativeJacobianTimeDeriv() instead.
Definition: Joint.cpp:572
virtual double getInitialPosition(std::size_t _index) const =0
Get the position that resetPosition() will give to this coordinate.
virtual Eigen::VectorXd getPositionDifferences(const Eigen::VectorXd &_q2, const Eigen::VectorXd &_q1) const =0
Return the difference of two generalized coordinates which are measured in the configuration space of...
virtual void resetPositions()=0
Set the positions of all generalized coordinates in this Joint to their initial positions.
virtual double getCoulombFriction(std::size_t _index) const =0
Get joint Coulomb friction froce.
const Eigen::Isometry3d & getTransformFromParentBodyNode() const
Get transformation from parent body node to this joint.
Definition: Joint.cpp:507
virtual void setVelocity(std::size_t _index, double _velocity)=0
Set the velocity of a single generalized coordinate.
virtual Eigen::VectorXd getVelocityUpperLimits() const =0
Get the velocity upper limits of all the generalized coordinates.
Definition: Aspect.cpp:40
virtual void setAccelerationLowerLimits(const Eigen::VectorXd &lowerLimits)=0
Set the acceleration upper limits of all the generalized coordinates.
virtual double getVelocity(std::size_t _index) const =0
Get the velocity of a single generalized coordinate.
virtual Eigen::VectorXd getInitialPositions() const =0
Get the positions that resetPositions() will give to this Joint's coordinates.
virtual void setForceUpperLimit(std::size_t _index, double _force)=0
Set upper limit for force.
virtual DegreeOfFreedom * getDof(std::size_t _index)=0
Get an object to access the _index-th degree of freedom (generalized coordinate) of this Joint...
virtual void setForceLowerLimit(std::size_t _index, double _force)=0
Set lower limit for force.
virtual double getVelocityUpperLimit(std::size_t _index) const =0
Get upper limit for velocity.
double getMimicMultiplier() const
Get mimic joint multiplier.
Definition: Joint.cpp:223
void notifyAccelerationUpdated()
Notify that an acceleration has updated.
Definition: Joint.cpp:673
void notifyPositionUpdated()
Notify that a position has updated.
Definition: Joint.cpp:618
virtual Eigen::VectorXd getCommands() const =0
Get all commands for this Joint.
void setMimicJoint(const Joint *_mimicJoint, double _mimicMultiplier=1.0, double _mimicOffset=0.0)
Set mimic joint.
Definition: Joint.cpp:208
BodyNode * mChildBodyNode
Child BodyNode pointer that this Joint belongs to.
Definition: Joint.hpp:1018
virtual void setRestPosition(std::size_t _index, double _q0)=0
Set rest position of spring force.
const std::string & getName() const
Get joint name.
Definition: Joint.cpp:190
virtual std::size_t getIndexInTree(std::size_t _index) const =0
Get a unique index in the kinematic tree of a generalized coordinate in this Joint.
virtual Eigen::VectorXd getAccelerationUpperLimits() const =0
Get the acceleration upper limits of all the generalized coordinates.
virtual void addChildBiasForceTo(Eigen::Vector6d &_parentBiasForce, const Eigen::Matrix6d &_childArtInertia, const Eigen::Vector6d &_childBiasForce, const Eigen::Vector6d &_childPartialAcc)=0
Add child's bias force to parent's one.
virtual void integrateVelocities(double _dt)=0
Integrate velocities using Euler method.
virtual void setSpringStiffness(std::size_t _index, double _k)=0
Set stiffness of joint spring force.
virtual void setPositionLowerLimit(std::size_t _index, double _position)=0
Set lower limit for position.
BodyNode * getParentBodyNode()
Get the parent BodyNode of this Joint.
Definition: Joint.cpp:275
This is the implementation of a standard embedded-properties Aspect.
Definition: EmbeddedAspect.hpp:159
virtual double getAccelerationLowerLimit(std::size_t _index) const =0
Get lower limit for acceleration.
virtual Eigen::VectorXd getVelocityLowerLimits() const =0
Get the velocity lower limits of all the generalized coordinates.
virtual std::size_t getNumDofs() const =0
Get number of generalized coordinates.
bool isDynamic() const
Return true if this joint is dynamic joint.
Definition: Joint.cpp:257
std::size_t getJointIndexInSkeleton() const
Get the index of this Joint within its Skeleton.
Definition: Joint.cpp:416
bool mNeedSpatialVelocityUpdate
True iff this joint's position or velocity has changed since the last call to getRelativeSpatialVeloc...
Definition: Joint.hpp:1050
virtual void setAccelerationUpperLimit(std::size_t _index, double _acceleration)=0
Set upper limit for acceleration.
virtual void updateRelativeJacobianTimeDeriv() const =0
Update time derivative of spatial Jacobian of the child BodyNode relative to the parent BodyNode expr...
const Eigen::Vector6d & getRelativePrimaryAcceleration() const
Get J * of this joint.
Definition: Joint.cpp:380
virtual Eigen::VectorXd getForceUpperLimits() const =0
Get the force upper limits of all the generalized coordinates.
bool checkSanity(bool _printWarnings=true) const
Returns false if the initial position or initial velocity are outside of limits.
Definition: Joint.cpp:434
virtual void preserveDofName(std::size_t _index, bool _preserve)=0
Alternative to DegreeOfFreedom::preserveName()
virtual void setCommand(std::size_t _index, double _command)=0
Set a single command.
virtual bool hasPositionLimit(std::size_t _index) const =0
Get whether the position of a generalized coordinate has limits.
virtual double getVelocityLowerLimit(std::size_t _index) const =0
Get lower limit for velocity.
virtual double getForce(std::size_t _index) const =0
Get the force of a single generalized coordinate.
void notifyVelocityUpdated()
Notify that a velocity has updated.
Definition: Joint.cpp:652
virtual void setConstraintImpulse(std::size_t _index, double _impulse)=0
Set a single constraint impulse.
virtual void resetForces()=0
Set the forces of all generalized coordinates in this Joint to zero.
virtual Eigen::VectorXd getForceLowerLimits() const =0
Get the force upper limits of all the generalized coordinates.
const std::string & setName(const std::string &_name, bool _renameDofs=true)
Set joint name and return the name.
Definition: Joint.cpp:160
virtual double getDampingCoefficient(std::size_t _index) const =0
Get coefficient of joint damping (viscous friction) force.
virtual void resetAccelerations()=0
Set the accelerations of all generalized coordinates in this Joint to zero.
virtual bool isCyclic(std::size_t _index) const =0
Get whether a generalized coordinate is cyclic.
const Eigen::Vector6d & getLocalPrimaryAcceleration() const
Deprecated. Use getLocalPrimaryAcceleration() instead.
Definition: Joint.cpp:320
virtual void setDampingCoefficient(std::size_t _index, double _coeff)=0
Set coefficient of joint damping (viscous friction) force.
BodyNode class represents a single node of the skeleton.
Definition: BodyNode.hpp:74
virtual ~Joint()
Destructor.
Definition: Joint.cpp:103
DegreeOfFreedom class is a proxy class for accessing single degrees of freedom (aka generalized coord...
Definition: DegreeOfFreedom.hpp:54
void setActuatorType(ActuatorType _actuatorType)
Set actuator type.
Definition: Joint.cpp:196
void notifyAccelerationUpdate()
Notify that an acceleration has updated.
Definition: Joint.cpp:667
virtual double getRestPosition(std::size_t _index) const =0
Get rest position of spring force.
virtual Eigen::VectorXd getInitialVelocities() const =0
Get the velocities that resetVelocities() will give to this Joint's coordinates.
virtual Joint * clone() const =0
Create a clone of this Joint.
virtual void resetTotalImpulses()=0
Set total impulses to zero.
virtual void updateTotalImpulse(const Eigen::Vector6d &_bodyImpulse)=0
Update joint total impulse.
bool mNeedTransformUpdate
True iff this joint's position has changed since the last call to getRelativeTransform() ...
Definition: Joint.hpp:1045
virtual double getAcceleration(std::size_t _index) const =0
Get the acceleration of a single generalized coordinate.
virtual void setVelocities(const Eigen::VectorXd &_velocities)=0
Set the velocities of all generalized coordinates in this Joint.
Inherit this class to embed Properties into your Composite object.
Definition: EmbeddedAspect.hpp:201
virtual void setTransformFromChildBodyNode(const Eigen::Isometry3d &_T)
Set transformation from child body node to this joint.
Definition: Joint.cpp:498
const Eigen::Vector6d & getRelativeSpatialVelocity() const
Get spatial velocity of the child BodyNode relative to the parent BodyNode expressed in the child Bod...
Definition: Joint.cpp:356
void setAspectProperties(const AspectProperties &properties)
Set the AspectProperties of this Joint.
Definition: Joint.cpp:115
virtual void setAcceleration(std::size_t _index, double _acceleration)=0
Set the acceleration of a single generalized coordinate.
void notifyPositionUpdate()
Notify that a position has updated.
Definition: Joint.cpp:612
const Eigen::Vector6d & getRelativeSpatialAcceleration() const
Get spatial acceleration of the child BodyNode relative to the parent BodyNode expressed in the child...
Definition: Joint.cpp:368
CompositeProperties mCompositeProperties
Properties of all the Aspects attached to this Joint.
Definition: Joint.hpp:89
virtual std::size_t getIndexInSkeleton(std::size_t _index) const =0
Get a unique index in skeleton of a generalized coordinate in this Joint.
virtual void updateRelativeJacobian(bool mandatory=true) const =0
Update spatial Jacobian of the child BodyNode relative to the parent BodyNode expressed in the child ...
virtual void updateRelativeSpatialAcceleration() const =0
Update spatial acceleration of the child BodyNode relative to the parent BodyNode expressed in the ch...
void updateArticulatedInertia() const
Tells the Skeleton to update the articulated inertia if it needs updating.
Definition: Joint.cpp:578
virtual void resetPosition(std::size_t _index)=0
Set the position of this generalized coordinate to its initial position.
virtual void addChildArtInertiaImplicitTo(Eigen::Matrix6d &_parentArtInertiaImplicit, const Eigen::Matrix6d &_childArtInertiaImplicit)=0
Add child's articulated inertia to parent's one. Forward dynamics routine.
virtual void setInitialVelocities(const Eigen::VectorXd &_initial)=0
Change the velocities that resetVelocities() will give to this Joint's coordinates.
Eigen::Vector6d mSpatialAcceleration
Relative spatial acceleration from parent BodyNode to child BodyNode where the acceleration is expres...
Definition: Joint.hpp:1036
bool mIsRelativeJacobianDirty
True iff this joint's relative Jacobian has not been updated since the last position change...
Definition: Joint.hpp:1065
void updateLocalSpatialAcceleration() const
Deprecated. Use updateRelativeSpatialAcceleration() instead.
Definition: Joint.cpp:554
const Eigen::Isometry3d & getRelativeTransform() const
Get transform of the child BodyNode relative to the parent BodyNode expressed in the child BodyNode f...
Definition: Joint.cpp:344
virtual void updateAcceleration(const Eigen::Matrix6d &_artInertia, const Eigen::Vector6d &_spatialAcc)=0
Update joint acceleration.
const Eigen::Vector6d & getLocalSpatialAcceleration() const
Deprecated. Use getLocalSpatialAcceleration() instead.
Definition: Joint.cpp:314
virtual const math::Jacobian getRelativeJacobian() const =0
Get spatial Jacobian of the child BodyNode relative to the parent BodyNode expressed in the child Bod...
void setPositionLimitEnforced(bool enforced)
Sets whether enforcing joint position and velocity limits.
Definition: Joint.cpp:392
virtual void setForceLowerLimits(const Eigen::VectorXd &lowerLimits)=0
Set the force upper limits of all the generalized coordinates.
ActuatorType getActuatorType() const
Get actuator type.
Definition: Joint.cpp:202
virtual void setForces(const Eigen::VectorXd &_forces)=0
Set the forces of all generalized coordinates in this Joint.
virtual void setPositionUpperLimit(std::size_t _index, double _position)=0
Set upper limit for position.
virtual bool isDofNamePreserved(std::size_t _index) const =0
Alternative to DegreeOfFreedom::isNamePreserved()
virtual void resetVelocityChanges()=0
Set zero all the velocity change.
virtual void setAccelerationLowerLimit(std::size_t _index, double _acceleration)=0
Set lower limit for acceleration.
BodyNode * getChildBodyNode()
Get the child BodyNode of this Joint.
Definition: Joint.cpp:263
virtual void registerDofs()=0
Called by the Skeleton class.
virtual double getForceLowerLimit(std::size_t _index) const =0
Get lower limit for force.
virtual void integratePositions(double _dt)=0
Integrate positions using Euler method.
virtual void setPositionUpperLimits(const Eigen::VectorXd &upperLimits)=0
Set the position upper limits of all the generalized coordinates.
std::size_t getTreeIndex() const
Get the index of the tree that this Joint belongs to.
Definition: Joint.cpp:428
virtual void setInitialVelocity(std::size_t _index, double _initial)=0
Change the velocity that resetVelocity() will give to this coordinate.
virtual void setVelocityChange(std::size_t _index, double _velocityChange)=0
Set a single velocity change.
class Skeleton
Definition: Skeleton.hpp:55
const Eigen::Vector6d & getLocalSpatialVelocity() const
Deprecated. Use getLocalSpatialVelocity() instead.
Definition: Joint.cpp:308
const math::Jacobian getLocalJacobianTimeDeriv() const
Deprecated. Use getRelativeJacobianTimeDeriv() instead.
Definition: Joint.cpp:338
virtual void updateVelocityChange(const Eigen::Matrix6d &_artInertia, const Eigen::Vector6d &_velocityChange)=0
Update joint velocity change.
virtual void updateDegreeOfFreedomNames()=0
Update the names of the joint's degrees of freedom.
void setProperties(const Properties &properties)
Set the Properties of this Joint.
Definition: Joint.cpp:109
bool mNeedPrimaryAccelerationUpdate
True iff this joint's position, velocity, or acceleration has changed since the last call to getRelat...
Definition: Joint.hpp:1060
virtual double getConstraintImpulse(std::size_t _index) const =0
Get a single constraint impulse.
void copy(const Joint &_otherJoint)
Copy the properties of another Joint.
Definition: Joint.cpp:135
bool areLimitsEnforced() const
Returns whether enforcing joint position and velocity limits.
Definition: Joint.cpp:410
virtual void addChildArtInertiaTo(Eigen::Matrix6d &_parentArtInertia, const Eigen::Matrix6d &_childArtInertia)=0
Add child's articulated inertia to parent's one.
virtual void resetConstraintImpulses()=0
Set zero all the constraint impulses.
virtual double getForceUpperLimit(std::size_t _index) const =0
Get upper limit for force.
virtual Eigen::Vector6d getBodyConstraintWrench() const =0
Get constraint wrench expressed in body node frame.
double getPotentialEnergy() const
Get potential energy.
Definition: Joint.cpp:484
virtual void addChildBiasForceForInvAugMassMatrix(Eigen::Vector6d &_parentBiasForce, const Eigen::Matrix6d &_childArtInertia, const Eigen::Vector6d &_childBiasForce)=0
Add child's bias force to parent's one.
virtual void setVelocityLowerLimits(const Eigen::VectorXd &lowerLimits)=0
Set the velocity lower limits of all the generalized coordinates.
virtual Eigen::VectorXd getPositions() const =0
Get the positions of all generalized coordinates in this Joint.
virtual void updateImpulseID(const Eigen::Vector6d &_bodyImpulse)=0
Update joint impulses for inverse dynamics.
void updateLocalSpatialVelocity() const
Deprecated. Use updateRelativeSpatialVelocity() instead.
Definition: Joint.cpp:548
virtual void updateForceFD(const Eigen::Vector6d &_bodyForce, double _timeStep, bool _withDampingForces, bool _withSpringForces)=0
Update joint force for forward dynamics.
bool isPositionLimitEnforced() const
Returns whether enforcing joint position limit.
Definition: Joint.cpp:404
virtual void updateInvProjArtInertiaImplicit(const Eigen::Matrix6d &_artInertia, double _timeStep)=0
Forward dynamics routine.
void updateLocalPrimaryAcceleration() const
Deprecated. Use updateRelativePrimaryAcceleration() instead.
Definition: Joint.cpp:560