IMU sensor fusion viewer "HelperOri​entationVi​ewer"

12 ビュー (過去 30 日間)
Benjamin9119
Benjamin9119 2019 年 4 月 12 日
回答済み: yussif 2023 年 2 月 1 日
Hi All,
I am working my way throgh the below ahrs filter fusion example but my version of matlab (2019a with Sensor Fusion and Tracking toolbox installed) seems to be having trouble recognising the function HelperOrientationViewer. Does anyone know if I require an additional toolbox to run this viewer or why this is not working?
Many thanks!
Ben

採用された回答

Honglei Chen
Honglei Chen 2019 年 4 月 15 日
You may have to open the example in MATLAB and click the "Open Example" button. That will copy all necessary helper functions into a local folder for you to run the example.
HTH
  4 件のコメント
Talha  Ali
Talha Ali 2022 年 3 月 1 日
how to see where i s example folder
and how to copy
Gayatri Menon
Gayatri Menon 2022 年 3 月 1 日
Hi,
In the top right corner in the page, there is a 'Copy command' button. Clicking this button will copy the command required to open the example in MATLAB. Paste and execute the command in MATLAB command window.
Regards
Gayatri

サインインしてコメントする。

その他の回答 (3 件)

Marco Caruso
Marco Caruso 2019 年 4 月 15 日
I have the same problem!
  2 件のコメント
Ans Hafeez
Ans Hafeez 2019 年 8 月 9 日
Facing same problem.
Getting another following error
Error in openExample (line 24)
metadata = findExample(id);
Gayatri Menon
Gayatri Menon 2020 年 1 月 24 日
Hi Ans Hafeez,
Which version of MATLAB are you using? The example is available in R2019a and above releases.
Regards
Gayatri

サインインしてコメントする。


ljp64
ljp64 2019 年 10 月 17 日
However, I cannot see an option to 'Open iExample' in Matlab. Am I doing something wrong?
Thank you
Laura
  5 件のコメント
Gayatri Menon
Gayatri Menon 2022 年 3 月 1 日
Can you check for 'Copy command' button in the top right corner of the page.
Thanks
Gayatri
Shaik Arshad Salman
Shaik Arshad Salman 2022 年 3 月 21 日
I followed the above procedure but I am gettign this error in command window
>>openExample('shared_fusion_arduinoio/EstimateOrientationUsingInertialSensorFusionAndMPU9250Example')
Error using matlab.internal.examples.componentExamplesDir (line 16)
Invalid argument "shared_fusion_arduinoio".
Error in findExample (line 18)
componentExamplesDir = matlab.internal.examples.componentExamplesDir(component);
Error in openExample (line 30)

サインインしてコメントする。


yussif
yussif 2023 年 2 月 1 日
a = arduino('COM5', 'Uno', 'Libraries', 'I2C');
fs = 100;
imu = mpu9250(a,'SampleRate',fs,'OutputFormat','matrix');
GyroscopeNoiseMPU9250 = 3.0462e-06;
AccelerometerNoiseMPU9250 = 0.0061;
viewer = HelperOrientationViewer('Title',{'Visualization of Orientation'})
FUSE = ahrsfilter('SampleRate',imu.SampleRate, 'GyroscopeNoise',GyroscopeNoiseMPU9250,'AccelerometerNoise',AccelerometerNoiseMPU9250);
tic;
stopTimer = 100;
magReadings = [];
accelReadings = [];
gyroReadings = [];
while(toc<stopTimer)
[accel,gyro,mag] = read(imu);
magReadings = [magReadings;mag];
accelReadings = [accelReadings;accel];
gyroReadings = [gyroReadings;gyro];
fuseReadings = FUSE(accel,gyro,mag);
for j = numel(fuseReadings)
viewer(fuseReadings(j));
end
subplot(3,2,1);
plot(accelReadings);drawnow
title('Accelerometer Readings');
subplot(3,2,2);
plot(gyroReadings);drawnow
title('GyroScope Readings');
subplot(3,1,3);
plot(magReadings);drawnow
title('Magnetometer Readings');
end
%%magx_min = min(magReadings);
%%magx_max = max(magReadings);
%%magx_correction = (magx_max+magx_min)/3;

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by