1#ifndef MILLARD2016TORQUEMUSCLE_H_
2#define MILLARD2016TORQUEMUSCLE_H_
13#include "../geometry/SmoothSegmentedFunction.h"
20 #ifdef RBDL_BUILD_ADDON_MUSCLE_FITTING
21 class TorqueMuscleFittingToolkit;
22 class FitTorqueMuscleParameters;
923#ifdef RBDL_BUILD_ADDON_MUSCLE_FITTING
1017 double jointAngleOffsetRelativeToDoxygenFigures,
1018 double signOfJointAngleRelativeToDoxygenFigures,
1019 double signOfJointTorqueToDoxygenFigures,
1020 const std::string& name
1048 double jointAngularVelocity,
1049 double activation)
const;
1090 double jointAngularVelocity,
1093 &updTorqueMuscleSummaryStruct)
const;
1129 double jointAngularVelocity,
1131 double jointTorque)
const;
1154 double jointAngularVelocity,
1274 double passiveCurveAngleOffsetVal);
1291 double passiveFiberTorque);
1303 double passiveFiberTorque);
1314 double maxIsometricTorque);
1322 double maxAngularVelocity);
1329 const RigidBodyDynamics::Addons::Geometry::
1337 const RigidBodyDynamics::Addons::Geometry::
1344 const RigidBodyDynamics::Addons::Geometry::
1370 double blendingVariable);
1379 double blendingVariable);
1388 double blendingVariable);
1440 const std::string& path,
1441 const std::string& fileNameWithoutExtension,
1442 int numberOfSamplePoints);
1461 RigidBodyDynamics::Addons::Geometry::
1465 RigidBodyDynamics::Addons::Geometry::
1469 RigidBodyDynamics::Addons::Geometry::
1521 double jointAngularVelocity)
const;
1523 double fiberAngularVelocity)
const;
1536 double activeTorqueAngleBlendingVariable,
1537 double passiveTorqueAngleBlendingVariable,
1538 double torqueVelocityBlendingVariable,
1539 double activeTorqueAngleAngleScaling,
1540 double activeTorqueAngleAtOneNormTorque,
1541 double passiveTorqueAngleCurveOffset,
1542 double maxAngularVelocity,
1543 double maxActiveIsometricTorque,
1563 double normPassiveFiberTorque,
1564 double blendingVariable,
1565 double passiveTorqueAngleCurveOffset)
const;
1604 double curveArgument,
1605 double blendingVariable,
1606 double maximumBlendingValue,
1607 unsigned int derivativeOrderArgument,
1608 unsigned int derivativeOrderBlendingVariable,
1610 const &curve)
const;
1647 double blendedCurveValue,
1649 double blendingVariable,
1650 double maximumBlendingValue,
1652 const &curve)
const;
1693 double jointAngularVelocity,
1694 double activeTorqueAngleBlendingVariable,
1695 double passiveTorqueAngleBlendingVariable,
1696 double activeTorqueAngularVelocityBlendingVariable,
1697 double activeTorqueAngleAngleScaling,
1698 double activeTorqueAngleAtOneNormTorque,
1699 double passiveTorqueAngleCurveOffset,
1700 double maxAngularVelocity,
1701 double maxActiveIsometricTorque,
1733 double normFiberAngularVelocity,
1734 double activeTorqueAngleBlendingVariable,
1735 double passiveTorqueAngleBlendingVariable,
1736 double activeTorqueAngularVelocityBlendingVariable,
1737 double activeTorqueAngleAngleScaling,
1738 double activeTorqueAngleAtOneNormTorque,
1739 double passiveTorqueAngleCurveOffset,
1782 double jointAngularVelocity,
1783 double activeTorqueAngleBlendingVariable,
1784 double passiveTorqueAngleBlendingVariable,
1785 double activeTorqueAngularVelocityBlendingVariable,
1786 double activeTorqueAngleAngleScaling,
1787 double activeTorqueAngleAtOneNormTorque,
1788 double passiveTorqueAngleCurveOffset,
1789 double maxAngularVelocity,
1790 double maxActiveIsometricTorque,
1834 double jointAngularVelocity,
1835 double activeTorqueAngleBlendingVariable,
1836 double passiveTorqueAngleBlendingVariable,
1837 double activeTorqueAngularVelocityBlendingVariable,
1838 double activeTorqueAngleAngleScaling,
1839 double activeTorqueAngleAtOneNormTorque,
1840 double passiveTorqueAngleCurveOffset,
1841 double maxAngularVelocity,
1842 double maxActiveIsometricTorque,
This class implements a rigid-tendon muscle-torque-generator (MTG) for a growing list of joints and t...
TorqueMuscleSummary mTmSummary
void updTorqueMuscleSummary(double activation, double jointAngle, double jointAngularVelocity, double activeTorqueAngleBlendingVariable, double passiveTorqueAngleBlendingVariable, double activeTorqueAngularVelocityBlendingVariable, double activeTorqueAngleAngleScaling, double activeTorqueAngleAtOneNormTorque, double passiveTorqueAngleCurveOffset, double maxAngularVelocity, double maxActiveIsometricTorque, TorqueMuscleSummary &updTms) const
void calcActivation(double jointAngle, double jointAngularVelocity, double jointTorque, TorqueMuscleSummary &updTorqueMuscleSummaryStruct) const
void updTorqueMuscleSummaryCurveValues(double fiberAngle, double normFiberAngularVelocity, double activeTorqueAngleBlendingVariable, double passiveTorqueAngleBlendingVariable, double activeTorqueAngularVelocityBlendingVariable, double activeTorqueAngleAngleScaling, double activeTorqueAngleAtOneNormTorque, double passiveTorqueAngleCurveOffset, TorqueMuscleSummary &updTms) const
void fitPassiveCurveAngleOffset(double jointAngle, double passiveFiberTorque)
void updInvertTorqueMuscleSummary(double jointTorque, double jointAngle, double jointAngularVelocity, double activeTorqueAngleBlendingVariable, double passiveTorqueAngleBlendingVariable, double activeTorqueAngularVelocityBlendingVariable, double activeTorqueAngleAngleScaling, double activeTorqueAngleAtOneNormTorque, double passiveTorqueAngleCurveOffset, double maxAngularVelocity, double maxActiveIsometricTorque, TorqueMuscleSummary &updTms) const
double getPassiveTorqueAngleCurveBlendingVariable() const
double mAngleAtOneNormPassiveTorque
RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction mTvCurve
static const double mTpLambdaMax
double getActiveTorqueAngleCurveBlendingVariable() const
static double const GymnastWholeBody[24][12]
bool mUseTabularTorqueVelocityMultiplierAtHalfOmegaMax
AgeGroupSet::item getAgeGroup()
DataSet::item getDataSet()
double calcBlendedCurveDerivative(double curveArgument, double blendingVariable, double maximumBlendingValue, unsigned int derivativeOrderArgument, unsigned int derivativeOrderBlendingVariable, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction const &curve) const
double calcFiberAngularVelocity(double jointAngularVelocity) const
double mSubjectHeightInMeters
AgeGroupSet::item mAgeGroup
double getActiveTorqueAngleCurveAngleScaling() const
void setMaximumConcentricJointAngularVelocity(double maxAngularVelocity)
JointTorqueSet::item getJointTorque()
double mSignOfConcentricAnglularVelocity
void updTorqueMuscleInfo(double activation, double jointAngle, double jointAngularVelocity, double activeTorqueAngleBlendingVariable, double passiveTorqueAngleBlendingVariable, double activeTorqueAngularVelocityBlendingVariable, double activeTorqueAngleAngleScaling, double activeTorqueAngleAtOneNormTorque, double passiveTorqueAngleCurveOffset, double maxAngularVelocity, double maxActiveIsometricTorque, TorqueMuscleInfo &updTmi) const
RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction mTaCurve
double mScaleFactorAnderson2007
void setActiveTorqueAngleCurveAngleScaling(double angleScaling)
void calcTorqueMuscleInfo(double jointAngle, double jointAngularVelocity, double activation, TorqueMuscleInfo &updTorqueMuscleInfoStruct) const
void setPassiveTorqueScale(double passiveTorqueScale)
double mSignOfJointTorque
double calcFiberAngleGivenNormalizedPassiveTorque(double normPassiveFiberTorque, double blendingVariable, double passiveTorqueAngleCurveOffset) const
void setPassiveTorqueAngleCurveBlendingVariable(double blendingVariable)
double mPassiveCurveAngleOffset
void setName(std::string &name)
bool mUseTabularMaxActiveIsometricTorque
static double const Anderson2007Table3Std[36][14]
JointTorqueSet::item mJointTorque
double calcFiberAngle(double jointAngle) const
double calcJointTorque(double jointAngle, double jointAngularVelocity, double activation) const
void fitPassiveTorqueScale(double jointAngle, double passiveFiberTorque)
bool mMuscleCurvesAreDirty
void printJointTorqueProfileToFile(const std::string &path, const std::string &fileNameWithoutExtension, int numberOfSamplePoints)
RigidBodyDynamics::Math::VectorNd mAnderson2007c1c2c3c4c5c6
double getMaximumActiveIsometricTorque() const
void setMaximumActiveIsometricTorque(double maxIsometricTorque)
double mPassiveTorqueScale
double getJointAngleAtOneNormalizedPassiveIsometricTorque() const
void setTorqueVelocityMultiplierAtHalfOmegaMax(double tvAtHalfOmegaMax)
void setTorqueAngularVelocityCurveBlendingVariable(double blendingVariable)
double getTorqueVelocityMultiplierAtHalfOmegaMax() const
double getNormalizedDampingCoefficient() const
const RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction & getPassiveTorqueAngleCurve() const
double mAngleAtSmallestNormPassiveTorque
void calcTorqueMuscleDataFeatures(RigidBodyDynamics::Math::VectorNd const &jointTorque, RigidBodyDynamics::Math::VectorNd const &jointAngle, RigidBodyDynamics::Math::VectorNd const &jointAangularVelocity, double activeTorqueAngleBlendingVariable, double passiveTorqueAngleBlendingVariable, double torqueVelocityBlendingVariable, double activeTorqueAngleAngleScaling, double activeTorqueAngleAtOneNormTorque, double passiveTorqueAngleCurveOffset, double maxAngularVelocity, double maxActiveIsometricTorque, TorqueMuscleDataFeatures &tmf) const
double mMaxActiveIsometricTorque
double mAngleAtOneNormActiveTorque
double calcJointAngle(double fiberAngle) const
void updateTorqueMuscleCurves()
double getTorqueAngularVelocityCurveBlendingVariable() const
double getJointAngleSign() const
Millard2016TorqueMuscle(DataSet::item dataSet, const SubjectInformation &subjectInfo, int jointTorque, double jointAngleOffsetRelativeToDoxygenFigures, double signOfJointAngleRelativeToDoxygenFigures, double signOfJointTorqueToDoxygenFigures, const std::string &name)
static const double mTaLambdaMax
const RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction & getActiveTorqueAngleCurve() const
void setFittedParameters(const TorqueMuscleParameterFittingData &fittedParameters)
double getJointAngleAtMaximumActiveIsometricTorque() const
double calcInverseBlendedCurveValue(double blendedCurveValue, double argGuess, double blendingVariable, double maximumBlendingValue, RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction const &curve) const
RigidBodyDynamics::Math::VectorNd mGymnastParams
double getActiveTorqueAngleCurveWidth() const
static double const Anderson2007Table3Mean[36][14]
GenderSet::item getGender()
double mTorqueVelocityMultiplierAtHalfOmegaMax
void setNormalizedDampingCoefficient(double beta)
double calcJointAngularVelocity(double fiberAngularVelocity) const
double getSubjectHeight()
double getJointTorqueSign() const
double calcMaximumActiveIsometricTorqueScalingFactor(double jointAngle, double jointAngularVelocity, double activation, double jointTorque) const
Millard2016TorqueMuscle()
void setActiveTorqueAngleCurveBlendingVariable(double blendingVariable)
double getJointAngleOffset() const
double getPassiveTorqueScale() const
double getMaximumConcentricJointAngularVelocity() const
double getJointAngleAtSmallestNormalizedPassiveIsometricTorque() const
double getPassiveCurveAngleOffset() const
RigidBodyDynamics::Math::VectorNd mAnderson2007b1k1b2k2
const RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction & getTorqueAngularVelocityCurve() const
void setPassiveCurveAngleOffset(double passiveCurveAngleOffsetVal)
RigidBodyDynamics::Addons::Geometry::SmoothSegmentedFunction mTpCurve
static const struct RigidBodyDynamics::Addons::Muscle::Anderson2007 Anderson2007
static const struct RigidBodyDynamics::Addons::Muscle::DataSet DataSet
static const struct RigidBodyDynamics::Addons::Muscle::GenderSet GenderSet
static const struct RigidBodyDynamics::Addons::Muscle::AgeGroupSet AgeGroupSet
static const struct RigidBodyDynamics::Addons::Muscle::JointTorqueSet JointTorqueSet
static const struct RigidBodyDynamics::Addons::Muscle::Gymnast Gymnast
static const char * names[]
static const char * JointTorqueNames[]
static const char * AgeGroupNames[]
static const char * GenderNames[]
static const char * names[]
static const char * names[]
@ ShoulderHorizontalAdduction
@ ShoulderExternalRotation
@ ShoulderHorizontalAbduction
@ ShoulderInternalRotation
static const char * JointTorqueNames[]
@ TvAtHalfMaxConcentricVelocity
@ ActiveAngleAtOneNormTorque
@ TvAtMaxEccentricVelocity
@ ActiveAngularStandardDeviation
@ PassiveAngleAtZeroTorque
@ PassiveAngleAtOneNormTorque
static const char * AgeGroupNames[]
static const char * GenderNames[]
static const char * names[]
@ ShoulderHorizontalAdduction
@ ShoulderExternalRotation
@ ShoulderHorizontalAbduction
@ ShoulderInternalRotation
AgeGroupSet::item ageGroup
TorqueMuscleSummary summaryAtMinActivation
TorqueMuscleSummary summaryAtMaxPassiveTorqueAngleMultiplier
TorqueMuscleSummary summaryAtMaxActivation
unsigned int indexOfMaxPassiveTorqueAngleMultiplier
unsigned int indexOfMaxActivation
unsigned int indexOfMinActivation
double jointAngularVelocity
double fiberTorqueAngularVelocityMultiplier
double DfiberPassiveTorqueAngleMultiplier_DangleOffset
double DjointTorque_DactiveTorqueAngleBlendingVariable
First derivatives for the fitting algorithm.
RigidBodyDynamics::Math::VectorNd fittingInfo
double fiberActiveTorqueAngleMultiplier
double DfiberPassiveTorqueAngleMultiplier_DblendingVariable
double fiberPassiveTorque
double DjointTorque_DmaximumIsometricTorque
double DjointTorque_DactiveTorqueAngleAngleScaling
double DjointTorque_DjointAngularVelocity
double DjointTorque_DmaximumAngularVelocity
double DfiberTorqueAngularVelocityMultiplier_DblendingVariable
double fiberDampingTorque
double fiberPassiveTorqueAngleMultiplier
double DjointTorque_DtorqueAngularVelocityBlendingVariable
double fiberNormDampingTorque
double DjointTorque_DpassiveTorqueAngleCurveAngleOffset
double DjointTorque_DjointAngle
double DjointTorque_Dactivation
double fiberPassiveElasticTorque
double DfiberActiveTorqueAngleMultiplier_DblendingVariable
double DjointTorque_DpassiveTorqueAngleBlendingVariable
double fiberAngularVelocity
TorqueMuscleSummary summaryDataAtMinimumActivation
TorqueMuscleParameterFittingData()
double maximumAngularVelocity
double passiveTorqueAngleCurveOffset
unsigned int indexAtMinimumActivation
double passiveTorqueAngleBlendingVariable
unsigned int indexAtMaxPassiveTorqueAngleMultiplier
TorqueMuscleSummary summaryDataAtMaximumActivation
double activeTorqueAngleAngleScaling
double maximumActiveIsometricTorque
double activeTorqueAngleBlendingVariable
double torqueVelocityBlendingVariable
bool isTorqueMuscleActive
TorqueMuscleSummary summaryDataAtMaximumPassiveTorqueAngleMultiplier
unsigned int indexAtMaximumActivation
double fiberTorqueAngularVelocityMultiplier
double fiberActiveTorqueAngleMultiplier
double fiberPassiveTorqueAngleMultiplier
double fiberNormalizedDampingTorque
double fiberAngularVelocity