This document describes how to compile and run SDFAST simulations from within Matlab. The compilation process involves logging into a remote CMU server that holds the SDFAST program that creates C code from a script file describing the model. Next, the C files have to be compiled using Visual C++ from Windows. Finally, the MATLAB mex command is used to create a single .mexw32 file that runs the model from MATLAB
The rest of this page serves as a quick-start guide. More advanced topics are found here:
Here is an example file for the sarcos robot: sarcos.sd
> setenv SDKEYDIR /usr0/local/lib
> /usr0/local/bin/sdfast -lc -ge -n sarcos.sd
This step will create several C files:
> cl /c sarcos_sar.c sarcos_dyn.c sdlib.c
Before you do this the first time, you will need to setup the matlab mex routine. Run "mex -setup" and select the LCC compiler.
>mex mexSim.c sarcos_dyn.obj sdlib.obj chkstk.obj sarcos_sar.obj