MyoHub / myoconverter

A tool to convert opensim 4.0+ MSK models into MuJoCo format with optimized muscle kinematics and kinetics
Apache License 2.0
62 stars 5 forks source link

Conversion looping #38

Open M0rg4n3 opened 1 month ago

M0rg4n3 commented 1 month ago

Hello, I'm trying to convert a back model from OpenSim to MuJoCo using myoconverter. The .osim model, geometry folder and python conversion file are attached. The conversion starts good but then it seems to enter a loop and never go out. The conversion process is attached to. Be carefull to make it work until the loop you sould install numpy 1.22.4 and replace the CoordinateCouplerConstraint file by the one attached. attached.zip Thanks

aikkala commented 1 month ago

@rogervankanten @HuaweiWang it seems like our conda env is broken -- there's a pandas version that is not compatible with numpy=1.21.5 currently in the conda env file. I'm struggling to create a working conda env, and hence can't test the problem presented in this issue. Would either of you have time to first look into the issue with numpy?

HuaweiWang commented 1 month ago

@aikkala I have merged the numpy update (from @rogervankanten ) to the 'development' branch. You can try to build the env from their.

rogervankanten commented 1 month ago

@HuaweiWang @aikkala Maybe my bas, but I'm still in the process of testing my feature branch. It's proven very difficult to master all the combinations and dependencies. Opensim 4.4 Conda package for Python 3.10 installs Numpy 1.21. Colab uses Python 3.10, but installs Numpy 1.23.5.

aikkala commented 3 weeks ago

@rogervankanten @HuaweiWang I've added a working conda env to the development branch (bumped python to 3.11, I don't think there is any reason why we should use 3.10?).

I had a look at this issue, but couldn't find any obvious reason for the looping behaviour -- it has something to do with the way bodies and joints are parsed, where we assume the model is a kinematic chain that the parser follows. Unfortunately I'm really pressed for time right now, so I'll have to look into this again later if/when I have time. Any help in debugging this would be greatly appreciated.