Biorbd Release_1.13.0
Loading...
Searching...
No Matches
Characteristics.h
1#ifndef BIORBD_MUSCLES_CHARACTERISTICS_H
2#define BIORBD_MUSCLES_CHARACTERISTICS_H
3
4#include "biorbdConfig.h"
5
6#include <cstddef>
7#include <memory>
8
9#include "Utils/Scalar.h"
10
11namespace BIORBD_NAMESPACE {
12namespace internal_forces {
13namespace muscles {
14class State;
19class BIORBD_API Characteristics {
20 public:
25
30 Characteristics(const Characteristics& other);
31
48 const utils::Scalar& optLength,
49 const utils::Scalar& fmax,
50 const utils::Scalar& PCSA,
51 const utils::Scalar& tendonSlackLength,
52 const utils::Scalar& pennAngle,
53 const State& emgMax,
55 bool useDamping = false,
56 const utils::Scalar& maxShorteningSpeed = 10.0,
57 const utils::Scalar& torqueAct = 0.01,
58 const utils::Scalar& torqueDeact = 0.04,
59 const utils::Scalar& minAct = 0.01);
60
64 virtual ~Characteristics();
65
71
76 void DeepCopy(const Characteristics& other);
77
82 void setOptimalLength(const utils::Scalar& val);
83
88 virtual const utils::Scalar& optimalLength() const;
89
94 virtual void setForceIsoMax(const utils::Scalar& val);
95
100 const utils::Scalar& forceIsoMax() const;
101
106 void setTendonSlackLength(const utils::Scalar& val);
111 const utils::Scalar& tendonSlackLength() const;
112
117 void setPennationAngle(const utils::Scalar& val);
122 const utils::Scalar& pennationAngle() const;
123
128 void setPCSA(const utils::Scalar& val);
129
134 const utils::Scalar& PCSA() const;
135
140 void setMinActivation(const utils::Scalar& val);
141
146 const utils::Scalar& minActivation() const;
147
152 void setMaxShorteningSpeed(const utils::Scalar& val);
153
158 const utils::Scalar& maxShorteningSpeed() const;
159
164 void setTorqueActivation(const utils::Scalar& val);
165
170 const utils::Scalar& torqueActivation() const;
171
176 void setTorqueDeactivation(const utils::Scalar& val);
177
182 const utils::Scalar& torqueDeactivation() const;
183
188 void setStateMax(const State& emgMax);
189
194 const State& stateMax() const;
195
206
211 void setUseDamping(bool val);
212
217 bool useDamping() const;
218
219 protected:
220 std::shared_ptr<utils::Scalar> m_optimalLength;
221 std::shared_ptr<utils::Scalar> m_fIsoMax;
222 std::shared_ptr<utils::Scalar>
224 std::shared_ptr<utils::Scalar> m_tendonSlackLength;
225 std::shared_ptr<utils::Scalar> m_pennationAngle;
226 std::shared_ptr<bool>
228 std::shared_ptr<State>
230
231 std::shared_ptr<utils::Scalar>
233
234 // Activation parameters
235 std::shared_ptr<utils::Scalar> m_minActivation;
236 std::shared_ptr<utils::Scalar>
238 std::shared_ptr<utils::Scalar>
240
241 // Fatigue parameters
242 std::shared_ptr<FatigueParameters>
244};
245
246} // namespace muscles
247} // namespace internal_forces
248} // namespace BIORBD_NAMESPACE
249
250#endif // BIORBD_MUSCLES_CHARACTERISTICS_H
void setTendonSlackLength(const utils::Scalar &val)
Set the tendon slack length.
const FatigueParameters & fatigueParameters() const
Return the fatigue parameters.
const utils::Scalar & torqueActivation() const
Return the time activation constant.
void setOptimalLength(const utils::Scalar &val)
Set the length without tension.
virtual void setForceIsoMax(const utils::Scalar &val)
Set the maximal isometric force.
const utils::Scalar & pennationAngle() const
Return the angle of pennation.
const utils::Scalar & forceIsoMax() const
Return the maximal isometric force at optimal length.
std::shared_ptr< utils::Scalar > m_PCSA
Physiological cross-sectional area of the muscle.
const utils::Scalar & minActivation() const
Return the minimal activation of the muscle.
bool useDamping() const
Return 1 if use damping for muscle computation.
void setStateMax(const State &emgMax)
Set the maximal excitation and activation of the muscle.
const utils::Scalar & torqueDeactivation() const
Return the time deactivation constant.
const State & stateMax() const
Return the maximal excitation and activation of the muscle.
std::shared_ptr< utils::Scalar > m_minActivation
Minimal activation.
void setTorqueActivation(const utils::Scalar &val)
Set the time activation constant.
std::shared_ptr< FatigueParameters > m_fatigueParameters
Fatigue parameters.
std::shared_ptr< utils::Scalar > m_maxShorteningSpeed
Maximal velocity of shortening.
std::shared_ptr< utils::Scalar > m_torqueDeactivation
Time deactivation constant.
const utils::Scalar & maxShorteningSpeed() const
Return the maximal velocity of shortening.
void setPCSA(const utils::Scalar &val)
Set the physiological cross-sectional area of the muscle.
void setPennationAngle(const utils::Scalar &val)
Set the angle of pennation.
virtual const utils::Scalar & optimalLength() const
Return the optimal length at which maximal force occurs.
std::shared_ptr< utils::Scalar > m_torqueActivation
Time activation constant.
void setFatigueParameters(const FatigueParameters &fatigueParameters)
Set the fatigue parameters.
std::shared_ptr< bool > m_useDamping
Use damping for muscle force from activation.
void setMaxShorteningSpeed(const utils::Scalar &val)
Set the maximal velocity of shortening.
const utils::Scalar & tendonSlackLength() const
Return the tendon slack length.
std::shared_ptr< State > m_stateMax
Maximal excitation et activation of the muscle.
const utils::Scalar & PCSA() const
Return the physiological cross-sectional area of the muscle.
std::shared_ptr< utils::Scalar > m_fIsoMax
Maximal isometric force.
void setMinActivation(const utils::Scalar &val)
Set the minimal activation of the muscle.
std::shared_ptr< utils::Scalar > m_tendonSlackLength
Tendon slack length.
void setTorqueDeactivation(const utils::Scalar &val)
Set the time deactivation constant.
void setUseDamping(bool val)
Choose if use damping for muscle force computation.
std::shared_ptr< utils::Scalar > m_optimalLength
Length without tension.
Characteristics DeepCopy() const
Deep copy of characteristics.
std::shared_ptr< utils::Scalar > m_pennationAngle
Angle of pennation.
Class FatigueParameters that holds the muscle fatigue parameters.
EMG holder to interact with the muscle.
Definition State.h:17