DART
6.10.1
|
#include <PointMass.hpp>
Classes | |
struct | Properties |
Properties for each PointMass. More... | |
struct | State |
State for each PointMass. More... | |
Public Member Functions | |
virtual | ~PointMass () |
Default destructor. More... | |
State & | getState () |
State of this PointMass. More... | |
const State & | getState () const |
State of this PointMass. More... | |
std::size_t | getIndexInSoftBodyNode () const |
void | setMass (double _mass) |
double | getMass () const |
double | getPsi () const |
double | getImplicitPsi () const |
double | getPi () const |
double | getImplicitPi () const |
void | addConnectedPointMass (PointMass *_pointMass) |
std::size_t | getNumConnectedPointMasses () const |
PointMass * | getConnectedPointMass (std::size_t _idx) |
const PointMass * | getConnectedPointMass (std::size_t _idx) const |
void | setColliding (bool _isColliding) |
Set whether this point mass is colliding with other objects. More... | |
bool | isColliding () |
Return whether this point mass is set to be colliding with other objects. More... | |
std::size_t | getNumDofs () const |
void | setPosition (std::size_t _index, double _position) |
double | getPosition (std::size_t _index) const |
void | setPositions (const Eigen::Vector3d &_positions) |
const Eigen::Vector3d & | getPositions () const |
void | resetPositions () |
void | setVelocity (std::size_t _index, double _velocity) |
double | getVelocity (std::size_t _index) const |
void | setVelocities (const Eigen::Vector3d &_velocities) |
const Eigen::Vector3d & | getVelocities () const |
void | resetVelocities () |
void | setAcceleration (std::size_t _index, double _acceleration) |
double | getAcceleration (std::size_t _index) const |
void | setAccelerations (const Eigen::Vector3d &_accelerations) |
const Eigen::Vector3d & | getAccelerations () const |
const Eigen::Vector3d & | getPartialAccelerations () const |
Get the Eta term of this PointMass. More... | |
void | resetAccelerations () |
void | setForce (std::size_t _index, double _force) |
double | getForce (std::size_t _index) |
void | setForces (const Eigen::Vector3d &_forces) |
const Eigen::Vector3d & | getForces () const |
void | resetForces () |
void | setVelocityChange (std::size_t _index, double _velocityChange) |
double | getVelocityChange (std::size_t _index) |
void | resetVelocityChanges () |
void | setConstraintImpulse (std::size_t _index, double _impulse) |
double | getConstraintImpulse (std::size_t _index) |
void | resetConstraintImpulses () |
void | integratePositions (double _dt) |
void | integrateVelocities (double _dt) |
void | addExtForce (const Eigen::Vector3d &_force, bool _isForceLocal=false) |
Add linear Cartesian force to this node. More... | |
void | clearExtForce () |
void | setConstraintImpulse (const Eigen::Vector3d &_constImp, bool _isLocal=false) |
Set constraint impulse. More... | |
void | addConstraintImpulse (const Eigen::Vector3d &_constImp, bool _isLocal=false) |
Add constraint impulse. More... | |
void | clearConstraintImpulse () |
Clear constraint impulse. More... | |
Eigen::Vector3d | getConstraintImpulses () const |
Get constraint impulse. More... | |
void | setRestingPosition (const Eigen::Vector3d &_p) |
const Eigen::Vector3d & | getRestingPosition () const |
const Eigen::Vector3d & | getLocalPosition () const |
const Eigen::Vector3d & | getWorldPosition () const |
Eigen::Matrix< double, 3, Eigen::Dynamic > | getBodyJacobian () |
Eigen::Matrix< double, 3, Eigen::Dynamic > | getWorldJacobian () |
const Eigen::Vector3d & | getBodyVelocityChange () const |
Return velocity change due to impulse. More... | |
SoftBodyNode * | getParentSoftBodyNode () |
const SoftBodyNode * | getParentSoftBodyNode () const |
const Eigen::Vector3d & | getBodyVelocity () const |
The number of the generalized coordinates by which this node is affected. More... | |
Eigen::Vector3d | getWorldVelocity () const |
Get the generalized velocity at the position of this point mass where the velocity is expressed in the world frame. More... | |
const Eigen::Vector3d & | getBodyAcceleration () const |
Get the generalized acceleration at the position of this point mass where the acceleration is expressed in the parent soft body node frame. More... | |
Eigen::Vector3d | getWorldAcceleration () const |
Get the generalized acceleration at the position of this point mass where the acceleration is expressed in the world frame. More... | |
Protected Member Functions | |
PointMass (SoftBodyNode *_softBodyNode) | |
Constructor used by SoftBodyNode. More... | |
void | init () |
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... | |
Recursive dynamics routines | |
void | updateTransform () const |
Update transformation. More... | |
void | updateVelocity () const |
Update body velocity. More... | |
void | updatePartialAcceleration () const |
Update partial body acceleration due to parent joint's velocity. More... | |
void | updateArtInertiaFD (double _timeStep) const |
Update articulated body inertia. More... | |
void | updateBiasForceFD (double _dt, const Eigen::Vector3d &_gravity) |
Update bias force associated with the articulated body inertia. More... | |
void | updateBiasImpulseFD () |
Update bias impulse associated with the articulated body inertia. More... | |
void | updateAccelerationID () const |
Update body acceleration with the partial body acceleration. More... | |
void | updateAccelerationFD () |
Update body acceleration. Forward dynamics routine. More... | |
void | updateVelocityChangeFD () |
Update body velocity change. More... | |
void | updateTransmittedForceID (const Eigen::Vector3d &_gravity, bool _withExternalForces=false) |
Update body force. Inverse dynamics routine. More... | |
void | updateTransmittedForce () |
Update body force. Forward dynamics routine. More... | |
void | updateTransmittedImpulse () |
Update body force. Impulse-based forward dynamics routine. More... | |
void | updateJointForceID (double _timeStep, double _withDampingForces, double _withSpringForces) |
Update the joint force. Inverse dynamics routine. More... | |
void | updateConstrainedTermsFD (double _timeStep) |
Update constrained terms due to the constraint impulses. More... | |
Equations of motion related routines | |
void | updateMassMatrix () |
void | aggregateMassMatrix (Eigen::MatrixXd &_MCol, int _col) |
void | aggregateAugMassMatrix (Eigen::MatrixXd &_MCol, int _col, double _timeStep) |
void | updateInvMassMatrix () |
void | updateInvAugMassMatrix () |
void | aggregateInvMassMatrix (Eigen::MatrixXd &_MInvCol, int _col) |
void | aggregateInvAugMassMatrix (Eigen::MatrixXd &_MInvCol, int _col, double _timeStep) |
void | aggregateGravityForceVector (Eigen::VectorXd &_g, const Eigen::Vector3d &_gravity) |
void | updateCombinedVector () |
void | aggregateCombinedVector (Eigen::VectorXd &_Cg, const Eigen::Vector3d &_gravity) |
void | aggregateExternalForces (Eigen::VectorXd &_Fext) |
Aggregate the external forces mFext in the generalized coordinates recursively. More... | |
Protected Attributes | |
Eigen::Vector3d | mM_dV |
Eigen::Vector3d | mM_F |
Eigen::Vector3d | mBiasForceForInvMeta |
Eigen::Vector3d | mG_F |
Eigen::Vector3d | mCg_dV |
Eigen::Vector3d | mCg_F |
SoftBodyNode * | mParentSoftBodyNode |
SoftBodyNode that this PointMass belongs to. More... | |
std::size_t | mIndex |
Index of this PointMass within the SoftBodyNode. More... | |
Eigen::Vector3d | mPositionDeriv |
Derivatives w.r.t. an arbitrary scalr variable. More... | |
Eigen::Vector3d | mVelocitiesDeriv |
Derivatives w.r.t. an arbitrary scalr variable. More... | |
Eigen::Vector3d | mAccelerationsDeriv |
Derivatives w.r.t. an arbitrary scalr variable. More... | |
Eigen::Vector3d | mForcesDeriv |
Derivatives w.r.t. an arbitrary scalr variable. More... | |
Eigen::Vector3d | mVelocityChanges |
Change of generalized velocity. More... | |
Eigen::Vector3d | mConstraintImpulses |
Generalized constraint impulse. More... | |
Eigen::Vector3d | mW |
Current position viewed in world frame. More... | |
Eigen::Vector3d | mX |
Current position viewed in parent soft body node frame. More... | |
Eigen::Vector3d | mV |
Current velocity viewed in parent soft body node frame. More... | |
Eigen::Vector3d | mEta |
Partial Acceleration of this PointMass. More... | |
Eigen::Vector3d | mAlpha |
Eigen::Vector3d | mBeta |
Eigen::Vector3d | mA |
Current acceleration viewed in parent body node frame. More... | |
Eigen::Vector3d | mF |
double | mPsi |
double | mImplicitPsi |
double | mPi |
double | mImplicitPi |
Eigen::Vector3d | mB |
Bias force. More... | |
Eigen::Vector3d | mFext |
External force. More... | |
std::vector< std::size_t > | mDependentGenCoordIndices |
A increasingly sorted list of dependent dof indices. More... | |
bool | mIsColliding |
Whether the node is currently in collision with another node. More... | |
Eigen::Vector3d | mDelV |
Velocity change due to constraint impulse. More... | |
Eigen::Vector3d | mImpB |
Impulsive bias force due to external impulsive force exerted on bodies of the parent skeleton. More... | |
Eigen::Vector3d | mImpAlpha |
Cache data for mImpB. More... | |
Eigen::Vector3d | mImpBeta |
Cache data for mImpB. More... | |
Eigen::Vector3d | mImpF |
Generalized impulsive body force w.r.t. body frame. More... | |
PointMassNotifier * | mNotifier |
std::set< Observer * > | mObservers |
List of current Observers. More... | |
Friends | |
class | SoftBodyNode |
|
virtual |
Default destructor.
|
explicitprotected |
Constructor used by SoftBodyNode.
void dart::dynamics::PointMass::addConnectedPointMass | ( | PointMass * | _pointMass | ) |
void dart::dynamics::PointMass::addConstraintImpulse | ( | const Eigen::Vector3d & | _constImp, |
bool | _isLocal = false |
||
) |
Add constraint impulse.
void dart::dynamics::PointMass::addExtForce | ( | const Eigen::Vector3d & | _force, |
bool | _isForceLocal = false |
||
) |
Add linear Cartesian force to this node.
[in] | _force | External force. |
[in] | _isForceLocal | True if _force's reference frame is of the parent soft body node. False if _force's reference frame is of the world. |
|
protectedinherited |
Add an Observer to the list of Observers.
|
protected |
|
protected |
|
protected |
Aggregate the external forces mFext in the generalized coordinates recursively.
|
protected |
|
protected |
|
protected |
|
protected |
void dart::dynamics::PointMass::clearConstraintImpulse | ( | ) |
Clear constraint impulse.
void dart::dynamics::PointMass::clearExtForce | ( | ) |
double dart::dynamics::PointMass::getAcceleration | ( | std::size_t | _index | ) | const |
const Vector3d & dart::dynamics::PointMass::getAccelerations | ( | ) | const |
const Eigen::Vector3d & dart::dynamics::PointMass::getBodyAcceleration | ( | ) | const |
Get the generalized acceleration at the position of this point mass where the acceleration is expressed in the parent soft body node frame.
Eigen::Matrix< double, 3, Eigen::Dynamic > dart::dynamics::PointMass::getBodyJacobian | ( | ) |
const Eigen::Vector3d & dart::dynamics::PointMass::getBodyVelocity | ( | ) | const |
The number of the generalized coordinates by which this node is affected.
Return a generalized coordinate index from the array index (< getNumDependentDofs). Get the generalized velocity at the position of this point mass where the velocity is expressed in the parent soft body node frame.
const Eigen::Vector3d & dart::dynamics::PointMass::getBodyVelocityChange | ( | ) | const |
Return velocity change due to impulse.
PointMass * dart::dynamics::PointMass::getConnectedPointMass | ( | std::size_t | _idx | ) |
const PointMass * dart::dynamics::PointMass::getConnectedPointMass | ( | std::size_t | _idx | ) | const |
double dart::dynamics::PointMass::getConstraintImpulse | ( | std::size_t | _index | ) |
Eigen::Vector3d dart::dynamics::PointMass::getConstraintImpulses | ( | ) | const |
Get constraint impulse.
double dart::dynamics::PointMass::getForce | ( | std::size_t | _index | ) |
const Vector3d & dart::dynamics::PointMass::getForces | ( | ) | const |
double dart::dynamics::PointMass::getImplicitPi | ( | ) | const |
double dart::dynamics::PointMass::getImplicitPsi | ( | ) | const |
std::size_t dart::dynamics::PointMass::getIndexInSoftBodyNode | ( | ) | const |
const Eigen::Vector3d & dart::dynamics::PointMass::getLocalPosition | ( | ) | const |
double dart::dynamics::PointMass::getMass | ( | ) | const |
std::size_t dart::dynamics::PointMass::getNumConnectedPointMasses | ( | ) | const |
std::size_t dart::dynamics::PointMass::getNumDofs | ( | ) | const |
SoftBodyNode * dart::dynamics::PointMass::getParentSoftBodyNode | ( | ) |
const SoftBodyNode * dart::dynamics::PointMass::getParentSoftBodyNode | ( | ) | const |
const Vector3d & dart::dynamics::PointMass::getPartialAccelerations | ( | ) | const |
Get the Eta term of this PointMass.
double dart::dynamics::PointMass::getPi | ( | ) | const |
double dart::dynamics::PointMass::getPosition | ( | std::size_t | _index | ) | const |
const Vector3d & dart::dynamics::PointMass::getPositions | ( | ) | const |
double dart::dynamics::PointMass::getPsi | ( | ) | const |
const Eigen::Vector3d & dart::dynamics::PointMass::getRestingPosition | ( | ) | const |
PointMass::State & dart::dynamics::PointMass::getState | ( | ) |
const PointMass::State & dart::dynamics::PointMass::getState | ( | ) | const |
const Vector3d & dart::dynamics::PointMass::getVelocities | ( | ) | const |
double dart::dynamics::PointMass::getVelocity | ( | std::size_t | _index | ) | const |
double dart::dynamics::PointMass::getVelocityChange | ( | std::size_t | _index | ) |
Eigen::Vector3d dart::dynamics::PointMass::getWorldAcceleration | ( | ) | const |
Get the generalized acceleration at the position of this point mass where the acceleration is expressed in the world frame.
Eigen::Matrix< double, 3, Eigen::Dynamic > dart::dynamics::PointMass::getWorldJacobian | ( | ) |
const Eigen::Vector3d & dart::dynamics::PointMass::getWorldPosition | ( | ) | const |
Eigen::Vector3d dart::dynamics::PointMass::getWorldVelocity | ( | ) | const |
Get the generalized velocity at the position of this point mass where the velocity is expressed in the world frame.
|
protected |
void dart::dynamics::PointMass::integratePositions | ( | double | _dt | ) |
void dart::dynamics::PointMass::integrateVelocities | ( | double | _dt | ) |
bool dart::dynamics::PointMass::isColliding | ( | ) |
Return whether this point mass is set to be colliding with other objects.
|
protectedinherited |
Remove an Observer from the list of Observers.
void dart::dynamics::PointMass::resetAccelerations | ( | ) |
void dart::dynamics::PointMass::resetConstraintImpulses | ( | ) |
void dart::dynamics::PointMass::resetForces | ( | ) |
void dart::dynamics::PointMass::resetPositions | ( | ) |
void dart::dynamics::PointMass::resetVelocities | ( | ) |
void dart::dynamics::PointMass::resetVelocityChanges | ( | ) |
|
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.
void dart::dynamics::PointMass::setAcceleration | ( | std::size_t | _index, |
double | _acceleration | ||
) |
void dart::dynamics::PointMass::setAccelerations | ( | const Eigen::Vector3d & | _accelerations | ) |
void dart::dynamics::PointMass::setColliding | ( | bool | _isColliding | ) |
Set whether this point mass is colliding with other objects.
Note that this status is set by the constraint solver during dynamics simulation but not by collision detector.
[in] | _isColliding | True if this point mass is colliding. |
void dart::dynamics::PointMass::setConstraintImpulse | ( | const Eigen::Vector3d & | _constImp, |
bool | _isLocal = false |
||
) |
Set constraint impulse.
void dart::dynamics::PointMass::setConstraintImpulse | ( | std::size_t | _index, |
double | _impulse | ||
) |
void dart::dynamics::PointMass::setForce | ( | std::size_t | _index, |
double | _force | ||
) |
void dart::dynamics::PointMass::setForces | ( | const Eigen::Vector3d & | _forces | ) |
void dart::dynamics::PointMass::setMass | ( | double | _mass | ) |
void dart::dynamics::PointMass::setPosition | ( | std::size_t | _index, |
double | _position | ||
) |
void dart::dynamics::PointMass::setPositions | ( | const Eigen::Vector3d & | _positions | ) |
void dart::dynamics::PointMass::setRestingPosition | ( | const Eigen::Vector3d & | _p | ) |
void dart::dynamics::PointMass::setVelocities | ( | const Eigen::Vector3d & | _velocities | ) |
void dart::dynamics::PointMass::setVelocity | ( | std::size_t | _index, |
double | _velocity | ||
) |
void dart::dynamics::PointMass::setVelocityChange | ( | std::size_t | _index, |
double | _velocityChange | ||
) |
|
protected |
Update body acceleration. Forward dynamics routine.
|
protected |
Update body acceleration with the partial body acceleration.
|
protected |
Update articulated body inertia.
Forward dynamics routine.
[in] | _timeStep | Rquired for implicit joint stiffness and damping. |
|
protected |
Update bias force associated with the articulated body inertia.
Forward dynamics routine.
[in] | _dt | Required for implicit joint stiffness and damping. |
[in] | _gravity | Vector of gravitational acceleration |
|
protected |
Update bias impulse associated with the articulated body inertia.
Impulse-based forward dynamics routine.
|
protected |
|
protected |
Update constrained terms due to the constraint impulses.
Foward dynamics routine.
|
protected |
|
protected |
|
protected |
Update the joint force. Inverse dynamics routine.
|
protected |
|
protected |
Update partial body acceleration due to parent joint's velocity.
|
protected |
Update transformation.
|
protected |
Update body force. Forward dynamics routine.
|
protected |
Update body force. Inverse dynamics routine.
|
protected |
Update body force. Impulse-based forward dynamics routine.
|
protected |
Update body velocity.
|
protected |
Update body velocity change.
Impluse-based forward dynamics routine.
|
friend |
|
mutableprotected |
Current acceleration viewed in parent body node frame.
|
protected |
Derivatives w.r.t. an arbitrary scalr variable.
|
protected |
|
protected |
Bias force.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Generalized constraint impulse.
|
protected |
Velocity change due to constraint impulse.
|
protected |
A increasingly sorted list of dependent dof indices.
|
mutableprotected |
Partial Acceleration of this PointMass.
|
protected |
|
protected |
External force.
|
protected |
Derivatives w.r.t. an arbitrary scalr variable.
|
protected |
|
protected |
Cache data for mImpB.
|
protected |
Impulsive bias force due to external impulsive force exerted on bodies of the parent skeleton.
|
protected |
Cache data for mImpB.
|
protected |
Generalized impulsive body force w.r.t. body frame.
|
mutableprotected |
|
mutableprotected |
|
protected |
Index of this PointMass within the SoftBodyNode.
|
protected |
Whether the node is currently in collision with another node.
|
protected |
|
protected |
|
protected |
|
mutableprotectedinherited |
List of current Observers.
|
protected |
SoftBodyNode that this PointMass belongs to.
|
mutableprotected |
|
protected |
Derivatives w.r.t. an arbitrary scalr variable.
|
mutableprotected |
|
mutableprotected |
Current velocity viewed in parent soft body node frame.
|
protected |
Derivatives w.r.t. an arbitrary scalr variable.
|
protected |
Change of generalized velocity.
|
mutableprotected |
Current position viewed in world frame.
|
mutableprotected |
Current position viewed in parent soft body node frame.