jeljaik / extended-kalman-filter

Matlab and C++ code for implementation of the Extended Kalman Filter for estimating dynamic quantities for a single rigid body with distributed force/torque measurements and distributed gyroscopes and accelerometers measurements.It also include estimation of the orientation under the quaternion representation.
MIT License
38 stars 39 forks source link

Run-time error of testEKF_completeLegWithSkin.m #23

Closed prashanthr05 closed 9 years ago

prashanthr05 commented 9 years ago

I installed the EKF library and tried to run the script testEKF_completeLegWithSkin.m under the EKF_EulerAngles folder of dynamic-tests branch. I can see the plots being plotted but it suspends showing the following error,

"Attempt to reference field of non-structure array.

Error in plotResultsOutput_withSkin (line 19) figPreN = figPreN.Number - 1;

Error in plotAndSaveFigs (line 2) plotResultsOutput_withSkin(dataBaseFolder);

Error in testEKF_completeLegWithSkin (line 227) plotAndSaveFigs(dataBaseFolder,plotFigBaseFolder);"

nunoguedelha commented 9 years ago

Actually, it's just the access to figPreN.Number which is failing because figPreN is not a structure but a number. It's the reference number of the figure created in the previous line. figure(N) can be used to create a new figure of reference N or access figure N if it already exists. Just remove .Number and it works.

jeljaik commented 9 years ago

Yeah, but this also varies from one Matlab version to other. At some point they added/removed this Number method

On Thu, Apr 30, 2015, 13:55 Nuno Guedelha notifications@github.com wrote:

Actually, it's just the access to figPreN.Number which is failing because figPreN is not a structure but a number. It's the reference number of the figure created in the previous line. figure(N) can be used to create a new figure of reference N or access figure N if it already exists. Just remove .Number and it works.

— Reply to this email directly or view it on GitHub https://github.com/jeljaik/extended-kalman-filter/issues/23#issuecomment-97748021 .

naveenoid commented 9 years ago

Will try implementing a version check for this. Ultimately I prefer the plots generated from Jorh's version, which I guess is 2014? So we must retain compatibility with him.

jeljaik commented 9 years ago

Well said

Jorhabib Eljaik Gómez,Ph.D. Student - Istituto Italiano di Tecnologia Dept. of Robotics, Brain and Cognitive Sciences Cognitive Humanoids Laboratory e-mail: jorhabib.eljaik@iit.it Cel: +39 388 352 33 85 Tel: +39 010 71781 420 Fax: +39 010 7170817

On Thu, Apr 30, 2015 at 2:24 PM, Naveen Kuppuswamy <notifications@github.com

wrote:

Will try implementing a version check for this. Ultimately I prefer the plots generated from Jorh's version, which I guess is 2014? So we must retain compatibility with him.

— Reply to this email directly or view it on GitHub https://github.com/jeljaik/extended-kalman-filter/issues/23#issuecomment-97753115 .