Error shading - mobile rover - Arduino Engineering Kit
1 回表示 (過去 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);
0 件のコメント
回答 (1 件)
Madhu Govindarajan
2019 年 3 月 28 日
編集済み: Madhu Govindarajan
2019 年 3 月 28 日
That variable should be heading. That is the problem.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!