-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 2par iteration 2 * add neutral angles * refactor positions matrices to be pointers and allow users to open in tree. add warning when npos does not match nstep * add abduction pos * refactor studies to avoid lower leg calibration errors * expand RoM studies for new cal method * fix wrong conditional logic * start new test subfolders * move deltoid test * move gui template tests * move thoracic tests * move abdominal test * refactor passive flexible test * refactor kinematic test * fix missing libdef files * mock new data structure in TLEM leg model * lower hip flexion RoM to avoid RecFem penetration * add main folder to empty test files * lower hip flexion to avoid recfem penetration in old cal routine * use local density as other segs * fix failing loads * fix path in moved tests * add strength test * fix missing file * fix double include * update leg cal interface to range of motion data * add range of motion def to trunk * add arm range of motion def * fix conditional logic * fic conditonals around calibration * add trunk cal test * upd existing cal study to run w. felx thorac * implement 3e mus mdls for spline defined trunk muscles * add known failures * change to ignore instead of known-failure * remove 3e models from ribcage muscles * adjust test files failing on warnings * convert pelvis-sacrum and ribcage muscles to simple muscle models * exclude pelvic floor muscles from calibration * change to Pm test in each RoM study * only ignore lower_body tests * fix missing quotes in .ini file * fix ignore path relative to test folder
- Loading branch information
Showing
72 changed files
with
5,268 additions
and
5,671 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* Range of Motion definition for the Arm */ | ||
|
||
AnyFolder RangeOfMotion = { | ||
AnyFolder Shoulder = { | ||
AnyVar MaxGlenohumeralFlexionAngle = 160; | ||
AnyVar MaxGlenohumeralExtensionAngle = -70; | ||
AnyVar MaxGlenohumeralAbductionAngle = 178; | ||
AnyVar MaxGlenohumeralAdductionAngle = -44; | ||
AnyVar MaxGlenohumeralExternalRotationAngle = 89; | ||
AnyVar MaxGlenohumeralInternalRotationAngle = 89; | ||
AnyVar MaxScapulaClaviculaElevationAngle = 40; | ||
AnyVar MaxScapulaClaviculaDepressionAngle = -5; | ||
AnyVar MaxScapulaClaviculaProtractionAngle = 15; | ||
AnyVar MaxScapulaClaviculaRetractionAngle = -36; | ||
}; | ||
|
||
AnyFolder Elbow = { | ||
AnyVar MaxFlexionAngle = 150; | ||
AnyVar MaxExtensionAngle = 0; | ||
AnyVar MaxPronationAngle = 90; | ||
AnyVar MaxSupinationAngle = -90; | ||
}; | ||
|
||
AnyFolder Wrist = { | ||
AnyVar MaxFlexionAngle = 85; | ||
AnyVar MaxExtensionAngle = -70; | ||
AnyVar MaxAbductionAngle = 20; | ||
AnyVar MaxAdductionAngle = -35; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
Body/AAUHuman/BodyModels/GenericBodyModel/BodyModel.ClassTemplates.any
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
Class Template for providing the folder structure of the body model | ||
*/ | ||
#class_template BodyModelFolderStructure() { | ||
AnyFolder Trunk = { | ||
}; | ||
AnyFolder Right = { | ||
AnyFolder ShoulderArm = { | ||
AnyFolder Shoulder = {}; | ||
AnyFolder Elbow = {}; | ||
AnyFolder Wrist = {}; | ||
}; | ||
AnyFolder Leg = { | ||
AnyFolder Hip = {}; | ||
AnyFolder Knee = {}; | ||
AnyFolder Ankle = {}; | ||
AnyFolder SubTalar = {}; | ||
}; | ||
}; | ||
AnyFolder Left = { | ||
AnyFolder ShoulderArm = { | ||
AnyFolder Shoulder = {}; | ||
AnyFolder Elbow = {}; | ||
AnyFolder Wrist = {}; | ||
}; | ||
AnyFolder Leg = { | ||
AnyFolder Hip = {}; | ||
AnyFolder Knee = {}; | ||
AnyFolder Ankle = {}; | ||
AnyFolder SubTalar = {}; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 119 additions & 0 deletions
119
Body/AAUHuman/BodyModels/GenericBodyModel/Calibration/CalibrationStudy.ClassTemplates.any
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
/** | ||
Class template for creating a model that can be used to calibrate the legs | ||
*/ | ||
#class_template LegCalibrationModel(Side, BodyModelRef) { | ||
AnyComponentDefinition CDef = {}; | ||
|
||
#var AnyObjectPtr HipPositions; | ||
#var AnyObjectPtr KneePositions; | ||
#var AnyObjectPtr AnklePositions; | ||
#var AnyObjectPtr SubTalarPositions; | ||
|
||
AnyFolder &Pelvis = BodyModelRef.Trunk.Segments.PelvisSeg; | ||
AnyFolder &Sacrum = BodyModelRef.Trunk.Segments.SacrumSeg; | ||
AnyFolder &Thorax = BodyModelRef.Trunk.Segments.ThoraxSeg; | ||
|
||
AnySeg &L1 = BodyModelRef.Trunk.Segments.L1Seg; | ||
AnySeg &L2 = BodyModelRef.Trunk.Segments.L2Seg; | ||
AnySeg &L3 = BodyModelRef.Trunk.Segments.L3Seg; | ||
AnySeg &L4 = BodyModelRef.Trunk.Segments.L4Seg; | ||
AnySeg &L5 = BodyModelRef.Trunk.Segments.L5Seg; | ||
|
||
AnyFolder &LumbarJoints = BodyModelRef.Trunk.Joints.Lumbar; | ||
|
||
AnyFolder &LegSegments = BodyModelRef.Side.Leg.Seg; | ||
AnyFolder &LegJoints = BodyModelRef.Side.Leg.Jnt; | ||
|
||
AnyFolder &Muscles = BodyModelRef.Side.Leg.Mus; | ||
|
||
// Constraints | ||
AnyFixedRefFrame ground = { | ||
AnyRefNode node = { | ||
ARel = ..Pelvis.Axes0; | ||
sRel = ..Pelvis.r0; | ||
}; | ||
}; | ||
|
||
AnyKinEq ThoraxFix = { | ||
AnyKinMeasure& PelvisThoraxExtension = BodyModelRef.Interface.Trunk.PelvisThoraxExtension; | ||
AnyKinMeasure& PelvisThoraxLateralBending = BodyModelRef.Interface.Trunk.PelvisThoraxLateralBending; | ||
AnyKinMeasure& PelvisThoraxRotation = BodyModelRef.Interface.Trunk.PelvisThoraxRotation; | ||
}; | ||
|
||
AnyKinEq PelvisFix = { | ||
AnyKinLinear Lin = { | ||
AnyRefFrame &ground = ..ground.node; | ||
AnyRefFrame &Pelvis = ..Pelvis; | ||
}; | ||
AnyKinRotational Rot = { | ||
Type = RotAxesAngles; | ||
AnyRefFrame &ground = ..ground.node; | ||
AnyRefFrame &Pelvis = ..Pelvis; | ||
}; | ||
}; | ||
|
||
AnyKinEqInterPolDriver Hip = { | ||
AnyKinRotational &Spherical = .BodyModelRef.Interface.Side.HipFlexion.HipMeasure; | ||
Type = PiecewiseLinear; | ||
T = linspace(0,1,SizesOf(Data)[1]); | ||
Data = Obj2Num(.HipPositions)' * pi/180; | ||
Reaction.Type = {Off, Off, Off}; | ||
AnyInt expect_nPos_to_match_nStep = warn(eqfun(NumElemOf(T), ..nStep), strformat("The number of calibration positions (Data) in the: " + NameOf(ObjGetParent(0)) + " driver does not match the number of positions (nStep) in the study.")); | ||
|
||
}; | ||
|
||
AnyKinEqInterPolDriver Knee = { | ||
AnyKinMeasure& Hinge = .BodyModelRef.Interface.Side.KneeFlexion; | ||
Type = PiecewiseLinear; | ||
T = linspace(0,1,SizesOf(Data)[1]); | ||
Data = {Obj2Num(.KneePositions)} * pi/180; | ||
Reaction.Type = {Off}; | ||
AnyInt expect_nPos_to_match_nStep = warn(eqfun(NumElemOf(T), ..nStep), strformat("The number of calibration positions (Data) in the: " + NameOf(ObjGetParent(0)) + " driver does not match the number of positions (nStep) in the study.")); | ||
|
||
}; | ||
|
||
AnyKinEqInterPolDriver Ankle = { | ||
AnyKinMeasure& Hinge = .BodyModelRef.Interface.Side.AnklePlantarFlexion; | ||
Type = PiecewiseLinear; | ||
T = linspace(0,1,SizesOf(Data)[1]); | ||
Data = {Obj2Num(.AnklePositions)} * pi/180; | ||
Reaction.Type = {Off}; | ||
AnyInt expect_nPos_to_match_nStep = warn(eqfun(NumElemOf(T), ..nStep), strformat("The number of calibration positions (Data) in the: " + NameOf(ObjGetParent(0)) + " driver does not match the number of positions (nStep) in the study.")); | ||
|
||
}; | ||
|
||
AnyKinEqInterPolDriver SubTalar = { | ||
AnyKinMeasure& Hinge = .BodyModelRef.Interface.Side.SubTalarEversion; | ||
Type = PiecewiseLinear; | ||
T = linspace(0,1,SizesOf(Data)[1]); | ||
Data = {Obj2Num(.SubTalarPositions)} * pi/180; | ||
Reaction.Type = {Off}; | ||
AnyInt expect_nPos_to_match_nStep = warn(eqfun(NumElemOf(T), ..nStep), strformat("The number of calibration positions (Data) in the: " + NameOf(ObjGetParent(0)) + " driver does not match the number of positions (nStep) in the study.")); | ||
|
||
}; | ||
}; | ||
|
||
|
||
/** | ||
Class template for creating calibrationstudies with same settings | ||
*/ | ||
#class_template LegCalibrationStudy( | ||
__CLASS__ = AnyBodyCalibrationStudy, | ||
BodyModelRef, | ||
Side, | ||
) { | ||
// Study settings | ||
FiberAndTendonLengthAdjustment.CalibrateTendonAtMaxForceOnOff = Off; | ||
Kinematics.SmallStepAssumptionOnOff = Off; | ||
InitialConditions.SmallStepAssumptionOnOff = Off; | ||
Kinematics.PosAnalysisOnlyOnOff = On; | ||
InitialConditions.PosAnalysisOnlyOnOff = On; | ||
|
||
LegCalibrationModel ModelRef(Side=Side, BodyModelRef=BodyModelRef) = { | ||
HipPositions = .HipPositions; | ||
KneePositions = .KneePositions; | ||
AnklePositions = .AnklePositions; | ||
SubTalarPositions = .SubTalarPositions; | ||
}; | ||
}; | ||
|
12 changes: 12 additions & 0 deletions
12
Body/AAUHuman/BodyModels/GenericBodyModel/Calibration/RValues.any
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
Folder containing different R values (ratios of muscle fiber length to optimal fiber | ||
length) for different purposes. | ||
*/ | ||
AnyFolder RValues = { | ||
AnyFloat RMinNoMuscleForce = 0.5; | ||
AnyFloat RMinDefault = 0.6; | ||
|
||
AnyFloat RMaxDefault = 1.2; | ||
AnyFloat RMaxActiveStretching = 1.3; | ||
AnyFloat RMaxPassiveForceEqualToFMax = 1.5; | ||
}; |
Oops, something went wrong.