|
a |
|
b/Tools/AnyMocap/DefaultJointLimits.any |
|
|
1 |
#ifndef MOCAP_EXCLUDE_DEFAULT_JOINT_LIMITS |
|
|
2 |
|
|
|
3 |
ModelSetup.MocapExtraDrivers = { |
|
|
4 |
|
|
|
5 |
/// This section adds kinematic joint limits for unrealistic joint angles. |
|
|
6 |
/// E.g. prevent the elbow from bending backwards etc. |
|
|
7 |
/// This makes the Kinematic solver more robust by restricting marker tracking |
|
|
8 |
/// solutions from non-physiologically positures |
|
|
9 |
AnyFolder DefaultJointLimits = |
|
|
10 |
{ |
|
|
11 |
#if BM_ARM_RIGHT |
|
|
12 |
KinLimitsDriver LimitElbowPronationRight( |
|
|
13 |
KinMeasure = ....HumanModel.BodyModel.Interface.Right.ElbowPronation |
|
|
14 |
) = { |
|
|
15 |
AnyFloat ROM ??= {-100, 100}; |
|
|
16 |
LowerLimit = ROM[0]; |
|
|
17 |
HighLimit = ROM[1]; |
|
|
18 |
MeasureConversion=180/pi; |
|
|
19 |
}; |
|
|
20 |
|
|
|
21 |
KinLimitsDriver LimitElbowFlexionRight( |
|
|
22 |
KinMeasure= ....HumanModel.BodyModel.Interface.Right.ElbowFlexion |
|
|
23 |
) = { |
|
|
24 |
AnyFloat ROM ??= {-10, 180}; |
|
|
25 |
LowerLimit = ROM[0]; |
|
|
26 |
HighLimit = ROM[1]; |
|
|
27 |
MeasureConversion=180/pi; |
|
|
28 |
}; |
|
|
29 |
|
|
|
30 |
KinLimitsDriver WristAbductionRight( |
|
|
31 |
KinMeasure= ....HumanModel.BodyModel.Interface.Right.WristAbduction |
|
|
32 |
) = { |
|
|
33 |
AnyFloat ROM ??= {-90, 90}; |
|
|
34 |
LowerLimit = ROM[0]; |
|
|
35 |
HighLimit = ROM[1]; |
|
|
36 |
MeasureConversion=180/pi; |
|
|
37 |
}; |
|
|
38 |
|
|
|
39 |
KinLimitsDriver WristFlexionRight( |
|
|
40 |
KinMeasure= ....HumanModel.BodyModel.Interface.Right.WristFlexion |
|
|
41 |
) = { |
|
|
42 |
AnyFloat ROM ??= {-120, 120}; |
|
|
43 |
LowerLimit = ROM[0]; |
|
|
44 |
HighLimit = ROM[1]; |
|
|
45 |
MeasureConversion=180/pi; |
|
|
46 |
}; |
|
|
47 |
#endif |
|
|
48 |
|
|
|
49 |
#if BM_ARM_LEFT |
|
|
50 |
KinLimitsDriver LimitElbowPronationLeft( |
|
|
51 |
KinMeasure= ....HumanModel.BodyModel.Interface.Left.ElbowPronation |
|
|
52 |
) = { |
|
|
53 |
AnyFloat ROM ??= {-100, 100}; |
|
|
54 |
LowerLimit = ROM[0]; |
|
|
55 |
HighLimit = ROM[1]; |
|
|
56 |
MeasureConversion=180/pi; |
|
|
57 |
}; |
|
|
58 |
|
|
|
59 |
KinLimitsDriver LimitElbowFlexionLeft( |
|
|
60 |
KinMeasure= ....HumanModel.BodyModel.Interface.Left.ElbowFlexion |
|
|
61 |
) = { |
|
|
62 |
AnyFloat ROM ??= {-10, 180}; |
|
|
63 |
LowerLimit = ROM[0]; |
|
|
64 |
HighLimit = ROM[1]; |
|
|
65 |
MeasureConversion=180/pi; |
|
|
66 |
}; |
|
|
67 |
|
|
|
68 |
KinLimitsDriver WristAbductionLeft( |
|
|
69 |
KinMeasure= ....HumanModel.BodyModel.Interface.Left.WristAbduction |
|
|
70 |
) = { |
|
|
71 |
AnyFloat ROM ??= {-90, 90}; |
|
|
72 |
LowerLimit = ROM[0]; |
|
|
73 |
HighLimit = ROM[1]; |
|
|
74 |
MeasureConversion=180/pi; |
|
|
75 |
}; |
|
|
76 |
|
|
|
77 |
KinLimitsDriver WristFlexionLeft( |
|
|
78 |
KinMeasure= ....HumanModel.BodyModel.Interface.Left.WristFlexion |
|
|
79 |
) = { |
|
|
80 |
AnyFloat ROM ??= {-120, 120}; |
|
|
81 |
LowerLimit = ROM[0]; |
|
|
82 |
HighLimit = ROM[1]; |
|
|
83 |
MeasureConversion=180/pi; |
|
|
84 |
}; |
|
|
85 |
#endif |
|
|
86 |
}; |
|
|
87 |
}; |
|
|
88 |
|
|
|
89 |
#endif |