Problem in using OpenSim with Simulink

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
YeongHun Kim
Posts: 6
Joined: Sun Apr 04, 2010 11:47 pm

Problem in using OpenSim with Simulink

Post by YeongHun Kim » Mon May 04, 2015 3:21 am

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?)

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: Problem in using OpenSim with Simulink

Post by Ayman Habib » Tue May 05, 2015 10:09 am

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

User avatar
YeongHun Kim
Posts: 6
Joined: Sun Apr 04, 2010 11:47 pm

Re: Problem in using OpenSim with Simulink

Post by YeongHun Kim » Wed May 06, 2015 10:37 pm

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.

POST REPLY