[bfdf16]: / Tests / recreate_mocap_intermediate_files.py

Download this file

66 lines (51 with data), 2.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
"""
Computes the intermediate files for the motion capture models in AMMR.
This a helper script to ensure that the intermediate files are up to date.
"""
import pathlib
import anypytools
import anypytools.macro_commands as mc
mocap_path = pathlib.Path(__file__).parent.parent / "Application/MocapExamples"
macros1 =[
[
mc.Load(mocap_path / r"Plug-in-gait_MultiTrial_StandingRef\Subjects\S1\S1_StandingRef\Main.any"),
mc.OperationRun(r"Main.RunParameterIdentification"),
],
[
mc.Load(mocap_path / r"Plug-in-gait_MultiTrial_StandingRef\Subjects\S2\S2_StandingRef\Main.any"),
mc.OperationRun(r"Main.RunParameterIdentification"),
],
[
mc.Load(mocap_path / r"Plug-in-gait_Simple\FullBody.main.any"),
mc.OperationRun(r"Main.RunParameterIdentification"),
mc.OperationRun(r"Main.RunAnalysis.MarkerTracking"),
],
[
mc.Load(mocap_path / r"Plug-in-gait_Simple\LowerExtremity.main.any"),
mc.OperationRun(r"Main.RunParameterIdentification"),
mc.OperationRun(r"Main.RunAnalysis.MarkerTracking"),
],
[
mc.Load(mocap_path / r"Plug-in-gait_Simple\FullBody_GRFPrediction.main.any"),
mc.OperationRun(r"Main.RunParameterIdentification"),
mc.OperationRun(r"Main.RunAnalysis.MarkerTracking"),
]
]
# for standingref in (mocap_path / "ADL_Gait_[beta]\Subjects").glob("**/*_ST/Main.any"):
# macros1.append([
# mc.Load(standingref),
# mc.OperationRun("Main.RunParameterIdentification"),
# ])
macros2 = [
[
mc.Load(mocap_path / r"Plug-in-gait_MultiTrial_StandingRef\Subjects\S1\S1_FlywheelSquat\Main.any"),
mc.OperationRun(r"Main.RunAnalysis.LoadParameters"),
mc.OperationRun(r"Main.RunAnalysis.MarkerTracking"),
],
]
# abc_path = r"C:\Program Files\AnyBody Technology\AnyBody.7.5_Beta\AnyBodyCon.exe"
abc_path = None
app1 = anypytools.AnyPyProcess(anybodycon_path=abc_path, num_processes=10)
app1.start_macro(macros1)
app2 = anypytools.AnyPyProcess(anybodycon_path=abc_path)
app2.start_macro(macros2)