Use OpenSim 3.0 API into Octave on Windows
OpenSim 3.0 features well documented API integration with Matlab. I did some testing to see if the same mechanism can be used with the open source Octave Matlab clone and the fast answer is yes; this tests were performed under Windows 7 Ultimate.
Here are the bootstrap steps:
Download and install OpenSim 3.0 featuring Matlab integration from OpenSim download site
Tested with:
OpenSim-3.0.1-win32VC10P.exe (132550 kB) binary Windows Mar 27, 2013
Install OpenSim 3.0 in the default directory:
c:\OpenSim 3.0\
Install Octave3.6.4 for MinGW32
From Octave forge go to Windows Installers and download
Octave3.6.4_gcc4.6.2_pkgs_20130402
Install Octave along with additional packages by following the guide:
Octave3.6.4_gcc4.6.2_sourceforge_readme
From your installation folder:
c:\Octave\
Double click on:
c:\Octave\Octave3.6.4_gcc4.6.2.lnk
From the Octave command line interface, load the java package:
octave> pkg load java
Check that java 1.2.9 package is installed
octave> pkg list
=> java *| 1.2.9 | C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\java-1.2.9
Initialize Java facilities …
octave> openSimModelingJar=”c:/OpenSim 3.0/opensim/modules/org-opensim-modeling.jar”
octave> javaaddpath(openSimModelingJar)
octave> openSimBinDir=”c:/OpenSim 3.0/bin/”
octave> addpath(openSimBinDir)
… and now you can test the API loading
octave> testModelPath=”C:/OpenSim 3.0/Models/WristModel/wrist.osim”
octave> wristModel = java_new(“org.opensim.modeling.Model”,testModelPath)
Loaded model Wrist Model from file C:/OpenSim 3.0/Models/WristModel/wrist.osim
obj = <Java object: org.opensim.modeling.Model>
You have now full access to the Model OpenSim API, for example you can query the wrist model for joint number
octave> wristModel.getNumJoints()
ans = 28
Verro Ski Club 2013
Visualizza 06/03/2013 09:21 in una mappa di dimensioni maggiori
Monte Subasio
Visualizza sab 29 dic 2012 10:54 in una mappa di dimensioni maggiori