MocoCasADiSolver is not available
MocoCasADiSolver is not available
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
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
- Attachments
-
- Screenshot_CasadiUnavailable.png (322.15 KiB) Viewed 11943 times
- Nicholas Bianco
- Posts: 1026
- Joined: Thu Oct 04, 2012 8:09 pm
Re: MocoCasADiSolver is not available
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
You will also need to add the "\bin" directory of the OpenSim install to your PATH.
Best,
Nick
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 .
Best,
Nick
Re: MocoCasADiSolver is not available
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
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
- Nicholas Bianco
- Posts: 1026
- Joined: Thu Oct 04, 2012 8:09 pm
Re: MocoCasADiSolver is not available
Possibly. If you create a fresh conda environment you can test the install instructions independent of your current Python environment.Perhaps I don't have this problem on my computer due to having previously installed for Python in this way?
- Tylan Templin
- Posts: 40
- Joined: Mon Jan 15, 2018 10:55 am
Re: MocoCasADiSolver is not available
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
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
- Nicholas Bianco
- Posts: 1026
- Joined: Thu Oct 04, 2012 8:09 pm
Re: MocoCasADiSolver is not available
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
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
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
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
- Nicholas Bianco
- Posts: 1026
- Joined: Thu Oct 04, 2012 8:09 pm
Re: MocoCasADiSolver is not available
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
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
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
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
- Nicholas Bianco
- Posts: 1026
- Joined: Thu Oct 04, 2012 8:09 pm
Re: MocoCasADiSolver is not available
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
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