Error shading - mobile rover - Arduino Engineering Kit

5 次查看(过去 30 天)
hello
I am having a problem with the edit roverLocalization algorithm for the mobile rover arudino eng kit project. I attached a picture of the error message and my arena setup as viewed by matlab.
the arena is 45x60 cm measured pretty accurately, and is well lit. Instead of the usb webcam provdied I used my iphone to live stream for better quality. also its above the 100 cm threshold as specified.
the error message is in step 5 of the alg. so I'm pretty close just don't really understand the error/how to fix it.
i have recalibrated the alg many times using the roverCalibration script and made sure to follow the steps accurately so I know its not a result of human error.
any help would be greatly appreciated as I've tried many different things to fix this. This is a tutorial that I downloaded so I know the code has not been changed.
thanks
Step 5: Visualize the results
Once we have the location and heading information for the rover, we can visualize the results by plotting it on top of the image from the webcam.
% Set the points to draw the lines for the heading and the center of the rover
L=150;
thXE = discCenterX - L*cosd(shading); %ERROR HERE
thYE = discCenterY - L*sind(heading);
% Display the orthogonal view of the arena
imshow(orthoViewRover);
hold on;
% Display the center of the rover and the target in the image
plot(discCenterX,discCenterY,'wx');
plot(targetCenterX, targetCenterY, 'wx');
% Display the heading (angular orientation) of the rover in the image
plot(discCenterX + [-L L], [discCenterY discCenterY],'r--','LineWidth',2);
plot([discCenterX thXE], [discCenterY thYE],'b','LineWidth',2);

回答(1 个)

Madhu Govindarajan
Madhu Govindarajan 2019-3-28
编辑:Madhu Govindarajan 2019-3-28
That variable should be heading. That is the problem.

类别

Help CenterFile Exchange 中查找有关 Simulink Supported Hardware 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by