opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
783 stars 316 forks source link

OpenSense_CalibrateModel.py #3651

Open oYuzi opened 9 months ago

oYuzi commented 9 months ago

Specs:

OpenSim 4.4 Python 3.8.18 Anaconda 2022.10-Windows-x86_64 Windows 10 64 bit system I followed the directions under "Step-by-step instructions when using Anaconda with OpenSim 4.3+" on the opensim scripting in python page: https://simtk-confluence.stanford.edu:8443/display/OpenSim/Scripting+in+Python#ScriptinginPython-SpecialinstructionsforPython3.8+onWindows:

I opened OpenSim so that it moved the Resources folder into my Documents folder. I also created my environment according to the .yml file given and followed the directions to install opensim after activating the opensim_scripting env.

When I run the OpenSenseExample:

python OpenSense_IMUDataConverter.py (runs fine) python OpenSense_CalibrateModel.py (it seems to segmentation fault when doing the imuPlacer.run(visulizeCalibration); but works if visulizeCalibration is False) python OpenSense_OrientationTracking.py (it seems to segmentation fault when doing the imuIK.run(visualizeTracking); but works if visualizeTracking is False)

[info] Loaded model Rajagopal_2015 from file Rajagopal_2015.osim [info] Heading correction computed to be 113.307 degs about ground Y. [info] Processing torso_imu [info] Computed offset for torso_imu [info] Offset is [0.315294,-0.0237375,0.948697] [0.94644,0.0811645,-0.312513] [-0.0695822,0.996418,0.0480568]

[info] Creating offset frame for torso_imu [info] Added offset frame for torso_imu. [info] torso_imu offset computed from torso_imu data from file. [info] Processing pelvis_imu [info] Computed offset for pelvis_imu [info] Offset is [0.280953,0.00157552,0.95972] [0.957527,0.0671338,-0.280421] [-0.0648715,0.997743,0.0173528]

[info] Creating offset frame for pelvis_imu [info] Added offset frame for pelvis_imu. [info] pelvis_imu offset computed from pelvis_imu data from file. [info] Processing tibia_r_imu [info] Computed offset for tibia_r_imu [info] Offset is [0.0965278,0.977377,-0.188191] [0.989909,-0.113978,-0.0842017] [-0.103746,-0.178164,-0.978516]

[info] Creating offset frame for tibia_r_imu [info] Added offset frame for tibia_r_imu. [info] tibia_r_imu offset computed from tibia_r_imu data from file. [info] Processing femur_r_imu [info] Computed offset for femur_r_imu [info] Offset is [-0.0408079,0.969041,-0.243505] [0.996553,0.0570898,0.0601841] [0.0722225,-0.24021,-0.968031]

[info] Creating offset frame for femur_r_imu [info] Added offset frame for femur_r_imu. [info] femur_r_imu offset computed from femur_r_imu data from file. [info] Processing tibia_l_imu [info] Computed offset for tibia_l_imu [info] Offset is [0.0950796,-0.941402,0.323607] [0.992984,0.0667322,-0.0976203] [0.070305,0.330618,0.941142]

[info] Creating offset frame for tibia_l_imu [info] Added offset frame for tibia_l_imu. [info] tibia_l_imu offset computed from tibia_l_imu data from file. [info] Processing femur_l_imu [info] Computed offset for femur_l_imu [info] Offset is [0.15939,-0.980766,0.112659] [0.985443,0.164899,0.0413474] [-0.0591295,0.104428,0.992773]

[info] Creating offset frame for femur_l_imu [info] Added offset frame for femur_l_imu. [info] femur_l_imu offset computed from femur_l_imu data from file. [info] Processing calcn_r_imu [info] Computed offset for calcn_r_imu [info] Offset is [0.132853,0.838951,-0.527742] [0.052645,-0.537683,-0.841502] [-0.989737,0.0840129,-0.115599]

[info] Creating offset frame for calcn_r_imu [info] Added offset frame for calcn_r_imu. [info] calcn_r_imu offset computed from calcn_r_imu data from file. [info] Processing calcn_l_imu [info] Computed offset for calcn_l_imu [info] Offset is [0.055168,-0.866604,-0.495938] [0.00919381,0.497114,-0.867636] [0.998435,0.0433062,0.0353922]

[info] Creating offset frame for calcn_l_imu [info] Added offset frame for calcn_l_imu. [info] calcn_l_imu offset computed from calcn_l_imu data from file.

Process finished with exit code -1073741819 (0xC0000005)

I'm not sure what is causing the process fault, let me know if you need any more clarification or if I should try anything. Thanks!

aymanhab commented 8 months ago

Can you try version 4.5 to find out if the visualization option works? just be aware that this may be machine specific since the API visualizer uses third party libraries that may or maynot be accessible through the conda environment. You'll need to change the environment file to use python 3.9 since the conda packages for OpenSim 4.5 start at Python 3.9. Thank you