opensim-gui icon indicating copy to clipboard operation
opensim-gui copied to clipboard

Rotating experimental data fails

Open A-Artemis opened this issue 11 months ago • 5 comments

Steps to reproduce

  1. Open a .trc file by clicking File->Preview Experimental Data.
  2. Open the experimental data in the navigator to right click the .trc and click Transform...
  3. Rotate X by 90 degrees (I have tried Y and Z with angle [90, 180, 270, 360].
  4. Click on Save As... (I use the default name which is transformed_XXX.trc).
  5. Click on OK to close the dialogue box.
  6. Open the newly created transformed_XXX.trc file by clicking File->Preview Experimental Data.

Expected result

  • The transformed .trc is opened and can be seen in the Visualizer Window, and correctly rotated.

Actual result

  • The transformed data is not visible in VIsualizer Window. Below you can see both ExerimentalData_ in the Navigator but only 1 set of makers (this is from the original .trc) yet the markers of the new .trc are loaded. The floor and background is removed to see more of the environment. image

  • There is a chance that the saved transformed_XXX.trc is created but has 0 bytes. image

  • According to the documentation here it should be possible to view the rotation happen live with the use of the arrow keys, this does not work.

Environment and GUI version

  • OpenSim GUI version 4.5-2024-01-10-3b63585

  • Windows 11 x64

  • Data as a .txt so that it can be uploaded here. 35_34_mokka.txt

  • The data is taken from CMU Graphics Lab Motion Capture Database, subject 35 with motion 34. The .c3d data is downloaded and exported to a .trc with Mokka. This .trc is what I open in OpenSim.

  • I have had a lot of trouble using the CMU dataset with OpenSim (scaling and XYZ-framing issues). If there is a better workflow (in Python preferably) to handle experimental data then please let me know. My goal is to get the angles of each joint coordinate in the OpenSim model in a .csv, which can then be used for AI training. My current workflow is .c3d -> .trc -> Inverse Kinematics -> .mot -> .csv

A-Artemis avatar Mar 04 '24 20:03 A-Artemis

Hi, related to https://github.com/opensim-org/opensim-gui/issues/1385 and https://github.com/opensim-org/opensim-gui/issues/1344

mrrezaie avatar Mar 10 '24 08:03 mrrezaie

Visualizer rotation should be fixed by #1507 will reassess after ci. I would not use the GUI for such workflow, and go for all python solution utilizing jupyter notebooks and opensim as described here https://github.com/opensim-org/opensim-models/tree/master/notebooks I'd be happy to help you set this up, and would be wonderful if you "donate" the resulting script to the community (logistics TBD)

aymanhab avatar May 22 '24 21:05 aymanhab

The issue was rotating data is fixed in these build artifacts @A-Artemis and @mrrezaie https://github.com/opensim-org/opensim-gui/actions/runs/9198670131 While I couldn't reproduce the 0 size file, it's possible it's a downstream effect. Please check the artifacts and let me know.

aymanhab avatar May 23 '24 18:05 aymanhab

Hi @aymanhab, I tested the latest artifact and everything worked perfectly. Thanks for the fix.

mrrezaie avatar May 23 '24 19:05 mrrezaie

Awesome, thanks @mrrezaie for the quick turnaround 👍 and thanks @A-Artemis for reporting. Will merge after review

aymanhab avatar May 23 '24 20:05 aymanhab