Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cycling
- Muhammad Mughees Ahmed
- Posts: 17
- Joined: Mon Sep 18, 2023 3:22 am
Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cycling
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
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
- Nicholas Bianco
- Posts: 1036
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
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
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
- Muhammad Mughees Ahmed
- Posts: 17
- Joined: Mon Sep 18, 2023 3:22 am
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
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
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
- Muhammad Mughees Ahmed
- Posts: 17
- Joined: Mon Sep 18, 2023 3:22 am
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
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
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
- Nicholas Bianco
- Posts: 1036
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
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
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
- Muhammad Mughees Ahmed
- Posts: 17
- Joined: Mon Sep 18, 2023 3:22 am
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
Hi Nick
Last edited by Muhammad Mughees Ahmed on Fri Feb 02, 2024 4:24 am, edited 3 times in total.
- Muhammad Mughees Ahmed
- Posts: 17
- Joined: Mon Sep 18, 2023 3:22 am
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
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 ?
Best regards
Mughees
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 ?
Best regards
Mughees
- Ross Miller
- Posts: 374
- Joined: Tue Sep 22, 2009 2:02 pm
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
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
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
- Muhammad Mughees Ahmed
- Posts: 17
- Joined: Mon Sep 18, 2023 3:22 am
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
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
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
- Ross Miller
- Posts: 374
- Joined: Tue Sep 22, 2009 2:02 pm
Re: Problem implementing the code/data available on Moco project "Muscle-Driven Simulations and Experimental Data of Cyc
Configuring the latest OpenSim release with Matlab should also include Moco.