EMG holder to interact with the muscle.
More...
#include <State.h>
|
virtual void | setType () |
| Set the type to simple_state.
|
|
|
std::shared_ptr< biorbd::muscles::STATE_TYPE > | m_stateType |
| The state type.
|
|
std::shared_ptr< biorbd::utils::Scalar > | m_excitation |
| The muscle excitation.
|
|
std::shared_ptr< biorbd::utils::Scalar > | m_excitationNorm |
| The normalized excitation.
|
|
std::shared_ptr< biorbd::utils::Scalar > | m_activation |
| The muscle activation.
|
|
EMG holder to interact with the muscle.
Definition at line 15 of file State.h.
◆ State() [1/2]
biorbd::muscles::State::State |
( |
const biorbd::utils::Scalar & |
excitation = 0 , |
|
|
const biorbd::utils::Scalar & |
activation = 0 |
|
) |
| |
Construct a state.
- Parameters
-
excitation | The muscle excitation |
activation | The muscle activation |
Definition at line 6 of file State.cpp.
◆ State() [2/2]
Construct a muscle state from another state.
- Parameters
-
Definition at line 17 of file State.cpp.
◆ activation()
const biorbd::utils::Scalar & biorbd::muscles::State::activation |
( |
| ) |
const |
Return the muscle activation.
- Returns
- The muscle activation
Definition at line 127 of file State.cpp.
◆ DeepCopy() [1/2]
Deep copy of state.
- Returns
- A deep copy of state
Definition at line 32 of file State.cpp.
◆ DeepCopy() [2/2]
Deep copy of state into another state.
- Parameters
-
Definition at line 39 of file State.cpp.
◆ excitation()
const biorbd::utils::Scalar & biorbd::muscles::State::excitation |
( |
| ) |
const |
Return the muscle excitation.
- Returns
- The muscle excitation
Definition at line 66 of file State.cpp.
◆ excitationNorm()
const biorbd::utils::Scalar & biorbd::muscles::State::excitationNorm |
( |
| ) |
const |
Return the previously normalized excitation.
- Returns
- The normalized excitation
Definition at line 93 of file State.cpp.
◆ normalizeExcitation()
const biorbd::utils::Scalar & biorbd::muscles::State::normalizeExcitation |
( |
const biorbd::muscles::State & |
emgMax, |
|
|
bool |
turnOffWarnings = false |
|
) |
| |
Compute and return the normalized excitation.
- Parameters
-
emgMax | The maximal emg |
turnOffWarnings | If the warning when excitation is higher than 1 should be off or on |
- Returns
- The normalized excitation
Even when the warning is ON, the computation is performed anyway
Definition at line 71 of file State.cpp.
◆ setActivation()
void biorbd::muscles::State::setActivation |
( |
const biorbd::utils::Scalar & |
val, |
|
|
bool |
turnOffWarnings = false |
|
) |
| |
|
virtual |
Set the muscle activation.
- Parameters
-
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::muscles::StateDynamics, and biorbd::muscles::StateDynamicsBuchanan.
Definition at line 98 of file State.cpp.
◆ setExcitation()
void biorbd::muscles::State::setExcitation |
( |
const biorbd::utils::Scalar & |
val, |
|
|
bool |
turnOffWarnings = false |
|
) |
| |
|
virtual |
Set the muscle excitation.
- Parameters
-
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::muscles::StateDynamicsBuchanan, and biorbd::muscles::StateDynamics.
Definition at line 47 of file State.cpp.
◆ setExcitationNorm()
void biorbd::muscles::State::setExcitationNorm |
( |
const biorbd::utils::Scalar & |
val | ) |
|
Force set the normalized excitation.
- Parameters
-
val | Value of the normalized excitation to set |
Definition at line 87 of file State.cpp.
◆ type()
biorbd::muscles::STATE_TYPE biorbd::muscles::State::type |
( |
| ) |
const |
Return the state type.
- Returns
- The state type
Definition at line 132 of file State.cpp.
The documentation for this class was generated from the following files: