robotology-legacy / mex-wholebodymodel

Matlab MEX interface to the iWholeBodyModel interface.
11 stars 9 forks source link

Error launching run_forwardDyn, 'Sf' function not recognized in MATLAB 2013b #1

Closed hu-yue closed 9 years ago

hu-yue commented 9 years ago

Hi, I tried to run the simulator from the matlab-src folder on my desktop pc running MATLAB 2013b, by running the run_forwardDyn script, but I get an error on the "Sf" function that computes the skew symmetric matrix:

Cannot find an exact (case-sensitive) match for 'Sf'
The closest match is: sf in /usr/local/MATLAB/R2013b/toolbox/stateflow/stateflow/sf.mexa64

Error in controller_BalancingTorque (line 37)
A  = [ eye(3),   zeros(3),eye(3), zeros(3);
      -Sf(xcom),  eye(3), Sf(Pr), eye(3) ];

This error doesn't occur in my laptop running MATLAB 2013a. Is this a default function in Matlab or is it a custom function? I thought it might be a problem of path not well set, but I checked and it seems that on my desktop and laptop there are the same path settings.

iron76 commented 9 years ago

For some reason your matlab path does not contain the folder WBIToolbox/controllers which is added at startup by the startup_wbitoolbox.m file. In any case @naveenoid and @barrelback, there seems to be an overlap of function since Sf.m and skew.m do the same thing.

talhaaliarslan commented 9 years ago

@naveenoid had the same issue too. I think it is safer for now to use a local function so I replaced calls to Sf() with skew() which is already included in the matlab-src/worker_functions.

naveenoid commented 9 years ago

yes its better to replace it with skew since Sf comes from WBI Toolbox and for now we want to keep these projects independent. I think Talha's push should solve the problem.

On Wed, Sep 24, 2014 at 1:22 AM, Talha Arslan notifications@github.com wrote:

@naveenoid https://github.com/naveenoid had the same issue too. I think it is safer for now to use a local function so I replaced calls to Sf() with skew() which is already included in the matlab-src/worker_functions.

— Reply to this email directly or view it on GitHub https://github.com/robotology-playground/mex-wholebodymodel/issues/1#issuecomment-56605174 .

naveenoid commented 9 years ago

solved in https://github.com/robotology-playground/mex-wholebodymodel/commit/d9d4e5e031962e8f002b6e0ea356005056a93ad8