Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::internal_forces::muscles::StateDynamics Class Reference

EMG with the capability to compute the time derivative. More...

#include <StateDynamics.h>

Inheritance diagram for BIORBD_NAMESPACE::internal_forces::muscles::StateDynamics:
BIORBD_NAMESPACE::internal_forces::muscles::State BIORBD_NAMESPACE::internal_forces::muscles::StateDynamicsBuchanan BIORBD_NAMESPACE::internal_forces::muscles::StateDynamicsDeGroote

Public Member Functions

 StateDynamics (const utils::Scalar &excitation=0, const utils::Scalar &activation=0)
 Construct the state dynamics.
 StateDynamics (const State &other)
 Construct a state dynamics from another state dynamics.
virtual ~StateDynamics ()
 Destroy class properly.
StateDynamics DeepCopy () const
 Deep copy of state dynamics.
void DeepCopy (const StateDynamics &other)
 Deep copy of state dynamics into another state dynamics.
virtual void setExcitation (const utils::Scalar &val, bool turnOffWarnings=false)
 Set the muscle excitation.
const utils::Scalar & previousExcitation () const
 Return the previous activation.
virtual void setActivation (const utils::Scalar &val, bool turnOffWarnings=false)
 Set the muscle activation.
const utils::Scalar & previousActivation () const
 Return the previous activation.
virtual const utils::Scalar & timeDerivativeActivation (const utils::Scalar &excitation, const utils::Scalar &activation, const Characteristics &characteristics, bool alreadyNormalized=false)
 Compute and return the activation time derivative from the excitation and activation.
virtual const utils::Scalar & timeDerivativeActivation (const State &emg, const Characteristics &characteristics, bool alreadyNormalized=false)
 Compute and return the activation time derivative.
virtual const utils::Scalar & timeDerivativeActivation (const Characteristics &characteristics, bool alreadyNormalized=false)
 Compute and return the activation time derivative.
virtual const utils::Scalar & timeDerivativeActivation ()
 Return the previously computed activation time derivative.
Public Member Functions inherited from BIORBD_NAMESPACE::internal_forces::muscles::State
 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.
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.
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< utils::Scalar > m_previousExcitation
 The previous excitation.
std::shared_ptr< utils::Scalar > m_previousActivation
 The previous activation.
std::shared_ptr< utils::Scalar > m_activationDot
 The activation velocity.
Protected Attributes inherited from BIORBD_NAMESPACE::internal_forces::muscles::State
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.

Detailed Description

EMG with the capability to compute the time derivative.

Definition at line 15 of file StateDynamics.h.

Constructor & Destructor Documentation

◆ StateDynamics() [1/2]

internal_forces::muscles::StateDynamics::StateDynamics ( const utils::Scalar & excitation = 0,
const utils::Scalar & activation = 0 )

Construct the state dynamics.

Parameters
excitationThe muscle excitation
activationThe muscle activation

Definition at line 14 of file StateDynamics.cpp.

◆ StateDynamics() [2/2]

internal_forces::muscles::StateDynamics::StateDynamics ( const State & other)

Construct a state dynamics from another state dynamics.

Parameters
otherThe other state dynamics

Definition at line 24 of file StateDynamics.cpp.

◆ ~StateDynamics()

internal_forces::muscles::StateDynamics::~StateDynamics ( )
virtual

Destroy class properly.

Definition at line 34 of file StateDynamics.cpp.

Member Function Documentation

◆ DeepCopy() [1/2]

internal_forces::muscles::StateDynamics internal_forces::muscles::StateDynamics::DeepCopy ( ) const

Deep copy of state dynamics.

Returns
A deep copy of state dynamics

Definition at line 39 of file StateDynamics.cpp.

◆ DeepCopy() [2/2]

void internal_forces::muscles::StateDynamics::DeepCopy ( const StateDynamics & other)

Deep copy of state dynamics into another state dynamics.

Parameters
otherThe state dynamics to copy

Definition at line 45 of file StateDynamics.cpp.

◆ previousActivation()

const utils::Scalar & internal_forces::muscles::StateDynamics::previousActivation ( ) const

Return the previous activation.

Returns
The previous activation

Definition at line 155 of file StateDynamics.cpp.

◆ previousExcitation()

const utils::Scalar & internal_forces::muscles::StateDynamics::previousExcitation ( ) const

Return the previous activation.

Returns
The previous activation

Definition at line 143 of file StateDynamics.cpp.

◆ setActivation()

void internal_forces::muscles::StateDynamics::setActivation ( const utils::Scalar & val,
bool turnOffWarnings = false )
virtual

Set the muscle activation.

Parameters
valThe value of the muscle activation
turnOffWarningsIf 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 from BIORBD_NAMESPACE::internal_forces::muscles::State.

Reimplemented in BIORBD_NAMESPACE::internal_forces::muscles::StateDynamicsBuchanan.

Definition at line 147 of file StateDynamics.cpp.

◆ setExcitation()

void internal_forces::muscles::StateDynamics::setExcitation ( const utils::Scalar & val,
bool turnOffWarnings = false )
virtual

Set the muscle excitation.

Parameters
valThe value of the muscle excitation
turnOffWarningsIf 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 from BIORBD_NAMESPACE::internal_forces::muscles::State.

Reimplemented in BIORBD_NAMESPACE::internal_forces::muscles::StateDynamicsBuchanan.

Definition at line 135 of file StateDynamics.cpp.

◆ setType()

void internal_forces::muscles::StateDynamics::setType ( )
protectedvirtual

◆ timeDerivativeActivation() [1/4]

const utils::Scalar & internal_forces::muscles::StateDynamics::timeDerivativeActivation ( )
virtual

Return the previously computed activation time derivative.

Returns
The activation time derivative

Definition at line 131 of file StateDynamics.cpp.

◆ timeDerivativeActivation() [2/4]

const utils::Scalar & internal_forces::muscles::StateDynamics::timeDerivativeActivation ( const Characteristics & characteristics,
bool alreadyNormalized = false )
virtual

Compute and return the activation time derivative.

Parameters
characteristicsThe muscle characteristics
alreadyNormalizedIf already normalized
Returns
The activation time derivative

Reimplemented in BIORBD_NAMESPACE::internal_forces::muscles::StateDynamicsDeGroote.

Definition at line 75 of file StateDynamics.cpp.

◆ timeDerivativeActivation() [3/4]

const utils::Scalar & internal_forces::muscles::StateDynamics::timeDerivativeActivation ( const State & emg,
const Characteristics & characteristics,
bool alreadyNormalized = false )
virtual

Compute and return the activation time derivative.

Parameters
emgThe emg
characteristicsThe muscle characteristics
alreadyNormalizedIf already normalized
Returns
The activation time derivative

Definition at line 55 of file StateDynamics.cpp.

◆ timeDerivativeActivation() [4/4]

const utils::Scalar & internal_forces::muscles::StateDynamics::timeDerivativeActivation ( const utils::Scalar & excitation,
const utils::Scalar & activation,
const Characteristics & characteristics,
bool alreadyNormalized = false )
virtual

Compute and return the activation time derivative from the excitation and activation.

Parameters
excitationThe muscle excitation
activationThe muscle activation
characteristicsThe muscle characteristics
alreadyNormalizedIf already normalized
Returns
The activation time derivative

Definition at line 64 of file StateDynamics.cpp.

Member Data Documentation

◆ m_activationDot

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::internal_forces::muscles::StateDynamics::m_activationDot
protected

The activation velocity.

Definition at line 137 of file StateDynamics.h.

◆ m_previousActivation

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::internal_forces::muscles::StateDynamics::m_previousActivation
protected

The previous activation.

Definition at line 136 of file StateDynamics.h.

◆ m_previousExcitation

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::internal_forces::muscles::StateDynamics::m_previousExcitation
protected

The previous excitation.

Definition at line 134 of file StateDynamics.h.


The documentation for this class was generated from the following files: