IMU GPS fusion for interial navigation example error - quadcopter error

I keep getting this error when I run the IMU GPS fusion for interial navigation example and I have not altered the code from the Matlab example webpage (https://www.mathworks.com/help/fusion/ug/imu-and-gps-fusion-for-inertial-navigation.html#IMUandGPSFusionExample-3). Any clue what is going on?
"IMUandGPSFusionforInertialNavigationexample
Error using load
Unable to read file 'LoggedQuadcopter.mattrajData'. No such file or directory.
Error in IMUandGPSFusionforInertialNavigationexample (line 20)
load LoggedQuadcopter.mattrajData;"

댓글 수: 1

Is there anyone I can talk to from matlab that I mgiht be able to talk to?

댓글을 달려면 로그인하십시오.

답변 (3개)

William Rose
William Rose 2021년 4월 2일

0 개 추천

The code cannot find file LoggedQuadcopter.mattrajData. Make sure you have tthe file and make sure it is in a directory that is on the Matlab path. You can add directories to the current path by clicking on the "Set Path" buttn in the "Environment" section at the top of the main Matlab window. See screenshot below.
Michael,
Please use the "open example" button from the documentation or in your MATLAB command prompt type:
>>openExample('shared_positioning/IMUandGPSFusionExample')
And hit enter.
This will provide all the necessary files to run the example in a folder and will cd to that folder.
Examples have data files and other helpers that are not on the general MATLAB path.

댓글 수: 4

Hi Michael,
Thanks for trying that.
There could be a couple of things to try next:
First, you can try to restore the default path and rehash the toolbox cache. That should help restore the openExample function.
restoredefaultpath;
rehash toolboxcache;
openExample('shared_positioning/IMUandGPSFusionExample')
The second thing: If I look at your code, on line20, the file extension should be .mat. and, separated by a blank space, the loaded variable name. Like this:
load LoggedQuadcopter.mat trajData
Finally, if these don't help, you may want to check if your installation contains, and has a license to, one of the required toolboxes: Navigation or Sensor Fusion and Tracking.
help license
license('Test','sensor_fusion_and_tracking')
license('Test', 'navigation_toolbox')
If both license() calls return a 0, it means that you don't have a license to the required products.
Thank you for your help and the delay on the reply! I do have a valid license for both and the quadcopter eidt you suggested did work but now I am getting an error with the "HelperScrollingPlotter." Any suggestions?
"IMUandGPSFusionforInertialNavigationexample
Unrecognized function or variable 'HelperScrollingPlotter'.
Error in IMUandGPSFusionforInertialNavigationexample (line 92)
errscope = HelperScrollingPlotter(..."

댓글을 달려면 로그인하십시오.

Based on the screenshot above, you are not in the example path.
Please use the command:
openExample('shared_positioning/IMUandGPSFusionExample')
This will:
  1. Create a folder for the example on your local drive.
  2. CD to the created folder.
  3. Copy all the necessary files to that folder.
These example files are not on the regular MATLAB path that's why you must be in the same folder that they get copy to or use addpath to add the path to that folder

댓글 수: 2

I am now getting a different error. THis is 2020b version and I have the AV toolbox and sensor fusion installed.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2021년 4월 2일

댓글:

2021년 4월 16일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by