|
a |
|
b/Tools/AnyMocap/InverseDynamicSettings.any |
|
|
1 |
Main.Studies.InverseDynamicStudy = { |
|
|
2 |
|
|
|
3 |
InitialConditions.KinematicTol ??= 1e-2; |
|
|
4 |
InitialConditions.SolverType ??= KinSolOverDeterminate; |
|
|
5 |
InitialConditions.UseStartGuessOnOff ??= On; |
|
|
6 |
|
|
|
7 |
Kinematics.UseStartGuessOnOff ??= Off; |
|
|
8 |
Kinematics.KinematicTol ??= 1e-5; |
|
|
9 |
|
|
|
10 |
Kinematics.OPERATION_DISPLAY_PRIORITY(PriorityLow); |
|
|
11 |
|
|
|
12 |
#if MOCAP_USE_GRF_PREDICTION == ON |
|
|
13 |
// GRF prediction needs UpperBound = Off, because this |
|
|
14 |
// prevents solver change when residual "muscles" gets overloaded. |
|
|
15 |
InverseDynamics.Criterion.UpperBoundOnOff = Off; |
|
|
16 |
#endif |
|
|
17 |
|
|
|
18 |
|
|
|
19 |
InitialConditions.PreOperation = |
|
|
20 |
{ |
|
|
21 |
AnyOperation &SetView = Main.ModelSetup.Views.SetViewMacros.InverseDynamicView; |
|
|
22 |
}; |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
// Add the Analysis to the Main.RunAnalysis sequence |
|
|
26 |
Main.RunAnalysis.InverseDynamics.SubOperations = |
|
|
27 |
{ |
|
|
28 |
#if (BM_LEG_MUSCLES_RIGHT == _MUSCLES_3E_HILL_) | (BM_LEG_MUSCLES_LEFT == _MUSCLES_3E_HILL_) | (BM_ARM_MUSCLES_RIGHT == _MUSCLES_3E_HILL_) | (BM_ARM_MUSCLES_LEFT == _MUSCLES_3E_HILL_) |
|
|
29 |
AnyOperationSequence &MuscleCalibration = Main.HumanModel.Calibration.CalibrationSequence; |
|
|
30 |
#endif |
|
|
31 |
|
|
|
32 |
AnyOperation &RunInverseDynamics = ....InverseDynamics; |
|
|
33 |
}; |
|
|
34 |
|
|
|
35 |
|
|
|
36 |
#ifndef N_STEP |
|
|
37 |
#define N_STEP Main.ModelSetup.TrialSpecificData.nStep |
|
|
38 |
#endif |
|
|
39 |
|
|
|
40 |
#ifndef T_END |
|
|
41 |
#define T_END Main.ModelSetup.TrialSpecificData.tEnd |
|
|
42 |
#endif |
|
|
43 |
|
|
|
44 |
#ifndef T_START |
|
|
45 |
#define T_START Main.ModelSetup.TrialSpecificData.tStart |
|
|
46 |
#endif |
|
|
47 |
|
|
|
48 |
AnyVar tFrame = iffun(gtfun(Main.ModelSetup.TrialSpecificData.nStep, 1), (T_END-T_START)/max({Main.ModelSetup.TrialSpecificData.nStep-1,1}), 0.01); |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
Kinematics.ApproxVelAccPerturb = min({1.0/C3DData.Header.VideoFrameRate, tFrame}); |
|
|
52 |
InitialConditions.ApproxVelAccPerturb = Kinematics.ApproxVelAccPerturb ; |
|
|
53 |
|
|
|
54 |
tStart = min({T_START+3*tFrame, T_END}); |
|
|
55 |
tEnd = max({T_END-3*tFrame, tStart}); |
|
|
56 |
nStep= max({N_STEP-6, 1}); |
|
|
57 |
|
|
|
58 |
}; |