Page 1 of 2
Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cycling
Posted: Wed Jan 31, 2024 8:50 am
by mughees.ucd
Hello,
I am trying to implement the code/data (available on SimTK) of project "Muscle-Driven Simulations and Experimental Data of Cycling".
The code is implemented in 2021b Matlab as mentioned in paper of the project. I am also using the same, but when i am running the code it is showing the following error
Unrecognized function or variable 'processAndConvertToRadians'.
Error in solveMocoInverseCycling_J1 (line 119)
kinematicsNeeded = tableProcessor.processAndConvertToRadians(model);
Error in runMocoInverseCycling (line 7)
solveMocoInverseCycling_J1('P01',120.63,122.9, eeWeight, '_J1_P01_result')
I have followed all the steps as mentioned in readme files but still am facing this issue.
As per my understanding it seems that the syntax for converting radian to degree in the code is not correct (I might eb wrong ).
Need help in solving this error and run this code for understanding.
Best Regards
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
Posted: Wed Jan 31, 2024 10:58 am
by nbianco
Hi Muhammad,
What version of OpenSim do you have installed? It seems like you might have an old install, the lastest OpenSim versions (which include Moco) can be found here:
https://simtk.org/frs/?group_id=91.
Best,
Nick
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
Posted: Thu Feb 01, 2024 4:53 am
by mughees.ucd
Hi Nick,
Thank you for the reply, i was trying it in opensim 4.4, but yeah i will try it in this new version of open sim and check if it resolves the matter.
thanks for the help.
Mughees
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
Posted: Thu Feb 01, 2024 6:25 am
by mughees.ucd
Hi Nick,
I tried installing the new opensim and moco 0.4.0 along with matlab 2021b. but still the problem is same when i run the code.
Unrecognized function or variable 'processAndConvertToRadians'.
Error in solveMocoInverseCycling_J1 (line 119)
kinematicsNeeded = tableProcessor.processAndConvertToRadians(model);
Error in runMocoInverseCycling (line 7)
solveMocoInverseCycling_J1('P01',120.63,122.9, eeWeight, '_J1_P01_result')
do you have any idea how to solve that?
in my opinion (i might be wrong also) that the syntax of calling a function for converting the model into radians is not right or maybe not according to the new version of opensim or moco.
best regards
Mughees
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
Posted: Thu Feb 01, 2024 2:42 pm
by nbianco
Hi Mughees,
OpenSim 4.4 should work fine (Moco 0.4.0 is a much older version and shouldn't be used anymore).
My guess is that you don't have OpenSim installed correctly. Are you able to run other examples with your current OpenSim 4.4 install?
Best,
Nick
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
Posted: Fri Feb 02, 2024 4:05 am
by mughees.ucd
Hi Nick
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
Posted: Fri Feb 02, 2024 4:23 am
by mughees.ucd
Hi Nick,
I downloaded the Moco from the following link, I thought its the latest release
https://simtk.org/projects/opensim-moco
Just for clarification, I am a very new user of Moco, so i am just learning everything about it. so at times my question can sound very basic (sorry for that).
The examples i found in the package of moco or open sim work fine usually.
Only thing i face is that whenever i execute a "study.visualize(......);" command, when i close the visualization dialoguebos it sows the following error in command box of matlab.
Error using example2DWalking
Java exception occurred:
java.lang.RuntimeException: SimTK Exception thrown at VisualizerProtocol.cpp:609:
Error detected by Simbody method VisualizerProtocol: An attempt to write() 1 bytes to pipe 6 failed with errno=22 (Invalid
argument).
(Required condition 'status!=-1' was not met.)
at org.opensim.modeling.opensimMocoJNI.MocoStudy_visualize(Native Method)
at org.opensim.modeling.MocoStudy.visualize(MocoStudy.java:129)
Can you suggest me from where i can download the latest version of Moco, maybe configuring that with my matlab will solve the issue
this is the path of my computer, i was using opensim 4.4 but now also installed opensim 4.5 also. You think the path setting is right ?
- Screenshot 2024-02-02 110118.png (36.66 KiB) Viewed 21005 times
Best regards
Mughees
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
Posted: Fri Feb 02, 2024 6:49 am
by rosshm
Hi Mughees,
Moco is part of recent releases of the OpenSim software. You don't need to download and install Moco separately from OpenSim itself. I would guess that having the 0.x release of Moco installed along with OpenSim might be causing problems.
Ross
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
Posted: Fri Feb 02, 2024 7:36 am
by mughees.ucd
Hi Ross,
Thank you for the rely, in that case then how can i configure moco with matlab.
because in the latest release there is a file which we can run to configure opensim, but we do nothave any file to configure moco.
regards
mughees
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
Posted: Fri Feb 02, 2024 3:44 pm
by rosshm
Configuring the latest OpenSim release with Matlab should also include Moco.