matlab opensim pipline examples
matlab opensim pipline examples
hello everyone
i want to run the matlab opensim pipeline examples. when i input the static data(c3d file) i have no error but i get this message :
'scale' is not recognized as an internal or external command,
operable program or batch file.
and when i run the matlab code for dynamic c3d file i get this error
'ik' is not recognized as an internal or external command, [/b]
operable program or batch file.
Error using readtext (line 142)
Trying to open C:\Program
Files\MATLAB\MatlabOpensimPipelineTools-latest\MatlabOpensimPipelineTools-latest\MatlabOpensimPipelineExample\MU2392 Tim Dorn Test
Data\ExampleData\testWalking_ik.mot: No such file or directory
Error in load_sto_file (line 21)
[file_data,s_data]= readtext(file, '\t', '', '', 'empty2NaN');
Error in MU_walk_pipeline (line 88)
D = load_sto_file([data.TRC_Filename(1:end-4) '_ik.mot']);
i want to run the matlab opensim pipeline examples. when i input the static data(c3d file) i have no error but i get this message :
'scale' is not recognized as an internal or external command,
operable program or batch file.
and when i run the matlab code for dynamic c3d file i get this error
'ik' is not recognized as an internal or external command, [/b]
operable program or batch file.
Error using readtext (line 142)
Trying to open C:\Program
Files\MATLAB\MatlabOpensimPipelineTools-latest\MatlabOpensimPipelineTools-latest\MatlabOpensimPipelineExample\MU2392 Tim Dorn Test
Data\ExampleData\testWalking_ik.mot: No such file or directory
Error in load_sto_file (line 21)
[file_data,s_data]= readtext(file, '\t', '', '', 'empty2NaN');
Error in MU_walk_pipeline (line 88)
D = load_sto_file([data.TRC_Filename(1:end-4) '_ik.mot']);
- Thomas Uchida
- Posts: 1795
- Joined: Wed May 16, 2012 11:40 am
Re: matlab opensim pipline examples
It would help to narrow down whether this is an OpenSim installation issue, a MATLAB configuration issue, an issue with the script, etc. Did you encounter any issues when configuring MATLAB? Please see the "Scripting with Matlab" page in the Confluence documentation for reference (https://simtk-confluence.stanford.edu:8 ... ith+Matlab).
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: matlab opensim pipline examples
I don't think these scripts use the OpenSim Matlab API.
The issue is likely that the path to OpenSim command-line tools is not on the system's PATH environment variable.
The issue is likely that the path to OpenSim command-line tools is not on the system's PATH environment variable.
Re: matlab opensim pipline examples
thank you for your attention
i could successfuly run it with no error and when i run the "model = org.opensim.modeling.Model()" i get no error
but i have another question...
how i can open a model from models in opensim
i run this model = org.opensim.modeling.Model('gait2392_simbody.osim')
but i got the error
Java exception occurred:
java.io.IOException: Object: ERR- Could not open file gait2392_simbody.osim. It may not exist or you don't have permission to read
it.
at org.opensim.modeling.opensimModelJNI.new_Model__SWIG_2(Native Method)
at org.opensim.modeling.Model.<init>(Model.java:127)
how can i solve this problem?
thank you
i could successfuly run it with no error and when i run the "model = org.opensim.modeling.Model()" i get no error
but i have another question...
how i can open a model from models in opensim
i run this model = org.opensim.modeling.Model('gait2392_simbody.osim')
but i got the error
Java exception occurred:
java.io.IOException: Object: ERR- Could not open file gait2392_simbody.osim. It may not exist or you don't have permission to read
it.
at org.opensim.modeling.opensimModelJNI.new_Model__SWIG_2(Native Method)
at org.opensim.modeling.Model.<init>(Model.java:127)
how can i solve this problem?
thank you
- Thomas Uchida
- Posts: 1795
- Joined: Wed May 16, 2012 11:40 am
Re: matlab opensim pipline examples
You may be encountering read/write permission issues if your models and scripts reside in a protected system directory like Program Files on Windows. It is also possible that the gait2392_simbody.osim model file is simply not in the current directory. Your MATLAB code should look something like this:Could not open file gait2392_simbody.osim. It may not exist or you don't have permission to read
it.
Code: Select all
import org.opensim.modeling.*
cd('C:\OpenSim 3.3\Models\Gait2392_Simbody');
model = Model('gait2392_simbody.osim');
% ...
state = model.initSystem();
% ...
Re: matlab opensim pipline examples
thank you dear
you helped me alot of and now i have no error.
but i am beginner in using opensim-matlab api
i searched alot of about it .... but i dont understand how to do different stages(like scaling, inverse kinematic , inverse dynamic, static optimization, rra and cmc )in matlab?
please give me a little information..
king regards
you helped me alot of and now i have no error.
but i am beginner in using opensim-matlab api
i searched alot of about it .... but i dont understand how to do different stages(like scaling, inverse kinematic , inverse dynamic, static optimization, rra and cmc )in matlab?
please give me a little information..
king regards
- Thomas Uchida
- Posts: 1795
- Joined: Wed May 16, 2012 11:40 am
Re: matlab opensim pipline examples
Please see the example scripts on the "Scripting with Matlab" page in the Confluence documentation (https://simtk-confluence.stanford.edu:8 ... ith+Matlab).i searched alot of about it .... but i dont understand how to do different stages(like scaling, inverse kinematic , inverse dynamic, static optimization, rra and cmc )in matlab?
Re: matlab opensim pipline examples
thank alot
excuse me
when i run the osimModel.initSystem(); command i got this error
Error using my_matlab_program (line 5)
Java exception occurred:
java.lang.RuntimeException: SimTK Exception thrown at VisualizerProtocol.cpp:157:
Error detected by Simbody method VisualizerProtocol::ctor(): Unable to spawn executable 'simbody-visualizer' from directories:
c:\Program Files\MATLAB\MATLAB Production Server\R2015a\bin\win64\
c:\OpenSim 3.3\bin\bin\
D:/Dev/OpenSim33/installx64/Simbody/bin/
C:\Program Files\Simbody\bin\
C:\Program Files\SimTK\bin\
Final system error was errno=2 (No such file or directory).
(Required condition 'status == 0' was not met.)
at org.opensim.modeling.opensimModelJNI.Model_initSystem(Native Method)
at org.opensim.modeling.Model.initSystem(Model.java:179)
excuse me
when i run the osimModel.initSystem(); command i got this error
Error using my_matlab_program (line 5)
Java exception occurred:
java.lang.RuntimeException: SimTK Exception thrown at VisualizerProtocol.cpp:157:
Error detected by Simbody method VisualizerProtocol::ctor(): Unable to spawn executable 'simbody-visualizer' from directories:
c:\Program Files\MATLAB\MATLAB Production Server\R2015a\bin\win64\
c:\OpenSim 3.3\bin\bin\
D:/Dev/OpenSim33/installx64/Simbody/bin/
C:\Program Files\Simbody\bin\
C:\Program Files\SimTK\bin\
Final system error was errno=2 (No such file or directory).
(Required condition 'status == 0' was not met.)
at org.opensim.modeling.opensimModelJNI.Model_initSystem(Native Method)
at org.opensim.modeling.Model.initSystem(Model.java:179)
- Thomas Uchida
- Posts: 1795
- Joined: Wed May 16, 2012 11:40 am
Re: matlab opensim pipline examples
It looks like the visualizer could not be opened. You might try running your script without the visualizer to determine whether the issue is with the visualizer specifically or with the OpenSim installation in general.Error detected by Simbody method VisualizerProtocol::ctor(): Unable to spawn executable 'simbody-visualizer' from directories:
Re: matlab opensim pipline examples
i think the error is related to my windows because without this command i have no error
is there any way to correct it?
is there any way to correct it?