|
Biorbd Release_1.13.0
|
EMG holder to interact with the muscle. More...
#include <State.h>
Public Member Functions | |
| State (const utils::Scalar &excitation=0, const utils::Scalar &activation=0) | |
| Construct a state. | |
| State (const State &other) | |
| Construct a muscle state from another state. | |
| virtual | ~State () |
| Destroy class properly. | |
| State | DeepCopy () const |
| Deep copy of state. | |
| void | DeepCopy (const State &other) |
| Deep copy of state into another state. | |
| virtual void | setExcitation (const utils::Scalar &val, bool turnOffWarnings=false) |
| Set the muscle excitation. | |
| const utils::Scalar & | excitation () const |
| Return the muscle excitation. | |
| const utils::Scalar & | normalizeExcitation (const State &emgMax, bool turnOffWarnings=false) |
| Compute and return the normalized excitation. | |
| void | setExcitationNorm (const utils::Scalar &val) |
| Force set the normalized excitation. | |
| const utils::Scalar & | excitationNorm () const |
| Return the previously normalized excitation. | |
| virtual void | setActivation (const utils::Scalar &val, bool turnOffWarnings=false) |
| Set the muscle activation. | |
| const utils::Scalar & | activation () const |
| Return the muscle activation. | |
| STATE_TYPE | type () const |
| Return the state type. | |
Protected Member Functions | |
| virtual void | setType () |
| Set the type to simple_state. | |
Protected Attributes | |
| std::shared_ptr< STATE_TYPE > | m_stateType |
| The state type. | |
| std::shared_ptr< utils::Scalar > | m_excitation |
| The muscle excitation. | |
| std::shared_ptr< utils::Scalar > | m_excitationNorm |
| The normalized excitation. | |
| std::shared_ptr< utils::Scalar > | m_activation |
| The muscle activation. | |
| internal_forces::muscles::State::State | ( | const utils::Scalar & | excitation = 0, |
| const utils::Scalar & | activation = 0 ) |
| internal_forces::muscles::State::State | ( | const State & | other | ) |
|
virtual |
| const utils::Scalar & internal_forces::muscles::State::activation | ( | ) | const |
| internal_forces::muscles::State internal_forces::muscles::State::DeepCopy | ( | ) | const |
| void internal_forces::muscles::State::DeepCopy | ( | const State & | other | ) |
| const utils::Scalar & internal_forces::muscles::State::excitation | ( | ) | const |
| const utils::Scalar & internal_forces::muscles::State::excitationNorm | ( | ) | const |
| const utils::Scalar & internal_forces::muscles::State::normalizeExcitation | ( | const State & | emgMax, |
| bool | turnOffWarnings = false ) |
Compute and return the normalized excitation.
| emgMax | The maximal emg |
| turnOffWarnings | If the warning when excitation is higher than 1 should be off or on |
Even when the warning is ON, the computation is performed anyway
|
virtual |
Set the muscle activation.
| val | The value of the muscle activation |
| turnOffWarnings | If the warnings should be OFF or ON. |
Even if the warning on the activation being lower than 0 is set to OFF it changes it to 0 anyway, but doesn't send a warning saying it.
Even if the warning on the activation being higher than 1 is set to OFF it changes it to 1 anyway, but doesn't send a warning saying it.
Reimplemented in BIORBD_NAMESPACE::internal_forces::muscles::StateDynamics, and BIORBD_NAMESPACE::internal_forces::muscles::StateDynamicsBuchanan.
|
virtual |
Set the muscle excitation.
| val | The value of the muscle excitation |
| turnOffWarnings | If the warnings should be OFF or ON. |
Even if the warning on the excitation being lower than 0 is set to OFF it changes it to 0 anyway, but doesn't send a warning saying it.
Reimplemented in BIORBD_NAMESPACE::internal_forces::muscles::StateDynamics, and BIORBD_NAMESPACE::internal_forces::muscles::StateDynamicsBuchanan.
| void internal_forces::muscles::State::setExcitationNorm | ( | const utils::Scalar & | val | ) |
|
protectedvirtual |
Set the type to simple_state.
Reimplemented in BIORBD_NAMESPACE::internal_forces::muscles::StateDynamics, BIORBD_NAMESPACE::internal_forces::muscles::StateDynamicsBuchanan, and BIORBD_NAMESPACE::internal_forces::muscles::StateDynamicsDeGroote.
| internal_forces::muscles::STATE_TYPE internal_forces::muscles::State::type | ( | ) | const |
|
protected |
|
protected |
|
protected |
|
protected |