|
Biorbd Release_1.13.0
|
Base class of all muscle. More...
#include <Muscle.h>
Public Member Functions | |
| Muscle () | |
| Construct a muscle. | |
| Muscle (const utils::String &name, const internal_forces::muscles::MuscleGeometry &position, const Characteristics &characteristics) | |
| Construct a muscle. | |
| Muscle (const utils::String &name, const internal_forces::muscles::MuscleGeometry &position, const Characteristics &characteristics, const State &emg) | |
| Construct a muscle. | |
| Muscle (const utils::String &name, const internal_forces::muscles::MuscleGeometry &position, const Characteristics &characteristics, const internal_forces::PathModifiers &pathModifiers) | |
| Construct a muscle. | |
| Muscle (const utils::String &name, const internal_forces::muscles::MuscleGeometry &position, const Characteristics &characteristics, const internal_forces::PathModifiers &pathModifiers, const State &emg) | |
| Construct a muscle. | |
| Muscle (const Muscle &other) | |
| Construct a muscle from another muscle. | |
| Muscle (const std::shared_ptr< Muscle > other) | |
| Construct a muscle from another muscle. | |
| virtual | ~Muscle () |
| Destroy class properly. | |
| void | DeepCopy (const Muscle &other) |
| Deep copy of a muscle in new muscle. | |
| const utils::Scalar & | length (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, bool updateMuscleParameters=true) |
| Get the length of the muscle. | |
| const utils::Scalar & | musculoTendonLength (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, bool updateMuscleParameters=true) |
| Return the musculo tendon length. | |
| const utils::Scalar & | velocity (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, bool updateMuscleParameters=true) |
| Return the velocity of the muscle. | |
| void | updateOrientations (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q) |
| Update the position of the origin and insertion positions of the muscle. | |
| void | updateOrientations (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot) |
| Update the position of the origin and insertion nodes of the muscle. | |
| void | updateOrientations (std::vector< utils::Vector3d > &musclePointsInGlobal, utils::Matrix &jacoPointsInGlobal) |
| Update by hand the position of the origin and insertion nodes of the muscle. | |
| void | updateOrientations (std::vector< utils::Vector3d > &musclePointsInGlobal, utils::Matrix &jacoPointsInGlobal, const rigidbody::GeneralizedVelocity &Qdot) |
| Update by hand the position of the origin and insertion nodes of the muscle. | |
| void | setPosition (const internal_forces::muscles::MuscleGeometry &positions) |
| Set the position of all the points attached to the muscle (0 being the origin). | |
| const internal_forces::muscles::MuscleGeometry & | position () const |
| Return the position of all the points attached to the muscle (0 being the origin). | |
| void | setCharacteristics (const Characteristics &characteristics) |
| Set the muscle characteristics. | |
| Characteristics & | characteristics () const |
| Return the muscle characteristics. | |
| const std::vector< utils::Vector3d > & | musclesPointsInGlobal (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, bool updateMuscleParameters=true) |
| Return the muscle points in global reference frame. | |
| const std::vector< utils::Vector3d > & | musclesPointsInGlobal () const |
| Return the previously computed muscle points in global reference frame. | |
| void | setForceIsoMax (const utils::Scalar &forceMax) |
| Set the maximal isometric force. | |
| void | setState (const State &emg) |
| Set the dynamic state. | |
| const State & | state () const |
| Return the dynamic state. | |
| State & | state () |
| Return the dynamic state. | |
| const utils::Scalar & | activationDot (const State &state, bool alreadyNormalized=false) const |
| Return the activation time derivative. | |
| virtual const utils::Scalar & | force (const State &emg)=0 |
| Computes and returns the forces norm from the EMG. | |
| virtual const utils::Scalar & | force (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, const State &emg, bool updateMuscleParameters=true)=0 |
| Return the computed force norm from EMG. | |
| virtual const utils::Scalar & | force (rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates &Q, const State &emg, bool updateMuscleParameters=true)=0 |
| Return the computed force norm from EMG. | |
| MUSCLE_TYPE | type () const |
| Return the type of the muscle. | |
| Public Member Functions inherited from BIORBD_NAMESPACE::internal_forces::Compound | |
| Compound () | |
| Construct muscle compound. | |
| Compound (const utils::String &name) | |
| Construct compound. | |
| Compound (const utils::String &name, const internal_forces::PathModifiers &pathModifiers) | |
| Construct compound. | |
| Compound (const Compound &other) | |
| Construct compound from another muscle. | |
| Compound (const std::shared_ptr< Compound > other) | |
| Construct compound from another compound. | |
| virtual | ~Compound () |
| Destroy class properly. | |
| void | DeepCopy (const Compound &other) |
| Deep copy of a compound. | |
| void | setName (const utils::String &name) |
| Set the name of a muscle. | |
| const utils::String & | name () const |
| Return the name of the muscle. | |
| const internal_forces::PathModifiers & | pathModifier () |
| Return the path modifier. | |
| void | addPathObject (utils::Vector3d &wrap) |
| Add a path modifier object. | |
| virtual const utils::Scalar & | force () |
| Return the last computed muscle force norm. | |
Protected Member Functions | |
| virtual void | computeForce (const State &emg) |
| Computer the forces from a specific emg. | |
| virtual utils::Scalar | getForceFromActivation (const State &emg)=0 |
| Function allowing modification of the way the multiplication is done in computeForce(EMG). | |
| virtual void | setType () |
| Set the type of muscle. | |
Protected Attributes | |
| std::shared_ptr< MUSCLE_TYPE > | m_type |
| The type of the muscle. | |
| std::shared_ptr< internal_forces::muscles::MuscleGeometry > | m_position |
| The geometry (position of the nodes) of the muscle. | |
| std::shared_ptr< Characteristics > | m_characteristics |
| The muscle characteristics. | |
| std::shared_ptr< State > | m_state |
| The dynamic state. | |
| std::shared_ptr< utils::Scalar > | m_muscleLength |
| muscle tendon length | |
| Protected Attributes inherited from BIORBD_NAMESPACE::internal_forces::Compound | |
| std::shared_ptr< utils::String > | m_name |
| The name of the muscle. | |
| std::shared_ptr< internal_forces::PathModifiers > | m_pathChanger |
| The set of path modifiers. | |
| std::shared_ptr< utils::Scalar > | m_force |
| The last computed force. | |
| internal_forces::muscles::Muscle::Muscle | ( | ) |
Construct a muscle.
Definition at line 19 of file Muscle.cpp.
| internal_forces::muscles::Muscle::Muscle | ( | const utils::String & | name, |
| const internal_forces::muscles::MuscleGeometry & | position, | ||
| const Characteristics & | characteristics ) |
Construct a muscle.
| name | Name of the muscle |
| position | Position of the origin/insertion |
| characteristics | Muscle characteristics from an initial state |
Definition at line 31 of file Muscle.cpp.
| internal_forces::muscles::Muscle::Muscle | ( | const utils::String & | name, |
| const internal_forces::muscles::MuscleGeometry & | position, | ||
| const Characteristics & | characteristics, | ||
| const State & | emg ) |
Construct a muscle.
| name | Name of the muscle |
| position | Position of the origin/insertion |
| characteristics | Muscle characteristics from an initial state |
| emg | Dynamic state |
Definition at line 46 of file Muscle.cpp.
| internal_forces::muscles::Muscle::Muscle | ( | const utils::String & | name, |
| const internal_forces::muscles::MuscleGeometry & | position, | ||
| const Characteristics & | characteristics, | ||
| const internal_forces::PathModifiers & | pathModifiers ) |
Construct a muscle.
| name | Name of the muscle |
| position | Position of the origin/insertion |
| characteristics | Muscle characteristics from an initial state |
| pathModifiers | The path modifiers |
Definition at line 64 of file Muscle.cpp.
| internal_forces::muscles::Muscle::Muscle | ( | const utils::String & | name, |
| const internal_forces::muscles::MuscleGeometry & | position, | ||
| const Characteristics & | characteristics, | ||
| const internal_forces::PathModifiers & | pathModifiers, | ||
| const State & | emg ) |
Construct a muscle.
| name | Name of the muscle |
| position | Position of the origin/insertion |
| characteristics | Muscle characteristics from an initial state |
| pathModifiers | The path modifier |
| emg | The dynamic state |
Definition at line 95 of file Muscle.cpp.
| internal_forces::muscles::Muscle::Muscle | ( | const Muscle & | other | ) |
Construct a muscle from another muscle.
| other | The other muscle |
Definition at line 80 of file Muscle.cpp.
| internal_forces::muscles::Muscle::Muscle | ( | const std::shared_ptr< Muscle > | other | ) |
Construct a muscle from another muscle.
| other | The other muscle |
Definition at line 88 of file Muscle.cpp.
|
virtual |
Destroy class properly.
Definition at line 116 of file Muscle.cpp.
| const utils::Scalar & internal_forces::muscles::Muscle::activationDot | ( | const State & | state, |
| bool | alreadyNormalized = false ) const |
Return the activation time derivative.
| state | The dynamic state |
| alreadyNormalized | If the emg is already normalized |
Definition at line 209 of file Muscle.cpp.
| internal_forces::muscles::Characteristics & internal_forces::muscles::Muscle::characteristics | ( | ) | const |
Return the muscle characteristics.
Definition at line 254 of file Muscle.cpp.
|
protectedvirtual |
Computer the forces from a specific emg.
| emg | EMG data |
Definition at line 222 of file Muscle.cpp.
| void internal_forces::muscles::Muscle::DeepCopy | ( | const Muscle & | other | ) |
Deep copy of a muscle in new muscle.
| other | The muscle to copy |
Definition at line 120 of file Muscle.cpp.
|
pure virtual |
Computes and returns the forces norm from the EMG.
| emg | EMG data |
Implemented in BIORBD_NAMESPACE::internal_forces::muscles::HillType, and BIORBD_NAMESPACE::internal_forces::muscles::IdealizedActuator.
|
pure virtual |
Return the computed force norm from EMG.
| updatedModel | The joint model previously updated to the proper level |
| Q | The generalized coordinates of the model |
| Qdot | The generalized velocities of the model |
| emg | EMG data |
| updateMuscleParameters | Update the kinematic related parameters of the muscles |
Implemented in BIORBD_NAMESPACE::internal_forces::muscles::HillType, and BIORBD_NAMESPACE::internal_forces::muscles::IdealizedActuator.
|
pure virtual |
Return the computed force norm from EMG.
| updatedModel | The joint model previously updated to the proper level |
| Q | The generalized coordinates of the model |
| emg | EMG data |
| updateMuscleParameters | Update the kinematic related parameters of the muscles |
Implemented in BIORBD_NAMESPACE::internal_forces::muscles::HillType, and BIORBD_NAMESPACE::internal_forces::muscles::IdealizedActuator.
|
protectedpure virtual |
Function allowing modification of the way the multiplication is done in computeForce(EMG).
| emg | The EMG data |
Implemented in BIORBD_NAMESPACE::internal_forces::muscles::HillType, and BIORBD_NAMESPACE::internal_forces::muscles::IdealizedActuator.
| const utils::Scalar & internal_forces::muscles::Muscle::length | ( | rigidbody::Joints & | updatedModel, |
| const rigidbody::GeneralizedCoordinates & | Q, | ||
| bool | updateMuscleParameters = true ) |
Get the length of the muscle.
| updatedModel | The joint model previously updated to the proper level |
| Q | The generalized coordinates |
| updateMuscleParameters | Update the kinematic related parameters of the muscles |
Definition at line 178 of file Muscle.cpp.
| const std::vector< utils::Vector3d > & internal_forces::muscles::Muscle::musclesPointsInGlobal | ( | ) | const |
Return the previously computed muscle points in global reference frame.
Definition at line 239 of file Muscle.cpp.
| const std::vector< utils::Vector3d > & internal_forces::muscles::Muscle::musclesPointsInGlobal | ( | rigidbody::Joints & | updatedModel, |
| const rigidbody::GeneralizedCoordinates & | Q, | ||
| bool | updateMuscleParameters = true ) |
Return the muscle points in global reference frame.
| updatedModel | The updated joint model (The user must ensure that the model is updated to the proper level) |
| Q | The generalized coordinates |
| updateMuscleParameters | Update the kinematic related parameters of the muscles |
Definition at line 228 of file Muscle.cpp.
| const utils::Scalar & internal_forces::muscles::Muscle::musculoTendonLength | ( | rigidbody::Joints & | updatedModel, |
| const rigidbody::GeneralizedCoordinates & | Q, | ||
| bool | updateMuscleParameters = true ) |
Return the musculo tendon length.
| updatedModel | The joint model previously updated to the proper level |
| Q | The generalized coordinates |
| updateMuscleParameters | Update the kinematic related parameters of the muscles |
Definition at line 188 of file Muscle.cpp.
| const internal_forces::muscles::MuscleGeometry & internal_forces::muscles::Muscle::position | ( | ) | const |
Return the position of all the points attached to the muscle (0 being the origin).
Definition at line 174 of file Muscle.cpp.
| void internal_forces::muscles::Muscle::setCharacteristics | ( | const Characteristics & | characteristics | ) |
Set the muscle characteristics.
| characteristics | New value of the muscle characteristics |
Definition at line 248 of file Muscle.cpp.
| void internal_forces::muscles::Muscle::setForceIsoMax | ( | const utils::Scalar & | forceMax | ) |
Set the maximal isometric force.
| forceMax | The force to set |
Definition at line 243 of file Muscle.cpp.
| void internal_forces::muscles::Muscle::setPosition | ( | const internal_forces::muscles::MuscleGeometry & | positions | ) |
Set the position of all the points attached to the muscle (0 being the origin).
| positions | New value of the position |
Definition at line 169 of file Muscle.cpp.
| void internal_forces::muscles::Muscle::setState | ( | const State & | emg | ) |
Set the dynamic state.
| emg | The dynamic state value |
Definition at line 259 of file Muscle.cpp.
|
protectedvirtual |
Set the type of muscle.
Reimplemented in BIORBD_NAMESPACE::internal_forces::muscles::HillDeGrooteActiveOnlyType, BIORBD_NAMESPACE::internal_forces::muscles::HillDeGrooteType, BIORBD_NAMESPACE::internal_forces::muscles::HillDeGrooteTypeFatigable, BIORBD_NAMESPACE::internal_forces::muscles::HillThelenActiveOnlyType, BIORBD_NAMESPACE::internal_forces::muscles::HillThelenType, BIORBD_NAMESPACE::internal_forces::muscles::HillThelenTypeFatigable, BIORBD_NAMESPACE::internal_forces::muscles::HillType, and BIORBD_NAMESPACE::internal_forces::muscles::IdealizedActuator.
Definition at line 134 of file Muscle.cpp.
| internal_forces::muscles::State & internal_forces::muscles::Muscle::state | ( | ) |
| const internal_forces::muscles::State & internal_forces::muscles::Muscle::state | ( | ) | const |
| internal_forces::muscles::MUSCLE_TYPE internal_forces::muscles::Muscle::type | ( | ) | const |
Return the type of the muscle.
Definition at line 129 of file Muscle.cpp.
| void internal_forces::muscles::Muscle::updateOrientations | ( | rigidbody::Joints & | updatedModel, |
| const rigidbody::GeneralizedCoordinates & | Q ) |
Update the position of the origin and insertion positions of the muscle.
| updatedModel | The joint model previously updated to the proper level |
| Q | The generalized coordinates |
Definition at line 138 of file Muscle.cpp.
| void internal_forces::muscles::Muscle::updateOrientations | ( | rigidbody::Joints & | updatedModel, |
| const rigidbody::GeneralizedCoordinates & | Q, | ||
| const rigidbody::GeneralizedVelocity & | Qdot ) |
Update the position of the origin and insertion nodes of the muscle.
| updatedModel | The joint model previously updated to the proper level |
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
Definition at line 145 of file Muscle.cpp.
| void internal_forces::muscles::Muscle::updateOrientations | ( | std::vector< utils::Vector3d > & | musclePointsInGlobal, |
| utils::Matrix & | jacoPointsInGlobal ) |
Update by hand the position of the origin and insertion nodes of the muscle.
| musclePointsInGlobal | The muscle points |
| jacoPointsInGlobal | The jacobian matrix |
Definition at line 153 of file Muscle.cpp.
| void internal_forces::muscles::Muscle::updateOrientations | ( | std::vector< utils::Vector3d > & | musclePointsInGlobal, |
| utils::Matrix & | jacoPointsInGlobal, | ||
| const rigidbody::GeneralizedVelocity & | Qdot ) |
Update by hand the position of the origin and insertion nodes of the muscle.
| musclePointsInGlobal | The muscle points |
| jacoPointsInGlobal | The Jacobian matrix |
| Qdot | The genelized velocities |
Definition at line 160 of file Muscle.cpp.
| const utils::Scalar & internal_forces::muscles::Muscle::velocity | ( | rigidbody::Joints & | updatedModel, |
| const rigidbody::GeneralizedCoordinates & | Q, | ||
| const rigidbody::GeneralizedVelocity & | Qdot, | ||
| bool | updateMuscleParameters = true ) |
Return the velocity of the muscle.
| updatedModel | The joint model previously updated to the proper level |
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| updateMuscleParameters | Update the kinematic related parameters of the muscles |
Definition at line 198 of file Muscle.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |