Page 1 of 1

Error related to MarkersReference

Posted: Tue Feb 04, 2020 10:03 am
by alhall20
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

Re: Error related to MarkersReference

Posted: Tue Feb 04, 2020 11:57 am
by chrisdembia
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.

Re: Error related to MarkersReference

Posted: Wed Feb 05, 2020 1:08 pm
by alhall20
Thanks for the help and suggestion. We will look into MocoTrack also.