MocoOutputTrackingGoal

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
POST REPLY
User avatar
mohadeseh shafie
Posts: 16
Joined: Fri Feb 19, 2021 4:39 pm

MocoOutputTrackingGoal

Post by mohadeseh shafie » Fri Jul 07, 2023 11:15 pm

Hi all,

I am getting the following error when using the MocoOutputTrackingGoal() function, I have installed the latest version of Moco and OpenSim. What is the cause?

MATLAB error: Unrecognized function or variable 'MocoOutputTrackingGoal'.

Thank you in advance.
Mohadesh

User avatar
Nicholas Bianco
Posts: 1041
Joined: Thu Oct 04, 2012 8:09 pm

Re: MocoOutputTrackingGoal

Post by Nicholas Bianco » Mon Jul 10, 2023 1:12 pm

Hi Mohadesh,

I just tested OpenSim 4.4 locally and was able to create a MocoOutputTrackingGoal. What version do you have installed?

-Nick

User avatar
mohadeseh shafie
Posts: 16
Joined: Fri Feb 19, 2021 4:39 pm

Re: MocoOutputTrackingGoal

Post by mohadeseh shafie » Tue Jul 11, 2023 1:00 am

Hi Nick,

I have three versions installed, but I used version 4.4 to link with MATLAB.

Mohadeseh
Attachments
Annotation 2023-07-11 112905.png
Annotation 2023-07-11 112905.png (45.62 KiB) Viewed 342 times

User avatar
Nicholas Bianco
Posts: 1041
Joined: Thu Oct 04, 2012 8:09 pm

Re: MocoOutputTrackingGoal

Post by Nicholas Bianco » Wed Jul 12, 2023 9:49 am

Hi Mohadesh,

The issue is that Moco 0.4 is at the top of your Windows PATH, which means that Matlab will find this version before OpenSim 4.4. If you remove that PATH entry, things should work as expected, although it might be worth trying to reinstall to double check.

Best,
Nick

User avatar
mohadeseh shafie
Posts: 16
Joined: Fri Feb 19, 2021 4:39 pm

Re: MocoOutputTrackingGoal

Post by mohadeseh shafie » Wed Jul 12, 2023 1:14 pm

Thanks Nick, my problem is solved.

Mohadeseh

User avatar
mohadeseh shafie
Posts: 16
Joined: Fri Feb 19, 2021 4:39 pm

Re: MocoOutputTrackingGoal

Post by mohadeseh shafie » Thu Jul 13, 2023 6:05 am

Hi Nick,

By removing the path, a new problem has arisen, and Moco does not complete the solution, ending with the message: "EXIT: Restoration Failed!"

Mohadeseh

User avatar
Nicholas Bianco
Posts: 1041
Joined: Thu Oct 04, 2012 8:09 pm

Re: MocoOutputTrackingGoal

Post by Nicholas Bianco » Thu Jul 13, 2023 4:11 pm

Hi Mohadesh,

That means that the problem failed, most likely because it couldn't meet the constraints. Try adding strong CoordinateActuators to all DOFs and see if that converges.

-Nick

User avatar
mohadeseh shafie
Posts: 16
Joined: Fri Feb 19, 2021 4:39 pm

Re: MocoOutputTrackingGoal

Post by mohadeseh shafie » Fri Jul 14, 2023 11:19 pm

Hi Nick,

When the Moco path exists in Windows at the beginning, the Moco run succeeds, and I receive an error when running the MocoOutputTrackingGoal function. However, if the Moco path is removed, leaving only the OpenSIM 4.4 path, the Moco solution ends at the stage I sent the photo, and the solution is not completed. Nonetheless, the MocoOutputTrackingGoal function executes correctly. I have uninstalled and reinstalled multiple times, but unfortunately, the issue remains unresolved. Please guide me. Thank you.

Mohadeseh
Attachments
Annotation 2023-07-15 093333.png
Annotation 2023-07-15 093333.png (27.98 KiB) Viewed 268 times

User avatar
mohadeseh shafie
Posts: 16
Joined: Fri Feb 19, 2021 4:39 pm

Re: MocoOutputTrackingGoal

Post by mohadeseh shafie » Sat Jul 15, 2023 12:16 am

In the above message, I mean the problem that is completely solved with Moco is a mocoTrack problem, and I test the MocoOutputTrackingGoal() function separately, and I have not entered it yet.

Mohadeseh

POST REPLY