Page 1 of 1

Problem in using OpenSim with Simulink

Posted: Mon May 04, 2015 3:21 am
by yeonghun
Hi,

I used OpenSim-MATLAB for FD/ID simulations.

Now, I'm trying to use it with Simulink, but I got a problem.

I tried to use OpenSim-MATLAB functions as Embbeded MATLAB Function block of Simulink.

at first, I used import OpenSim like

Code: Select all

import org.opensim.modeling.*;
as used in Matlab.

But I got a coder error message "Command-duality is not supported.".

So, I changed that like

Code: Select all

import('org.opensim.modeling.*');
But now, I got a coder error message "Import statements are currently unsupported".

How can I solve this problem? Should I use other type of function block in Simulink?

(Like S-function?)

Re: Problem in using OpenSim with Simulink

Posted: Tue May 05, 2015 10:09 am
by aymanh
Hi,

The currently available approach of using the OpenSim API in Matlab, supports scripting use only. If you want to use OpenSim from Simulink you'll have to use the S-Function route indeed.

Best regards,
-Ayman

Re: Problem in using OpenSim with Simulink

Posted: Wed May 06, 2015 10:37 pm
by yeonghun
Thanks for your reply,

Is there any examples or tutorials for build s-function for OpenSim?

I found only the conceptual explanation of OpenSim s-function block like link below.

http://simtk-confluence.stanford.edu:80 ... 7205594889

I'm interested in using OpenSim model with real-time admittance control fo exoskeleton using EMG signals.


Thanks.