Page 1 of 2

MocoCasADiSolver is not available

Posted: Sun Apr 14, 2024 11:53 pm
by aafox
Hi Moco Team,

I am working with a student on some analysis with Moco and they are having some troubles with the Python install of OpenSim/Moco. They have run into this problem with both 4.4 and 4.5 having installed through the conda package, where the CasADi solver is not available (see attached screenshot when trying to solve a problem). I haven't been able to troubleshoot this as I can't replicate the issue on my own computer, and I've never had this problem come up when installing via conda - and I also thought all dependencies were dealt with when doing so.

Any advice would be much apreciated.

Aaron

Re: MocoCasADiSolver is not available

Posted: Mon Apr 15, 2024 12:02 pm
by nbianco
Hi Aaron,

The OpenSim conda packages currently do not include Moco since we are still working through the details of building Moco's dependencies in the conda framework. But yes, we are working on it, so stay tuned!

For now, you should install OpenSim into your Python environments (conda or otherwise) using the typical approach. Navigate to the folder 'sdk\Python' in your OpenSim install directory and in your Python environment call

Code: Select all

python -m pip install .
You will also need to add the "\bin" directory of the OpenSim install to your PATH.

Best,
Nick

Re: MocoCasADiSolver is not available

Posted: Mon Apr 15, 2024 4:27 pm
by aafox
Thanks Nick.

Perhaps I don't have this problem on my computer due to having previously installed for Python in this way?

I'll take this solution and see if it fixes the problem.

Aaron

Re: MocoCasADiSolver is not available

Posted: Tue Apr 16, 2024 9:57 am
by nbianco
Perhaps I don't have this problem on my computer due to having previously installed for Python in this way?
Possibly. If you create a fresh conda environment you can test the install instructions independent of your current Python environment.

Re: MocoCasADiSolver is not available

Posted: Fri Apr 26, 2024 7:28 pm
by tnt845
Hi Nick,

I am getting a similar error when running the exampleMocoTrack.py script.

I created a fresh python 3.11 env and conda installed opensim.
Then installed opensim from the sdk/Python folder as you described above
and added C:\OpenSim 4.5\bin to my environment variables.

Still getting:

RuntimeError: std::exception in 'OpenSim::MocoInverseSolution OpenSim::MocoInverse::solve() const': MocoCasADiSolver is not available.
Thrown at MocoCasADiSolver.cpp:455 in solveImpl().

Any thoughts why that might be persisting?

Thanks,

Ty

Re: MocoCasADiSolver is not available

Posted: Sat Apr 27, 2024 10:32 am
by nbianco
Hi Tylan,

Moco is not currently available through the OpenSim conda package. We are working on including Moco support in the conda packages, so stay tuned. In the meantime, you can install OpenSim (downloaded from SimTK) into your Python environment manually, as described above.

-Nick

Re: MocoCasADiSolver is not available

Posted: Tue Apr 30, 2024 6:14 pm
by aafox
Hi Nick,

Quick question as a follow up to this - what is the difference between the opensim and opensim-moco conda packages? I have been installing the opensim-moco version in the conda environments I create and this seems to carry all the Moco features (e.g. Casadi solver) with it.

Aaron

Re: MocoCasADiSolver is not available

Posted: Fri May 03, 2024 8:09 am
by nbianco
Hi Aaron,

Yes, thanks for pointing that out. The opensim-moco package has install options for OpenSim 4.4, 4.4.1, and 4.5 on Windows only. We are working on support for Mac and Linux as well in a unified install process.

-Nick

Re: MocoCasADiSolver is not available

Posted: Wed Jun 26, 2024 4:22 pm
by aafox
Hi Nick,

Mohammadreza pointed out in a thread over on the main OpenSim forum that there is a Linux package available on the opensim-admin channel for OpenSim 4.5. Is this what you are currently working on as supportfor Mac/Linux, and would it be stable to use? As you'll see from the thread I linked above, I'm looking for an easy Linux solution for the HPC cluster I've gained access to at my institution.

Aaron

Re: MocoCasADiSolver is not available

Posted: Wed Jun 26, 2024 5:19 pm
by nbianco
Hi Aaron,

I can't guarantee any packages on opensim_admin to be totally stable, but it should work fine for your purposes. Very soon we will have officially conda pacakges on the opensim-org channel, so stay tuned for that too.

Best,
Nick