Issue with runnning MocoTrack

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
Linjie Wang
Posts: 53
Joined: Wed Sep 30, 2015 1:06 am

Issue with runnning MocoTrack

Post by Linjie Wang » Fri Jul 19, 2024 6:51 am

Hi, there.

I'm trying Moco track in hope of getting a better dynamic consistently matched IK result. I tried the exampleMOcoTrack m file, it worked well and seem to get the outputs I am looking for. However, when I changed the osim model, grf and marker trc files into mine, I got an error message saying "java.lang.RuntimeException: *80: The supplied path contains invalid characters." Could you please help provide some suggestion please?

Im not sure if I understand correctly. Does the optimised IK/marker results help reduce the residual force for the static optimisation?

Thanks in advence.

Best regards,
Linjie

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

Re: Issue with runnning MocoTrack

Post by Nicholas Bianco » Fri Jul 19, 2024 1:46 pm

Hi Linjie,

The error message indicates that there are issues with your input files. Are you able to load your model and data in the GUI and visualize them?

Best,
Nick

User avatar
Linjie Wang
Posts: 53
Joined: Wed Sep 30, 2015 1:06 am

Re: Issue with runnning MocoTrack

Post by Linjie Wang » Fri Jul 19, 2024 2:58 pm

Hi, Nick.

Thank you very much for your reply.

Yes, I can load my model and input data (marker trc file and GRF mot file) in the GUI and can successsfully run through IK and ID analysis. Not sure if the problem was caused by the model conversion from OpenSim 3.3 to OpenSim 4.4? Just tried the conversion tool built in OpenSim 4.4 and then run the MocoTrack script, but the error message persists.

Best regards,
Linjie

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

Re: Issue with runnning MocoTrack

Post by Nicholas Bianco » Fri Jul 19, 2024 4:21 pm

Hi Linjie,

Could you provide the script that is failing and the line it is failing at?

Best,
Nick

User avatar
Linjie Wang
Posts: 53
Joined: Wed Sep 30, 2015 1:06 am

Re: Issue with runnning MocoTrack

Post by Linjie Wang » Sun Jul 21, 2024 7:57 am

Hi, Nick.

The script failed at the line of sovling 'solution = track.solveAndVisualize();'. The message was in the attached. I will attach the input data files and the model (too large to send through in this forum, but its just Rajagopal model with different marker names) to you via the email as well. Thanks a lot for your time and kind help.

Best regards,
Linjie
Attachments
error_message_moco_track_test.png
error_message_moco_track_test.png (19.2 KiB) Viewed 6867 times
grf_walk_RajagopalModel.xml
(2.13 KiB) Downloaded 450 times
Matlab_script.txt
(12.52 KiB) Downloaded 449 times

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

Re: Issue with runnning MocoTrack

Post by Nicholas Bianco » Mon Jul 22, 2024 1:30 pm

Hi Linjie,

You are receiving that error because one of the filepaths, either in your model or script, has an invalid (e.g., non-unicode) character. I recommend moving all needed files into one directory and remove absolute paths one by one until you find the culprit.

-Nick

User avatar
Linjie Wang
Posts: 53
Joined: Wed Sep 30, 2015 1:06 am

Re: Issue with runnning MocoTrack

Post by Linjie Wang » Wed Jul 24, 2024 2:22 am

Hi, Nick.

Thanks for your suggestion. But the error was there when I had already put all needed files in the same directory. If I am correct, I didn't use absolute paths in those files just as you did for the example files. I've also tried searching invalid characters in the model, input and the matlab moco track files by using Notepad++ ('Find Non-ASCII characters (128-255)'), but unfortunately, couldn't spot it at least by far. I wonder if you have other testing advice. Thanks in advance.

Best regards,
Linjie

User avatar
Linjie Wang
Posts: 53
Joined: Wed Sep 30, 2015 1:06 am

Re: Issue with runnning MocoTrack

Post by Linjie Wang » Wed Jul 24, 2024 3:12 am

Hi, Nick.

Culprit was found! In my marker file, some unused markers had their names with initial character '*'.

Many thanks,
Linjie

POST REPLY