|
a |
|
b/README.md |
|
|
1 |
[](http://unmaintained.tech/) |
|
|
2 |
|
|
|
3 |
# ROSE Motion |
|
|
4 |
|
|
|
5 |
Zenodo Code Archive: [](https://doi.org/10.5281/zenodo.4344201) MDPI Sensors Article: [](https://doi.org/10.3390/s21041199) |
|
|
6 |
|
|
|
7 |
LeapMotion recording, export to BVH and Anybody |
|
|
8 |
 |
|
|
9 |
|
|
|
10 |
## Structure / Actions |
|
|
11 |
|
|
|
12 |
* **Record** |
|
|
13 |
Plug in the Leap Motion Controller and make a recording of the right hand |
|
|
14 |
* **Settings** |
|
|
15 |
* Setting "Frames per second" defines the minimum time delta between to recorded frames |
|
|
16 |
* Checking "Animate" will open the bvh animation after recording, a slider can be used to iterate through the frames |
|
|
17 |
* Setting the basis |
|
|
18 |
* **BVH Export** |
|
|
19 |
* Setting "Write BVH-File" will export the recorded motion to a BVH file defined in the next setting |
|
|
20 |
* Choose the filepath and name in "BVH File" |
|
|
21 |
* Setting "BVH Channels" will export either the channels XRotation, YRotation, ZRotation or also XPosition, YPosition, ZPosition |
|
|
22 |
* **Interpolation Vector** |
|
|
23 |
* Setting "Write interpolation files for AnyBody" will export the files |
|
|
24 |
* Elbow.any (pronation angle) |
|
|
25 |
* Finger[1-5].any (angles for all finger joints) |
|
|
26 |
* FingerLength.any (scaling of the finger lengths based on Leap Motion recording) |
|
|
27 |
* TimeSeries.any (equally spaced time points between 0 and 1) |
|
|
28 |
* Wrist.any (abduction and flexion angles for wrist) |
|
|
29 |
* Choose the template directory, the AnyBody interpolation files are written based on those files |
|
|
30 |
* Choose the output directory, here the above mentioned files will be saved to |
|
|
31 |
* **AnyBody** ([repository](https://github.com/seanschneeweiss/RoSeMotion-AnyBody)) |
|
|
32 |
* **Source files** |
|
|
33 |
* Choose "exisiting vector files" if interpolation files are already in the project folder <AnyBodyFolder>/Model/InterpolVec |
|
|
34 |
* Choose ".bvh file" to convert it to the interpolation files based on the templates in config/anybody_templates/ and copy into the AnyBody project folder <AnyBodyFolder>/Model/InterpolVec |
|
|
35 |
* Choose "Source (.any)" to copy all .any files into the AnyBody project folder <AnyBodyFolder>/Model/InterpolVec |
|
|
36 |
* Setting "HAND.Main.any" defines the main model file of the AnyBody project, which should be loaded for the analysis |
|
|
37 |
* Setting "Start Frame" will define the first frame to start with (cut off the frames before that). Leaving this option empty will set the first frame to 1 |
|
|
38 |
* Setting "End Frame" will define the last frame to end with (cut off the frames after that). Leaving this option empty will set the last frame to end |
|
|
39 |
* **Operations** |
|
|
40 |
* Select the operations which should be executed in AnyBody |
|
|
41 |
* Setting "Time steps" will rewrite alls lines which match ``nStep = xx;`` in the main model file. (e.g. ``nStep = 50;``) |
|
|
42 |
* **Results** |
|
|
43 |
* Selecting "plot after the analysis" will open an interactive plot for the results from the AnyBody analysis (joint angles) |
|
|
44 |
* Setting ".anydata.h5 file" will save the results from the AnyBody anaylsis to the specified file |
|
|
45 |
* Selecting "Open AnyBody" will open the AnyBody GUI after the analysis and will load the .anydata.h5 to make a replay available |
|
|
46 |
* **Converter** |
|
|
47 |
* Convert a given bvh file to the interpolation files used for AnyBody based on the templates in config/anybody_templates |
|
|
48 |
* **Animation** |
|
|
49 |
* Open a bvh file to animate it, a slider can be used to iterate through the frames |
|
|
50 |
|
|
|
51 |
### Basis setting |
|
|
52 |
|
|
|
53 |
* AnyBody initial basis -> select for correct movement within AnyBody |
|
|
54 |
* Leap Motion first frame basis -> select for exporting to BVH and use in other applications |
|
|
55 |
|
|
|
56 |
## Setup |
|
|
57 |
|
|
|
58 |
**Windows** |
|
|
59 |
|
|
|
60 |
* Install python (3.9.13) i.e. from |
|
|
61 |
|
|
|
62 |
https://www.python.org/downloads/ |
|
|
63 |
* Add python to system path during setup or follow the following instructions: |
|
|
64 |
|
|
|
65 |
https://github.com/BurntSushi/nfldb/wiki/Python-&-pip-Windows-installation |
|
|
66 |
|
|
|
67 |
* Install dependencies, by running the following in a command prompt: |
|
|
68 |
``` |
|
|
69 |
pip install -r requirements.txt |
|
|
70 |
``` |
|
|
71 |
You might have to use `pip3` instead, depending on your setup. |
|
|
72 |
|
|
|
73 |
* Start RoSeMotion |
|
|
74 |
``` |
|
|
75 |
python app/main.py |
|
|
76 |
``` |
|
|
77 |
|
|
|
78 |
--- |
|
|
79 |
Following python packages and versions were tested: |
|
|
80 |
* _Gooey_ (1.0.8.1) |
|
|
81 |
* _AnyPyTools_ (1.7.8) |
|
|
82 |
* _Matplotlib_ (3.3.3) (only for AnyBody results) |
|
|
83 |
* _Numpy_ (1.19.5) |
|
|
84 |
* _Pandas_ (1.1.5) |
|
|
85 |
* _pywin32_ (301) (only for window size automation) |
|
|
86 |
* _pywinauto_ (0.6.8) (only for window size automation) |
|
|
87 |
* _Scikit-learn_ (0.23.2) (only for BVH animation) |
|
|
88 |
* _wxPython_ ([4.1.2a1.dev5330+3e6be81d](https://wxpython.org/Phoenix/snapshot-builds/wxPython-4.1.2a1.dev5330+3e6be81d-cp39-cp39-win_amd64.whl)) |
|
|
89 |
|
|
|
90 |
## Credits |
|
|
91 |
* https://github.com/chriskiehl/Gooey |
|
|
92 |
* https://github.com/YPZhou/b3d/ |
|
|
93 |
* https://github.com/AnyBody-Research-Group/AnyPyTools |
|
|
94 |
* https://github.com/leapmotion/LeapCxx |
|
|
95 |
* https://github.com/omimo/PyMO |