dart
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
dart::dynamics::Group Class Reference
Inheritance diagram for dart::dynamics::Group:
Inheritance graph
[legend]
Collaboration diagram for dart::dynamics::Group:
Collaboration graph
[legend]

Public Member Functions

virtual ~Group ()=default
 Destructor.
 
GroupPtr cloneGroup () const
 Creates and returns a clone of this Group.
 
GroupPtr cloneGroup (const std::string &cloneName) const
 Creates and returns a clone of this Group.
 
MetaSkeletonPtr cloneMetaSkeleton (const std::string &cloneName) const override
 Creates an identical clone of this MetaSkeleton.
 
void swapBodyNodeIndices (std::size_t _index1, std::size_t _index2)
 Swap the index of BodyNode _index1 with _index2.
 
void swapDofIndices (std::size_t _index1, std::size_t _index2)
 Swap the index of DegreeOfFreedom _index1 with _index2.
 
bool addComponent (BodyNode *_bn, bool _warning=true)
 Add a BodyNode and its parent DegreesOfFreedom to this Group. More...
 
bool addComponents (const std::vector< BodyNode *> &_bodyNodes, bool _warning=true)
 Add set of BodyNodes and their parent DegreesOfFreedom to this Group. More...
 
bool removeComponent (BodyNode *_bn, bool _warning=true)
 Remove a BodyNode and its parent DegreesOfFreedom from this Group. More...
 
bool removeComponents (const std::vector< BodyNode *> &_bodyNodes, bool _warning=true)
 Remove a set of BodyNodes and their parent DegreesOfFreedom from this Group. More...
 
bool addBodyNode (BodyNode *_bn, bool _warning=true)
 Add a BodyNode to this Group. More...
 
bool addBodyNodes (const std::vector< BodyNode *> &_bodyNodes, bool _warning=true)
 Add a set of BodyNodes to this Group. More...
 
bool removeBodyNode (BodyNode *_bn, bool _warning=true)
 Remove a BodyNode from this Group. More...
 
bool removeBodyNodes (const std::vector< BodyNode *> &_bodyNodes, bool _warning=true)
 Remove a set of BodyNodes from this Group. More...
 
bool addJoint (Joint *_joint, bool _addDofs=true, bool _warning=true)
 Add a Joint to this Group. More...
 
bool addJoints (const std::vector< Joint *> &_joints, bool _addDofs=true, bool _warning=true)
 Add a set of Joints to this Group. More...
 
bool removeJoint (Joint *_joint, bool _removeDofs=true, bool _warning=true)
 Remove a Joint from this Group. More...
 
bool removeJoints (const std::vector< Joint *> &_joints, bool _removeDofs=true, bool _warning=true)
 Remove a set of Joints from this Group. More...
 
bool addDof (DegreeOfFreedom *_dof, bool _addJoint=true, bool _warning=true)
 Add a DegreeOfFreedom to this Group. More...
 
bool addDofs (const std::vector< DegreeOfFreedom *> &_dofs, bool _addJoint=true, bool _warning=true)
 Add a set of DegreesOfFreedom to this Group. More...
 
bool removeDof (DegreeOfFreedom *_dof, bool _cleanupJoint=true, bool _warning=true)
 Remove a DegreeOfFreedom from this Group. More...
 
bool removeDofs (const std::vector< DegreeOfFreedom *> &_dofs, bool _cleanupJoint=true, bool _warning=true)
 Remove a set of DegreesOfFreedom from this Group. More...
 
- Public Member Functions inherited from dart::dynamics::ReferentialSkeleton
ReferentialSkeletonoperator= (const ReferentialSkeleton &_other)=delete
 Remove copy operator TODO(MXG): Consider allowing this.
 
virtual ~ReferentialSkeleton ()=default
 Default destructor.
 
std::unique_ptr< common::LockableReferencegetLockableReference () const override
 Returns mutex.
 
const std::string & setName (const std::string &_name) override
 Set the name of this MetaSkeleton.
 
const std::string & getName () const override
 Get the name of this MetaSkeleton.
 
std::size_t getNumSkeletons () const
 Returns number of skeletons associated with this ReferentialSkeleton.
 
bool hasSkeleton (const Skeleton *skel) const
 Returns whether this ReferentialSkeleton contains any BodyNode or Joint from skel. More...
 
std::size_t getNumBodyNodes () const override
 Get number of body nodes.
 
BodyNodegetBodyNode (std::size_t _idx) override
 Get BodyNode whose index is _idx.
 
const BodyNodegetBodyNode (std::size_t _idx) const override
 Get const BodyNode whose index is _idx.
 
BodyNodegetBodyNode (const std::string &name) override
 Returns the BodyNode of given name. More...
 
const BodyNodegetBodyNode (const std::string &name) const override
 Returns the BodyNode of given name. More...
 
const std::vector< BodyNode * > & getBodyNodes () override
 Get all the BodyNodes that are held by this MetaSkeleton.
 
const std::vector< const BodyNode * > & getBodyNodes () const override
 Get all the BodyNodes that are held by this MetaSkeleton.
 
std::vector< BodyNode * > getBodyNodes (const std::string &name) override
 Returns all the BodyNodes of given name. More...
 
std::vector< const BodyNode * > getBodyNodes (const std::string &name) const override
 Returns all the BodyNodes of given name. More...
 
bool hasBodyNode (const BodyNode *bodyNode) const override
 Returns whether this Skeleton contains bodyNode.
 
std::size_t getIndexOf (const BodyNode *_bn, bool _warning=true) const override
 Get the index of a specific BodyNode within this ReferentialSkeleton. More...
 
std::size_t getNumJoints () const override
 Get number of Joints.
 
JointgetJoint (std::size_t _idx) override
 Get Joint whose index is _idx.
 
const JointgetJoint (std::size_t _idx) const override
 Get const Joint whose index is _idx.
 
JointgetJoint (const std::string &name) override
 Returns the Joint of given name. More...
 
const JointgetJoint (const std::string &name) const override
 Returns the Joint of given name. More...
 
std::vector< Joint * > getJoints () override
 Returns all the joints that are held by this MetaSkeleton.
 
std::vector< const Joint * > getJoints () const override
 Returns all the joints that are held by this MetaSkeleton.
 
std::vector< Joint * > getJoints (const std::string &name) override
 Returns all the Joint of given name. More...
 
std::vector< const Joint * > getJoints (const std::string &name) const override
 Returns all the Joint of given name. More...
 
bool hasJoint (const Joint *joint) const override
 Returns whether this Skeleton contains join.
 
std::size_t getIndexOf (const Joint *_joint, bool _warning=true) const override
 Get the index of a specific Joint within this ReferentialSkeleton. More...
 
std::size_t getNumDofs () const override
 Return the number of degrees of freedom in this skeleton.
 
DegreeOfFreedomgetDof (std::size_t _idx) override
 Get degree of freedom (aka generalized coordinate) whose index is _idx.
 
const DegreeOfFreedomgetDof (std::size_t _idx) const override
 Get degree of freedom (aka generalized coordinate) whose index is _idx.
 
const std::vector< DegreeOfFreedom * > & getDofs () override
 Get the vector of DegreesOfFreedom for this MetaSkeleton.
 
std::vector< const DegreeOfFreedom * > getDofs () const override
 Get a vector of const DegreesOfFreedom for this MetaSkeleton.
 
std::size_t getIndexOf (const DegreeOfFreedom *_dof, bool _warning=true) const override
 Get the index of a specific DegreeOfFreedom within this ReferentialSkeleton. More...
 
math::Jacobian getJacobian (const JacobianNode *_node) const override
 Get the spatial Jacobian targeting the origin of a BodyNode. More...
 
math::Jacobian getJacobian (const JacobianNode *_node, const Frame *_inCoordinatesOf) const override
 Get the spatial Jacobian targeting the origin of a BodyNode. More...
 
math::Jacobian getJacobian (const JacobianNode *_node, const Eigen::Vector3d &_localOffset) const override
 Get the spatial Jacobian targeting an offset in a BodyNode. More...
 
math::Jacobian getJacobian (const JacobianNode *_node, const Eigen::Vector3d &_localOffset, const Frame *_inCoordinatesOf) const override
 Get the spatial Jacobian targeting an offset in a BodyNode. More...
 
math::Jacobian getWorldJacobian (const JacobianNode *_node) const override
 Get the spatial Jacobian targeting the origin of a BodyNode. More...
 
math::Jacobian getWorldJacobian (const JacobianNode *_node, const Eigen::Vector3d &_localOffset) const override
 Get the spatial Jacobian targeting an offset in a BodyNode. More...
 
math::LinearJacobian getLinearJacobian (const JacobianNode *_node, const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the linear Jacobian targeting the origin of a BodyNode. More...
 
math::LinearJacobian getLinearJacobian (const JacobianNode *_node, const Eigen::Vector3d &_localOffset, const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the linear Jacobian targeting an offset in a BodyNode. More...
 
math::AngularJacobian getAngularJacobian (const JacobianNode *_node, const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the angular Jacobian of a BodyNode. More...
 
math::Jacobian getJacobianSpatialDeriv (const JacobianNode *_node) const override
 Get the spatial Jacobian time derivative targeting the origin of a BodyNode. More...
 
math::Jacobian getJacobianSpatialDeriv (const JacobianNode *_node, const Frame *_inCoordinatesOf) const override
 Get the spatial Jacobian time derivative targeting the origin of a BodyNode. More...
 
math::Jacobian getJacobianSpatialDeriv (const JacobianNode *_node, const Eigen::Vector3d &_localOffset) const override
 Get the spatial Jacobian time derivative targeting an offset in a BodyNode. More...
 
math::Jacobian getJacobianSpatialDeriv (const JacobianNode *_node, const Eigen::Vector3d &_localOffset, const Frame *_inCoordinatesOf) const override
 Get the spatial Jacobian time derivative targeting an offset in a BodyNode. More...
 
math::Jacobian getJacobianClassicDeriv (const JacobianNode *_node) const override
 Get the spatial Jacobian (classical) time derivative targeting the origin of a BodyNode. More...
 
math::Jacobian getJacobianClassicDeriv (const JacobianNode *_node, const Frame *_inCoordinatesOf) const override
 Get the spatial Jacobian (classical) time derivative targeting the origin a BodyNode. More...
 
math::Jacobian getJacobianClassicDeriv (const JacobianNode *_node, const Eigen::Vector3d &_localOffset, const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the spatial Jacobian (classical) time derivative targeting an offset in a BodyNode. More...
 
math::LinearJacobian getLinearJacobianDeriv (const JacobianNode *_node, const Frame *_inCoordinatesOf=Frame::World()) const override
 of a BodyNode. More...
 
math::LinearJacobian getLinearJacobianDeriv (const JacobianNode *_node, const Eigen::Vector3d &_localOffset, const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the linear Jacobian (classical) time derivative targeting an offset in a BodyNode. More...
 
math::AngularJacobian getAngularJacobianDeriv (const JacobianNode *_node, const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the angular Jacobian time derivative of a BodyNode. More...
 
double getMass () const override
 Get the total mass of all BodyNodes in this ReferentialSkeleton. More...
 
const Eigen::MatrixXd & getMassMatrix () const override
 Get the Mass Matrix of the MetaSkeleton.
 
const Eigen::MatrixXd & getAugMassMatrix () const override
 Get augmented mass matrix of the skeleton. More...
 
const Eigen::MatrixXd & getInvMassMatrix () const override
 Get inverse of Mass Matrix of the MetaSkeleton.
 
const Eigen::MatrixXd & getInvAugMassMatrix () const override
 Get inverse of augmented Mass Matrix of the MetaSkeleton.
 
const Eigen::VectorXd & getCoriolisForces () const override
 Get Coriolis force vector of the MetaSkeleton's BodyNodes.
 
const Eigen::VectorXd & getGravityForces () const override
 Get gravity force vector of the MetaSkeleton.
 
const Eigen::VectorXd & getCoriolisAndGravityForces () const override
 Get combined vector of Coriolis force and gravity force of the MetaSkeleton. More...
 
const Eigen::VectorXd & getExternalForces () const override
 Get external force vector of the MetaSkeleton.
 
const Eigen::VectorXd & getConstraintForces () const override
 Get constraint force vector.
 
void clearExternalForces () override
 Clear the external forces of the BodyNodes in this MetaSkeleton.
 
void clearInternalForces () override
 Clear the internal forces of the BodyNodes in this MetaSkeleton.
 
double computeKineticEnergy () const override
 Get the kinetic energy of this MetaSkeleton.
 
double computePotentialEnergy () const override
 Get the potential energy of this MetaSkeleton.
 
void clearCollidingBodies () override
 Clear collision flags of the BodyNodes in this MetaSkeleton.
 
Eigen::Vector3d getCOM (const Frame *_withRespectTo=Frame::World()) const override
 Get the MetaSkeleton's COM with respect to any Frame (default is World Frame)
 
Eigen::Vector6d getCOMSpatialVelocity (const Frame *_relativeTo=Frame::World(), const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the Skeleton's COM spatial velocity in terms of any Frame (default is World Frame)
 
Eigen::Vector3d getCOMLinearVelocity (const Frame *_relativeTo=Frame::World(), const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the Skeleton's COM linear velocity in terms of any Frame (default is World Frame)
 
Eigen::Vector6d getCOMSpatialAcceleration (const Frame *_relativeTo=Frame::World(), const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the Skeleton's COM spatial acceleration in terms of any Frame (default is World Frame)
 
Eigen::Vector3d getCOMLinearAcceleration (const Frame *_relativeTo=Frame::World(), const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the MetaSkeleton's COM linear acceleration in terms of any Frame (default is World Frame)
 
math::Jacobian getCOMJacobian (const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the MetaSkeleton's COM Jacobian in terms of any Frame (default is World Frame)
 
math::LinearJacobian getCOMLinearJacobian (const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the MetaSkeleton's COM Linear Jacobian in terms of any Frame (default is World Frame)
 
math::Jacobian getCOMJacobianSpatialDeriv (const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the Skeleton's COM Jacobian spatial time derivative in terms of any Frame (default is World Frame). More...
 
math::LinearJacobian getCOMLinearJacobianDeriv (const Frame *_inCoordinatesOf=Frame::World()) const override
 Get the Skeleton's COM Linear Jacobian time derivative in terms of any Frame (default is World Frame). More...
 
- Public Member Functions inherited from dart::dynamics::MetaSkeleton
 MetaSkeleton (const MetaSkeleton &)=delete
 
virtual ~MetaSkeleton ()=default
 Default destructor.
 
MetaSkeletonPtr cloneMetaSkeleton () const
 Creates an identical clone of this MetaSkeleton.
 
void setCommand (std::size_t _index, double _command)
 Set a single command.
 
double getCommand (std::size_t _index) const
 Get a single command.
 
void setCommands (const Eigen::VectorXd &_commands)
 Set commands for all generalized coordinates.
 
void setCommands (const std::vector< std::size_t > &_indices, const Eigen::VectorXd &_commands)
 Set commands for a subset of the generalized coordinates.
 
Eigen::VectorXd getCommands () const
 Get commands for all generalized coordinates.
 
Eigen::VectorXd getCommands (const std::vector< std::size_t > &_indices) const
 Get commands for a subset of the generalized coordinates.
 
void resetCommands ()
 Set all commands to zero.
 
void setPosition (std::size_t index, double _position)
 Set the position of a single generalized coordinate.
 
double getPosition (std::size_t _index) const
 Get the position of a single generalized coordinate.
 
void setPositions (const Eigen::VectorXd &_positions)
 Set the positions for all generalized coordinates.
 
void setPositions (const std::vector< std::size_t > &_indices, const Eigen::VectorXd &_positions)
 Set the positions for a subset of the generalized coordinates.
 
Eigen::VectorXd getPositions () const
 Get the positions for all generalized coordinates.
 
Eigen::VectorXd getPositions (const std::vector< std::size_t > &_indices) const
 Get the positions for a subset of the generalized coordinates.
 
void resetPositions ()
 Set all positions to zero.
 
void setPositionLowerLimit (std::size_t _index, double _position)
 Set the lower limit of a generalized coordinate's position.
 
void setPositionLowerLimits (const Eigen::VectorXd &positions)
 Set the lower limits for all generalized coordinates.
 
void setPositionLowerLimits (const std::vector< std::size_t > &indices, const Eigen::VectorXd &positions)
 Set the lower limits for a subset of the generalized coordinates.
 
double getPositionLowerLimit (std::size_t _index) const
 Get the lower limit of a generalized coordinate's position.
 
Eigen::VectorXd getPositionLowerLimits () const
 Get the lower limits for all generalized coordinates.
 
Eigen::VectorXd getPositionLowerLimits (const std::vector< std::size_t > &indices) const
 Get the lower limits for a subset of the generalized coordinates.
 
void setPositionUpperLimit (std::size_t _index, double _position)
 Set the upper limit of a generalized coordainte's position.
 
void setPositionUpperLimits (const Eigen::VectorXd &positions)
 Set the upper limits for all generalized coordinates.
 
void setPositionUpperLimits (const std::vector< std::size_t > &indices, const Eigen::VectorXd &positions)
 Set the upper limits for a subset of the generalized coordinates.
 
double getPositionUpperLimit (std::size_t _index) const
 Get the upper limit of a generalized coordinate's position.
 
Eigen::VectorXd getPositionUpperLimits () const
 Get the upper limits for all generalized coordinates.
 
Eigen::VectorXd getPositionUpperLimits (const std::vector< std::size_t > &indices) const
 Get the upper limits for a subset of the generalized coordinates.
 
void setVelocity (std::size_t _index, double _velocity)
 Set the velocity of a single generalized coordinate.
 
double getVelocity (std::size_t _index) const
 Get the velocity of a single generalized coordinate.
 
void setVelocities (const Eigen::VectorXd &_velocities)
 Set the velocities of all generalized coordinates.
 
void setVelocities (const std::vector< std::size_t > &_indices, const Eigen::VectorXd &_velocities)
 Set the velocities of a subset of the generalized coordinates.
 
Eigen::VectorXd getVelocities () const
 Get the velocities for all generalized coordinates.
 
Eigen::VectorXd getVelocities (const std::vector< std::size_t > &_indices) const
 Get the velocities for a subset of the generalized coordinates.
 
void resetVelocities ()
 Set all velocities to zero.
 
void setVelocityLowerLimit (std::size_t _index, double _velocity)
 Set the lower limit of a generalized coordinate's velocity.
 
void setVelocityLowerLimits (const Eigen::VectorXd &velocities)
 Set the lower limits for all generalized coordinates's velocity.
 
void setVelocityLowerLimits (const std::vector< std::size_t > &indices, const Eigen::VectorXd &velocities)
 Set the lower limits for a subset of the generalized coordinates's velocity.
 
double getVelocityLowerLimit (std::size_t _index)
 Get the lower limit of a generalized coordinate's velocity.
 
Eigen::VectorXd getVelocityLowerLimits () const
 Get the lower limits for all generalized coordinates's velocity.
 
Eigen::VectorXd getVelocityLowerLimits (const std::vector< std::size_t > &indices) const
 Get the lower limits for a subset of the generalized coordinates's velocity.
 
void setVelocityUpperLimit (std::size_t _index, double _velocity)
 Set the upper limit of a generalized coordinate's velocity.
 
void setVelocityUpperLimits (const Eigen::VectorXd &velocities)
 Set the upper limits for all generalized coordinates's velocity.
 
void setVelocityUpperLimits (const std::vector< std::size_t > &indices, const Eigen::VectorXd &velocities)
 Set the upper limits for a subset of the generalized coordinates's velocity.
 
double getVelocityUpperLimit (std::size_t _index)
 Get the upper limit of a generalized coordinate's velocity.
 
Eigen::VectorXd getVelocityUpperLimits () const
 Get the upper limits for all generalized coordinates's velocity.
 
Eigen::VectorXd getVelocityUpperLimits (const std::vector< std::size_t > &indices) const
 Get the upper limits for a subset of the generalized coordinates's velocity.
 
void setAcceleration (std::size_t _index, double _acceleration)
 Set the acceleration of a single generalized coordinate.
 
double getAcceleration (std::size_t _index) const
 Get the acceleration of a single generalized coordinate.
 
void setAccelerations (const Eigen::VectorXd &_accelerations)
 Set the accelerations of all generalized coordinates.
 
void setAccelerations (const std::vector< std::size_t > &_indices, const Eigen::VectorXd &_accelerations)
 Set the accelerations of a subset of the generalized coordinates.
 
Eigen::VectorXd getAccelerations () const
 Get the accelerations for all generalized coordinates.
 
Eigen::VectorXd getAccelerations (const std::vector< std::size_t > &_indices) const
 Get the accelerations for a subset of the generalized coordinates.
 
void resetAccelerations ()
 Set all accelerations to zero.
 
void setAccelerationLowerLimit (std::size_t _index, double _acceleration)
 Set the lower limit of a generalized coordinate's acceleration.
 
void setAccelerationLowerLimits (const Eigen::VectorXd &accelerations)
 Set the lower limits for all generalized coordinates's acceleration.
 
void setAccelerationLowerLimits (const std::vector< std::size_t > &indices, const Eigen::VectorXd &accelerations)
 Set the lower limits for a subset of the generalized coordinates's acceleration.
 
double getAccelerationLowerLimit (std::size_t _index) const
 Get the lower limit of a generalized coordinate's acceleration.
 
Eigen::VectorXd getAccelerationLowerLimits () const
 Get the lower limits for all generalized coordinates's acceleration.
 
Eigen::VectorXd getAccelerationLowerLimits (const std::vector< std::size_t > &indices) const
 Get the lower limits for a subset of the generalized coordinates's acceleration.
 
void setAccelerationUpperLimit (std::size_t _index, double _acceleration)
 Set the upper limit of a generalized coordinate's acceleration.
 
void setAccelerationUpperLimits (const Eigen::VectorXd &accelerations)
 Set the upper limits for all generalized coordinates's acceleration.
 
void setAccelerationUpperLimits (const std::vector< std::size_t > &indices, const Eigen::VectorXd &accelerations)
 Set the upper limits for a subset of the generalized coordinates's acceleration.
 
double getAccelerationUpperLimit (std::size_t _index) const
 Get the upper limit of a generalized coordinate's acceleration.
 
Eigen::VectorXd getAccelerationUpperLimits () const
 Get the upper limits for all generalized coordinates's acceleration.
 
Eigen::VectorXd getAccelerationUpperLimits (const std::vector< std::size_t > &indices) const
 Get the upper limits for a subset of the generalized coordinates's acceleration.
 
void setForce (std::size_t _index, double _force)
 Set the force of a single generalized coordinate.
 
double getForce (std::size_t _index) const
 Get the force of a single generalized coordinate.
 
void setForces (const Eigen::VectorXd &_forces)
 Set the forces of all generalized coordinates.
 
void setForces (const std::vector< std::size_t > &_index, const Eigen::VectorXd &_forces)
 Set the forces of a subset of the generalized coordinates.
 
Eigen::VectorXd getForces () const
 Get the forces for all generalized coordinates.
 
Eigen::VectorXd getForces (const std::vector< std::size_t > &_indices) const
 Get the forces for a subset of the generalized coordinates.
 
void resetGeneralizedForces ()
 Set all forces of the generalized coordinates to zero.
 
void setForceLowerLimit (std::size_t _index, double _force)
 Set the lower limit of a generalized coordinate's force.
 
void setForceLowerLimits (const Eigen::VectorXd &forces)
 Set the lower limits for all generalized coordinates's force.
 
void setForceLowerLimits (const std::vector< std::size_t > &indices, const Eigen::VectorXd &forces)
 Set the lower limits for a subset of the generalized coordinates's force.
 
double getForceLowerLimit (std::size_t _index) const
 Get the lower limit of a generalized coordinate's force.
 
Eigen::VectorXd getForceLowerLimits () const
 Get the lower limits for all generalized coordinates's force.
 
Eigen::VectorXd getForceLowerLimits (const std::vector< std::size_t > &indices) const
 Get the lower limits for a subset of the generalized coordinates's force.
 
void setForceUpperLimit (std::size_t _index, double _force)
 Set the upper limit of a generalized coordinate's force.
 
void setForceUpperLimits (const Eigen::VectorXd &forces)
 Set the upperlimits for all generalized coordinates's force.
 
void setForceUpperLimits (const std::vector< std::size_t > &indices, const Eigen::VectorXd &forces)
 Set the upper limits for a subset of the generalized coordinates's force.
 
double getForceUpperLimit (std::size_t _index) const
 Get the upper limit of a generalized coordinate's force.
 
Eigen::VectorXd getForceUpperLimits () const
 Get the upper limits for all generalized coordinates's force.
 
Eigen::VectorXd getForceUpperLimits (const std::vector< std::size_t > &indices) const
 Get the upper limits for a subset of the generalized coordinates's force.
 
Eigen::VectorXd getVelocityChanges () const
 Get the velocity changes for all the generalized coordinates.
 
void setJointConstraintImpulses (const Eigen::VectorXd &_impulses)
 Set the constraint impulses for the generalized coordinates.
 
Eigen::VectorXd getJointConstraintImpulses () const
 Get the constraint impulses for the generalized coordinates.
 
math::Jacobian getJacobian (const JacobianNode *_node, const JacobianNode *_relativeTo, const Frame *_inCoordinatesOf) const
 Get the spatial Jacobian targeting the origin of a BodyNode relative to another BodyNode in the same Skeleton. More...
 
math::Jacobian getJacobian (const JacobianNode *_node, const Eigen::Vector3d &_localOffset, const JacobianNode *_relativeTo, const Frame *_inCoordinatesOf) const
 Get the spatial Jacobian targeting an offset in a BodyNode relative to another BodyNode in the same Skeleton. More...
 
math::LinearJacobian getLinearJacobian (const JacobianNode *_node, const JacobianNode *_relativeTo, const Frame *_inCoordinatesOf=Frame::World()) const
 Get the linear Jacobian targeting the origin of a BodyNode relative to another BodyNode in the same Skeleton. More...
 
math::LinearJacobian getLinearJacobian (const JacobianNode *_node, const Eigen::Vector3d &_localOffset, const JacobianNode *_relativeTo, const Frame *_inCoordinatesOf=Frame::World()) const
 Get the linear Jacobian targeting an offset in a BodyNode relative to another BodyNode in the same Skeleton. More...
 
math::AngularJacobian getAngularJacobian (const JacobianNode *_node, const JacobianNode *_relativeTo, const Frame *_inCoordinatesOf=Frame::World()) const
 Get the angular Jacobian of a BodyNode relative to another BodyNode in the same Skeleton. More...
 
math::Jacobian getJacobianSpatialDeriv (const JacobianNode *_node, const JacobianNode *_relativeTo, const Frame *_inCoordinatesOf) const
 Get the spatial Jacobian time derivative targeting the origin of a BodyNode relative to another BodyNode in the same Skeleton. More...
 
math::Jacobian getJacobianSpatialDeriv (const JacobianNode *_node, const Eigen::Vector3d &_localOffset, const JacobianNode *_relativeTo, const Frame *_inCoordinatesOf) const
 Get the spatial Jacobian time derivative targeting an offset in a BodyNode relative to another Bodynode in the same Skeleton. More...
 
double computeLagrangian () const
 Compute and return Lagrangian of this MetaSkeleton.
 
double getKineticEnergy () const
 Get the kinetic energy of this MetaSkeleton.
 
double getPotentialEnergy () const
 Get the potential energy of this MetaSkeleton.
 
- Public Member Functions inherited from dart::common::Subject
virtual ~Subject ()
 Destructor will notify all Observers that it is destructing.
 

Static Public Member Functions

static GroupPtr create (const std::string &_name="Group", const std::vector< BodyNode *> &_bodyNodes=std::vector< BodyNode *>(), bool _includeJoints=true, bool _includeDofs=true)
 Create a Group out of a set of BodyNodes. More...
 
static GroupPtr create (const std::string &_name, const std::vector< DegreeOfFreedom *> &_dofs, bool _includeBodyNodes=true, bool _includeJoints=true)
 Create a Group out of a set of DegreesOfFreedom. More...
 
static GroupPtr create (const std::string &_name, const MetaSkeletonPtr &_metaSkeleton)
 Create a Group that mimics the given MetaSkeleton.
 

Protected Member Functions

 Group (const std::string &_name, const std::vector< BodyNode *> &_bodyNodes, bool _includeJoints, bool _includeDofs)
 Default constructor.
 
 Group (const std::string &_name, const std::vector< DegreeOfFreedom *> &_dofs, bool _includeBodyNodes, bool _includeJoints)
 Alternative constructor.
 
 Group (const std::string &_name, const MetaSkeletonPtr &_metaSkeleton)
 MetaSkeleton-based constructor.
 
- Protected Member Functions inherited from dart::dynamics::ReferentialSkeleton
 ReferentialSkeleton ()=default
 Default constructor. More...
 
void registerComponent (BodyNode *_bn)
 Add a BodyNode, along with its parent Joint and parent DegreesOfFreedom to this ReferentialSkeleton. More...
 
void registerBodyNode (BodyNode *_bn)
 Add a BodyNode to this ReferentialSkeleton, ignoring its Joint and DegreesOfFreedom. More...
 
void registerJoint (Joint *_joint)
 Add a Joint to this Referential Skeleton, ignoring its DegreesOfFreedom. More...
 
void registerDegreeOfFreedom (DegreeOfFreedom *_dof)
 Add a DegreeOfFreedom to this ReferentialSkeleton. More...
 
void unregisterComponent (BodyNode *_bn)
 Completely remove a BodyNode and its parent DegreesOfFreedom from this ReferentialSkeleton. More...
 
void unregisterBodyNode (BodyNode *_bn, bool _unregisterDofs)
 Remove a BodyNode from this ReferentialSkeleton, ignoring its parent DegreesOfFreedom. More...
 
void unregisterJoint (BodyNode *_child)
 Remove a Joint from this ReferentialSkeleton. More...
 
void unregisterDegreeOfFreedom (BodyNode *_bn, std::size_t _localIndex)
 Remove a DegreeOfFreedom from this ReferentialSkeleton. More...
 
void updateCaches ()
 Update the caches to match any changes to the structure of this ReferentialSkeleton.
 
- Protected Member Functions inherited from dart::dynamics::MetaSkeleton
 MetaSkeleton ()
 Default constructor.
 
- Protected Member Functions inherited from dart::common::Subject
void sendDestructionNotification () const
 Send a destruction notification to all Observers. More...
 
void addObserver (Observer *_observer) const
 Add an Observer to the list of Observers.
 
void removeObserver (Observer *_observer) const
 Remove an Observer from the list of Observers.
 

Additional Inherited Members

- Public Types inherited from dart::dynamics::MetaSkeleton
using NameChangedSignal = common::Signal< void(std::shared_ptr< const MetaSkeleton > _skeleton, const std::string &_oldName, const std::string &_newName)>
 
- Public Attributes inherited from dart::dynamics::MetaSkeleton
common::SlotRegister< NameChangedSignalonNameChanged
 
- Protected Attributes inherited from dart::dynamics::ReferentialSkeleton
std::weak_ptr< MetaSkeletonmPtr
 Weak pointer to this Skeleton.
 
std::string mName
 Name of this ReferentialSkeleton.
 
std::unordered_set< const Skeleton * > mSkeletons
 Skeletons that this ReferentialSkeleton contains any BodyNode or Joint from the Skeletons. More...
 
std::set< std::mutex * > mSkeletonMutexes
 Mutexes of the skeletons. More...
 
std::vector< BodyNodePtr > mBodyNodes
 BodyNodes that this ReferentialSkeleton references. More...
 
std::vector< BodyNode * > mRawBodyNodes
 Raw BodyNode pointers. This vector is used for the MetaSkeleton API.
 
std::vector< const BodyNode * > mRawConstBodyNodes
 Raw const BodyNode pointers. This vector is used for the MetaSkeleton API.
 
std::vector< JointPtr > mJoints
 Joints that this ReferentialSkeleton references.
 
std::vector< DegreeOfFreedomPtr > mDofs
 DegreesOfFreedom that this ReferentialSkeleton references.
 
std::vector< DegreeOfFreedom * > mRawDofs
 Raw DegreeOfFreedom vector. This vector is used for the MetaSkeleton API.
 
std::vector< const DegreeOfFreedom * > mRawConstDofs
 Raw const DegreeOfFreedom vector. More...
 
std::unordered_map< const BodyNode *, IndexMapmIndexMap
 Raw const DegreeOfFreedom. This vector is used for the MetaSkeleton API. More...
 
Eigen::MatrixXd mM
 Cache for Mass Matrix.
 
Eigen::MatrixXd mAugM
 Cache for Augmented Mass Matrix.
 
Eigen::MatrixXd mInvM
 Cache for inverse Mass Matrix.
 
Eigen::MatrixXd mInvAugM
 Cache for inverse Augmented Mass Matrix.
 
Eigen::VectorXd mCvec
 Cache for Coriolis vector.
 
Eigen::VectorXd mG
 Cache for gravity vector.
 
Eigen::VectorXd mCg
 Cache for combined Coriolis and gravity vector.
 
Eigen::VectorXd mFext
 Cache for external force vector.
 
Eigen::VectorXd mFc
 Cache for constraint force vector.
 
- Protected Attributes inherited from dart::dynamics::MetaSkeleton
NameChangedSignal mNameChangedSignal
 
- Protected Attributes inherited from dart::common::Subject
std::set< Observer * > mObservers
 List of current Observers.
 

Member Function Documentation

◆ addBodyNode()

bool dart::dynamics::Group::addBodyNode ( BodyNode _bn,
bool  _warning = true 
)

Add a BodyNode to this Group.

If _warning is true, you will be warned when you attempt to add the same BodyNode twice, and an assertion will be thrown.

This function will return false if the BodyNode was already in the Group.

◆ addBodyNodes()

bool dart::dynamics::Group::addBodyNodes ( const std::vector< BodyNode *> &  _bodyNodes,
bool  _warning = true 
)

Add a set of BodyNodes to this Group.

If _warning is true, you will be warned when you attempt to add a BodyNode that is already in the Group, and an assertion will be thrown.

This function will return false if all of the BodyNodes were already in the Group.

◆ addComponent()

bool dart::dynamics::Group::addComponent ( BodyNode _bn,
bool  _warning = true 
)

Add a BodyNode and its parent DegreesOfFreedom to this Group.

If _warning is true, you will be warned when the BodyNode and all its DegreesOfFreedom were already in the Group, and an assertion will be thrown.

This function will return false if the BodyNode and all its DegreesOfFreedom were already in the Group.

◆ addComponents()

bool dart::dynamics::Group::addComponents ( const std::vector< BodyNode *> &  _bodyNodes,
bool  _warning = true 
)

Add set of BodyNodes and their parent DegreesOfFreedom to this Group.

If _warning is true, you will be warned when an entire component was already in the Group, and an assertion will be thrown.

This function will return false if all of the components in the set were already in this Group.

◆ addDof()

bool dart::dynamics::Group::addDof ( DegreeOfFreedom _dof,
bool  _addJoint = true,
bool  _warning = true 
)

Add a DegreeOfFreedom to this Group.

If _addJoint is true, the Joint of this DOF will also be added to the Group. If _warning is true, you will be warned when you attempt to add the same DegreeOfFreedom twice, and an assertion will be thrown.

This function will return false if the DegreeOfFreedom was already in the Group.

◆ addDofs()

bool dart::dynamics::Group::addDofs ( const std::vector< DegreeOfFreedom *> &  _dofs,
bool  _addJoint = true,
bool  _warning = true 
)

Add a set of DegreesOfFreedom to this Group.

If _addJoint is true, the Joint of each DOF will also be added to the Group. If _warning is true, you will be warned when you attempt to add the same DegreeOfFreedom twice, and an assertion will be thrown.

This function will return false if all of the DegreesOfFreedom was already in the Group.

◆ addJoint()

bool dart::dynamics::Group::addJoint ( Joint _joint,
bool  _addDofs = true,
bool  _warning = true 
)

Add a Joint to this Group.

If _addDofs is true, it will also add all the DegreesOfFreedom of the Joint. If _warning is true, you will be warned if the Joint (and all its DOFs if _addDofs is set to true) was already in the Group, and an assertion will be thrown.

This function will return false if the Joint (and all its DOFs, if _addDofs is true) was already in the Group.

◆ addJoints()

bool dart::dynamics::Group::addJoints ( const std::vector< Joint *> &  _joints,
bool  _addDofs = true,
bool  _warning = true 
)

Add a set of Joints to this Group.

If _addDofs is true, it will also add all the DOFs of each Joint. If _warning is true, you will be warned when you attempt to add a Joint that is already in the Group (and all its DOFs are in the Group, if _addDofs is set to true), and an assertion will be thrown.

This function will return false if all the Joints (and their DOFs if _addDofs is set to true) were already in the Group.

◆ create() [1/2]

GroupPtr dart::dynamics::Group::create ( const std::string &  _name = "Group",
const std::vector< BodyNode *> &  _bodyNodes = std::vector<BodyNode*>(),
bool  _includeJoints = true,
bool  _includeDofs = true 
)
static

Create a Group out of a set of BodyNodes.

If _includeJoints is true, the parent Joint of each BodyNode will also be added to the Group. If _includeDofs is true, then the parent DegreesOfFreedom of each BodyNode will also be added to the Group.

◆ create() [2/2]

GroupPtr dart::dynamics::Group::create ( const std::string &  _name,
const std::vector< DegreeOfFreedom *> &  _dofs,
bool  _includeBodyNodes = true,
bool  _includeJoints = true 
)
static

Create a Group out of a set of DegreesOfFreedom.

If _includeBodyNodes is true, then the child BodyNode of each DegreeOfFreedom will also be added to the Group. If _includeJoints is true, then the Joint of each DegreeOfFreedom will also be added to the Group.

◆ removeBodyNode()

bool dart::dynamics::Group::removeBodyNode ( BodyNode _bn,
bool  _warning = true 
)

Remove a BodyNode from this Group.

If _warning is true, you will be warned when you attempt to remove a BodyNode that is not in this Group, and an assertion will be thrown.

The function will return false if the BodyNode was not in this Group.

◆ removeBodyNodes()

bool dart::dynamics::Group::removeBodyNodes ( const std::vector< BodyNode *> &  _bodyNodes,
bool  _warning = true 
)

Remove a set of BodyNodes from this Group.

If _warning is true, you will be warned when you attempt to remove a BodyNode that is not in this Group, and an assertion will be thrown.

The function will return false if none of the BodyNodes were in this Group.

◆ removeComponent()

bool dart::dynamics::Group::removeComponent ( BodyNode _bn,
bool  _warning = true 
)

Remove a BodyNode and its parent DegreesOfFreedom from this Group.

If _warning is true, you will be warned if this Group does not have the BodyNode or any of its DegreesOfFreedom, and an assertion will be thrown.

This function will return false if the Group did not include the BodyNode or any of its parent DegreesOfFreedom.

◆ removeComponents()

bool dart::dynamics::Group::removeComponents ( const std::vector< BodyNode *> &  _bodyNodes,
bool  _warning = true 
)

Remove a set of BodyNodes and their parent DegreesOfFreedom from this Group.

If _warning is true, you will be warned if any of the components were completely missing from this Group, and an assertion will be thrown.

This function will return false if none of the components in this set were in the Group.

◆ removeDof()

bool dart::dynamics::Group::removeDof ( DegreeOfFreedom _dof,
bool  _cleanupJoint = true,
bool  _warning = true 
)

Remove a DegreeOfFreedom from this Group.

If _cleanupJoint is true, the Joint of this DOF will be removed, but only if no other DOFs belonging to the Joint are remaining in the Group. If _warning is true, you will be warned when you attempt to remove a DegreeOfFreedom that is not in this Group, and an assertion will be thrown.

This function will return false if the DegreeOfFreedom was not in this Group.

◆ removeDofs()

bool dart::dynamics::Group::removeDofs ( const std::vector< DegreeOfFreedom *> &  _dofs,
bool  _cleanupJoint = true,
bool  _warning = true 
)

Remove a set of DegreesOfFreedom from this Group.

If _cleanupJoint is true, the Joint of this DOF will be removed, but only if no other DOFs belonging to the Joint are remaining in the Group. If _warning is true, you will be warned when you attempt to remove a DegreeOfFreedom that is not in this Group, and an assertion will be thrown.

This function will return false if none of the DegreesOfFreedom were in this Group.

◆ removeJoint()

bool dart::dynamics::Group::removeJoint ( Joint _joint,
bool  _removeDofs = true,
bool  _warning = true 
)

Remove a Joint from this Group.

If _removeDofs is true, it will also remove any DOFs belonging to this Joint. If _warning is true, you will be warned if you attempt to remove a Joint which is not in this Group (and none of its DOFs are in the Group if _removeDofs is set to true), and an assertion will be thrown.

This function will return false if the Joint was not in the Group (and neither were any of its DOFs, if _removeDofs is set to true).

◆ removeJoints()

bool dart::dynamics::Group::removeJoints ( const std::vector< Joint *> &  _joints,
bool  _removeDofs = true,
bool  _warning = true 
)

Remove a set of Joints from this Group.

If _removeDofs is true, it will also remove any DOFs belonging to any of the Joints. If _warning is true, you will be warned if you attempt to remove a Joint which is not in this Group (and none of its DOFs are in the Group if _removeDofs is set to true), and an assertion will be thrown.

This function will return false if none of the Joints (nor any of their DOFs if _removeDofs is set to true) were in the Group.


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