Using the Forward Tool with Matlab

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Nihar Talele
Posts: 2
Joined: Tue Feb 02, 2016 6:55 pm

Using the Forward Tool with Matlab

Post by Nihar Talele » Tue Mar 08, 2016 2:23 pm

Hi all,
I want to use the forward tool of open sim with matlab while using a control law of my own. I went through the Dynamic walking tutorial and was able to figure out how to use my control law to drive the actuators using the matlab's integrator but I can't figure out a way to use the forward tool along with my control law in matlab. Can anyone please point me in the right direction?

Thank You,
-Nihar

User avatar
Brad Humphreys
Posts: 79
Joined: Thu Feb 03, 2011 11:32 am

Re: Using the Forward Tool with Matlab

Post by Brad Humphreys » Thu Mar 10, 2016 11:46 am

Nihar,

I believe you have to do the following to use the Forward Dynamics tool (or at least this is the way that works for me):
1) Your controller needs to be written in C++ and compiled and registered with OpenSim (Let OpenSim know it exists).
2) Add the controller to your model (.osim file)
3) Then you can run FD using the MATLAB API and calling your model. The MATLAB API does not know about your custom controller, so it can't directly interact with it, but it can run a model that has it.

Or you have to work in MATLAB, implement the controller there, and use MATLAB's integrators or OpenSim API to work step wise (as it is done in the dynamic walking tutorial).

In reviewing the OpenSim 4.0 release notes though, it sounds like you might be closer to what you want to do with that coming release (manipulate custom components/classes via Python).

Brad

POST REPLY