OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
-
Allison Kinney
- Posts: 43
- Joined: Thu Aug 23, 2007 8:41 am
Post
by Allison Kinney » Tue Feb 04, 2020 10:03 am
Hi Moco team,
We were working with the MarkerTracking10DOF example and received an error related to the MarkersReference constructor from Line 91 of the example code:
Code: Select all
markersRef = MarkersReference(fullfile(scriptdir, 'marker_trajectories.trc'));
Error: No constructor 'org.opensim.modeling.MarkersReference' with matching signature found.
We think we found a solution and fixed the code with the following lines that allowed the code to run.
Code: Select all
markersRef = MarkersReference();
markersRef.set_marker_file(fullfile(scriptdir, 'marker_trajectories.trc'));
With this change, the code runs and we believe we got a reasonable solution. We wanted to verify that the fix we found was valid. Please let us know what you think and if you have any suggestions of another way to fix this error.
Thanks for your help,
Allison
Last edited by
Allison Kinney on Thu Apr 23, 2020 11:12 am, edited 1 time in total.
-
Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Post
by Christopher Dembia » Tue Feb 04, 2020 11:57 am
Hi, Allison!
Yes, that fix is correct. Thanks for bringing this to our attention.
FYI, there is nothing wrong with using this example but this example was written before MocoTrack existed. Consider using MocoTrack instead; it should provide the same capabilities with fewer lines of code, and can handle marker tracking.
-
Allison Kinney
- Posts: 43
- Joined: Thu Aug 23, 2007 8:41 am
Post
by Allison Kinney » Wed Feb 05, 2020 1:08 pm
Thanks for the help and suggestion. We will look into MocoTrack also.