OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
-
Tylan Templin
- Posts: 40
- Joined: Mon Jan 15, 2018 10:55 am
Post
by Tylan Templin » Wed Mar 30, 2022 2:09 pm
Hi everyone,
I am trying to add a MocoAcclerationTrackingGoal to an existing moco python script. However, I am getting an error in the line:
Code: Select all
acc_tracking = osim.MocoAccelerationTrackingGoal()
I am able to instantiate other MocoGoals like MocoContactTrackingGoal using a similar commands but not Acceleration Tracking (or MocoAngularVelocityTrackingGoal). I am using Moco version 0.4.0 is there a new version I am missing? Should these goals be available to python users?
Thanks for you help!
Ty
-
Nicholas Bianco
- Posts: 1000
- Joined: Thu Oct 04, 2012 8:09 pm
Post
by Nicholas Bianco » Wed Mar 30, 2022 2:18 pm
Hi Tylan,
This is an old bug that we've fixed in newer versions of Moco. The latest Moco versions are now included with the latest OpenSim releases. Just go to the SimTK page and download the latest version of OpenSim and you'll be good to go.
Best,
Nick
-
Tylan Templin
- Posts: 40
- Joined: Mon Jan 15, 2018 10:55 am
Post
by Tylan Templin » Thu Mar 31, 2022 5:26 am
Hi Nick,
In the "Step-by-step instructions when using Anaconda with OpenSim 4.3+" it looks like you are required to use python 3.8 is that correct? Is it possible to run with 3.7?
If not, does the installation allow multiple versions (i.e. would my current install work properly if I also install the new version in a different environment with Python 3.8?)
Thanks!
Ty
-
Nicholas Bianco
- Posts: 1000
- Joined: Thu Oct 04, 2012 8:09 pm
Post
by Nicholas Bianco » Thu Mar 31, 2022 10:00 am
Hi Tylan,
Your current install should work if you install 4.3 in a different environment with Python 3.8.
If you wanted to use Python 3.7 you could download OpenSim 4.2, as that includes the MocoAccelerationTrackingGoal fix too.
Best,
Nick
-
Tylan Templin
- Posts: 40
- Joined: Mon Jan 15, 2018 10:55 am
Post
by Tylan Templin » Thu Mar 31, 2022 12:24 pm
Hi Nick,
That's good to hear that I should be able to use both! I am now trying to install OpenSim 4.3 in the Python 3.8 environment, but when I import opensim I get the following error:
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\OpenSim 4.3\sdk\Python\opensim\__init__.py", line 8, in <module>
from .common import *
File "C:\OpenSim 4.3\sdk\Python\opensim\common.py", line 13, in <module>
from . import _common
ImportError: DLL load failed while importing _common: The specified procedure could not be found.
I have tried this with and without OpenSim 4.3/bin as a PATH variable and get the same error. I do have OpenSim 4.1 as a PATH variable. COuld that be causing an issue? Any other thoughts on what could be going wrong?
Thanks,
Ty
-
Nicholas Bianco
- Posts: 1000
- Joined: Thu Oct 04, 2012 8:09 pm
Post
by Nicholas Bianco » Mon Apr 04, 2022 1:18 pm
Hi Tylan,
Make sure the \bin path is the highest OpenSim in the PATH variable. You could remove all other OpenSim paths if you want to be absolutely sure.
If you have PYTHONPATH set to anything be sure to clear that too.
-Nick