|
Biorbd Release_1.13.0
|
Class Geometry of the muscle. More...
#include <Geometry.h>
Public Member Functions | |
| Geometry () | |
| Construct geometry. | |
| Geometry (const utils::Vector3d &origin, const utils::Vector3d &insertion) | |
| Construct geometry. | |
| Geometry | DeepCopy () const |
| Deep copy of a geometry. | |
| void | DeepCopy (const Geometry &other) |
| Deep copy of a geometry from another geometry. | |
| void | updateKinematics (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates *Q=nullptr, const rigidbody::GeneralizedVelocity *Qdot=nullptr) |
| Updates the position and dynamic elements of the muscles. | |
| void | updateKinematics (rigidbody::Joints &updatedModel, internal_forces::PathModifiers &pathModifiers, const rigidbody::GeneralizedCoordinates *Q=nullptr, const rigidbody::GeneralizedVelocity *Qdot=nullptr) |
| Updates the position and dynamic elements of the muscles. | |
| void | updateKinematics (std::vector< utils::Vector3d > &musclePointsInGlobal, utils::Matrix &jacoPointsInGlobal, const rigidbody::GeneralizedVelocity *Qdot=nullptr) |
| Updates the position and dynamic elements of the muscles by hand. | |
| void | setOrigin (const utils::Vector3d &position) |
| Set the origin position in the local reference frame of the muscle. | |
| const utils::Vector3d & | originInLocal () const |
| Return the origin position. | |
| void | setInsertionInLocal (const utils::Vector3d &position) |
| Set the insertion position. | |
| const utils::Vector3d & | insertionInLocal () const |
| Return the insertion position. | |
| const utils::Vector3d & | originInGlobal () const |
| Return the origin position in the global reference. | |
| const utils::Vector3d & | insertionInGlobal () const |
| Return the insertion position in the global reference. | |
| const std::vector< utils::Vector3d > & | pointsInGlobal () const |
| Return the muscles points in the global reference. | |
| const utils::Scalar & | length () const |
| Return the previously computed muscle length. | |
| const utils::Scalar & | velocity () const |
| Return the previously computed velocity. | |
| const utils::Matrix & | jacobian () const |
| Return the previously computed muscle jacobian. | |
| utils::Matrix | jacobianOrigin () const |
| Return the gradient of the jacobian for the origin node. | |
| utils::Matrix | jacobianInsertion () const |
| Return the gradient of the jacobian for the insertion node. | |
| utils::Matrix | jacobian (size_t idxViaPoint) const |
| Return the gradient of the jacobian for the via specified node. | |
| const utils::Matrix & | jacobianLength () const |
| Return the jacobian length of the muscle. | |
Protected Member Functions | |
| void | _updateKinematics (const rigidbody::GeneralizedVelocity *Qdot, internal_forces::PathModifiers *pathModifiers=nullptr) |
| Actual function that implements the update of the kinematics. | |
| const utils::Vector3d & | originInGlobal (rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q) |
| Updates the kinematics and return the position of the origin node. | |
| const utils::Vector3d & | insertionInGlobal (rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q) |
| Updates the kinematics and return the position of the insertion node. | |
| void | setPointsInGlobal (std::vector< utils::Vector3d > &ptsInGlobal) |
| Set the muscle points in global. | |
| void | setPointsInGlobal (rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q, internal_forces::PathModifiers *pathModifiers=nullptr) |
| Set the muscle points in global. | |
| const utils::Scalar & | length (internal_forces::PathModifiers *pathModifiers=nullptr) |
| Update the kinematics, compute and return the muscle length. | |
| const utils::Scalar & | velocity (const rigidbody::GeneralizedVelocity &Qdot) |
| Update the kinematics, compute and return the muscle velocity assuming not via points nor wrapping objects. | |
| void | setJacobianDimension (rigidbody::Joints &model) |
| Set the jacobian dimensions. | |
| void | jacobian (const utils::Matrix &jaco) |
| Force a jacobian computed from the user. | |
| void | jacobian (rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q) |
| Compute the jacobian. | |
| void | computeJacobianLength () |
| Compute the muscle length jacobian. | |
Protected Attributes | |
| std::shared_ptr< utils::Vector3d > | m_origin |
| Origin node. | |
| std::shared_ptr< utils::Vector3d > | m_insertion |
| Insertion node. | |
| std::shared_ptr< utils::Vector3d > | m_originInGlobal |
| Position of the origin in the global reference. | |
| std::shared_ptr< utils::Vector3d > | m_insertionInGlobal |
| std::shared_ptr< std::vector< utils::Vector3d > > | m_pointsInGlobal |
| Position of all the points in the global reference. | |
| std::shared_ptr< std::vector< utils::Vector3d > > | m_pointsInLocal |
| Position of all the points in local. | |
| std::shared_ptr< utils::Matrix > | m_jacobian |
| The jacobian matrix. | |
| std::shared_ptr< utils::Matrix > | m_jacobianLength |
| The muscle length jacobian. | |
| std::shared_ptr< utils::Scalar > | m_length |
| length | |
| std::shared_ptr< utils::Scalar > | m_velocity |
| Velocity of the muscular elongation. | |
| std::shared_ptr< bool > | m_isGeometryComputed |
| std::shared_ptr< bool > | m_isVelocityComputed |
| std::shared_ptr< bool > | m_posAndJacoWereForced |
Class Geometry of the muscle.
Definition at line 31 of file Geometry.h.
| internal_forces::Geometry::Geometry | ( | ) |
Construct geometry.
Definition at line 22 of file Geometry.cpp.
| internal_forces::Geometry::Geometry | ( | const utils::Vector3d & | origin, |
| const utils::Vector3d & | insertion ) |
Construct geometry.
| origin | The origin node of the muscle |
| insertion | The insertion node of the muscle |
Definition at line 39 of file Geometry.cpp.
|
protected |
Actual function that implements the update of the kinematics.
| Qdot | The generalized velocities |
| pathModifiers | The set of path modifiers |
Definition at line 236 of file Geometry.cpp.
|
protected |
Compute the muscle length jacobian.
Definition at line 444 of file Geometry.cpp.
| internal_forces::Geometry internal_forces::Geometry::DeepCopy | ( | ) | const |
Deep copy of a geometry.
Definition at line 58 of file Geometry.cpp.
| void internal_forces::Geometry::DeepCopy | ( | const Geometry & | other | ) |
Deep copy of a geometry from another geometry.
| other | The geometry to copy |
Definition at line 64 of file Geometry.cpp.
| const utils::Vector3d & internal_forces::Geometry::insertionInGlobal | ( | ) | const |
Return the insertion position in the global reference.
Geometry (updateKin) must be computed at least once before calling
Definition at line 169 of file Geometry.cpp.
|
protected |
Updates the kinematics and return the position of the insertion node.
| model | The joint model |
| Q | The generalized coordinates of the model |
Definition at line 262 of file Geometry.cpp.
| const utils::Vector3d & internal_forces::Geometry::insertionInLocal | ( | ) | const |
Return the insertion position.
Definition at line 158 of file Geometry.cpp.
| const utils::Matrix & internal_forces::Geometry::jacobian | ( | ) | const |
Return the previously computed muscle jacobian.
Definition at line 201 of file Geometry.cpp.
|
protected |
Force a jacobian computed from the user.
| jaco | The jacobian |
Definition at line 421 of file Geometry.cpp.
|
protected |
Compute the jacobian.
| model | The joint model |
| Q | The generalize coordinates |
Definition at line 428 of file Geometry.cpp.
| utils::Matrix internal_forces::Geometry::jacobian | ( | size_t | idxViaPoint | ) | const |
Return the gradient of the jacobian for the via specified node.
| idxViaPoint | the index of the via point (0 being the the origin) |
Definition at line 219 of file Geometry.cpp.
| utils::Matrix internal_forces::Geometry::jacobianInsertion | ( | ) | const |
Return the gradient of the jacobian for the insertion node.
Definition at line 213 of file Geometry.cpp.
| const utils::Matrix & internal_forces::Geometry::jacobianLength | ( | ) | const |
Return the jacobian length of the muscle.
Definition at line 227 of file Geometry.cpp.
| utils::Matrix internal_forces::Geometry::jacobianOrigin | ( | ) | const |
Return the gradient of the jacobian for the origin node.
Definition at line 207 of file Geometry.cpp.
| const utils::Scalar & internal_forces::Geometry::length | ( | ) | const |
Return the previously computed muscle length.
Definition at line 186 of file Geometry.cpp.
|
protected |
Update the kinematics, compute and return the muscle length.
| pathModifiers | The set of path modifiers |
Definition at line 372 of file Geometry.cpp.
| const utils::Vector3d & internal_forces::Geometry::originInGlobal | ( | ) | const |
Return the origin position in the global reference.
Geometry (updateKin) must be computed at least once before calling originInLocal()
Definition at line 163 of file Geometry.cpp.
|
protected |
Updates the kinematics and return the position of the origin node.
| model | The joint model |
| Q | The generalized coordinates of the model |
Definition at line 253 of file Geometry.cpp.
| const utils::Vector3d & internal_forces::Geometry::originInLocal | ( | ) | const |
| const std::vector< utils::Vector3d > & internal_forces::Geometry::pointsInGlobal | ( | ) | const |
Return the muscles points in the global reference.
Geometry (updateKin) must be computed at least once before calling. Return already computed via points
Definition at line 176 of file Geometry.cpp.
| void internal_forces::Geometry::setInsertionInLocal | ( | const utils::Vector3d & | position | ) |
Set the insertion position.
| position | The insertion position value to set |
Definition at line 149 of file Geometry.cpp.
|
protected |
Set the jacobian dimensions.
| model | The joint model |
Definition at line 416 of file Geometry.cpp.
| void internal_forces::Geometry::setOrigin | ( | const utils::Vector3d & | position | ) |
Set the origin position in the local reference frame of the muscle.
| position | The origin position to set |
Definition at line 137 of file Geometry.cpp.
|
protected |
Set the muscle points in global.
| model | The joint model |
| Q | The generalized coordinates of the model |
| pathModifiers | The set of path modifiers |
Definition at line 282 of file Geometry.cpp.
|
protected |
Set the muscle points in global.
| ptsInGlobal | The new muscle points in global |
Definition at line 271 of file Geometry.cpp.
| void internal_forces::Geometry::updateKinematics | ( | rigidbody::Joints & | updatedModel, |
| const rigidbody::GeneralizedCoordinates * | Q = nullptr, | ||
| const rigidbody::GeneralizedVelocity * | Qdot = nullptr ) |
Updates the position and dynamic elements of the muscles.
| updatedModel | The joint model updated to the proper kinematics level |
| Q | The generalized coordinates of the joints (not needed if updateKin is less than 2) |
| Qdot | The generalized velocities of the joints (not needed if updateKin is less than 2) |
updateKinematics MUST be called before retreiving data that are dependent on Q and/or Qdot
WARNING If one used updateKinematics providing the jacobian, using updateKinematics overrides this previously sent position and jacobian
Definition at line 88 of file Geometry.cpp.
| void internal_forces::Geometry::updateKinematics | ( | rigidbody::Joints & | updatedModel, |
| internal_forces::PathModifiers & | pathModifiers, | ||
| const rigidbody::GeneralizedCoordinates * | Q = nullptr, | ||
| const rigidbody::GeneralizedVelocity * | Qdot = nullptr ) |
Updates the position and dynamic elements of the muscles.
| updatedModel | The joint model updated to the proper kinematics level |
| pathModifiers | The path modifiers |
| Q | The generalized coordinates of the joints (not needed if updateKin is less than 2) |
| Qdot | The generalized velocities of the joints (not needed if updateKin is less than 2) |
updateKinematics MUST be called before retreiving data that are dependent on Q and/or Qdot
WARNING If one used updateKinematics providing the jacobian, using updateKinematics overrides this previously sent position and jacobian
Definition at line 104 of file Geometry.cpp.
| void internal_forces::Geometry::updateKinematics | ( | std::vector< utils::Vector3d > & | musclePointsInGlobal, |
| utils::Matrix & | jacoPointsInGlobal, | ||
| const rigidbody::GeneralizedVelocity * | Qdot = nullptr ) |
Updates the position and dynamic elements of the muscles by hand.
| musclePointsInGlobal | Position of all the points in global |
| jacoPointsInGlobal | Position of all the Jacobian points in global |
| Qdot | The generalized velocities of the joints |
updateKinematics MUST be called before retreiving data that are dependent on Q and/or Qdot
Definition at line 120 of file Geometry.cpp.
| const utils::Scalar & internal_forces::Geometry::velocity | ( | ) | const |
Return the previously computed velocity.
Definition at line 193 of file Geometry.cpp.
|
protected |
Update the kinematics, compute and return the muscle velocity assuming not via points nor wrapping objects.
| Qdot | The generalized velocities |
Definition at line 409 of file Geometry.cpp.
|
protected |
Insertion node.
Definition at line 297 of file Geometry.h.
|
protected |
Position of the insertion node in the global reference
Definition at line 302 of file Geometry.h.
|
protected |
To know if the geometry was computed at least once
Definition at line 316 of file Geometry.h.
|
protected |
To know if the velocity was computed in the last update
Definition at line 318 of file Geometry.h.
|
protected |
The jacobian matrix.
Definition at line 308 of file Geometry.h.
|
protected |
The muscle length jacobian.
Definition at line 310 of file Geometry.h.
|
protected |
length
Definition at line 312 of file Geometry.h.
|
protected |
Origin node.
Definition at line 296 of file Geometry.h.
|
protected |
Position of the origin in the global reference.
Definition at line 300 of file Geometry.h.
|
protected |
Position of all the points in the global reference.
Definition at line 305 of file Geometry.h.
|
protected |
Position of all the points in local.
Definition at line 307 of file Geometry.h.
|
protected |
To know if the override was used on the muscle position and the Jacobian
Definition at line 321 of file Geometry.h.
|
protected |
Velocity of the muscular elongation.
Definition at line 314 of file Geometry.h.