lucy-musicalfish / CodingForDucks

ENGR101 Project 3 Team 23
0 stars 0 forks source link

Stephen-Robot-Challenge-v.1.0 #29

Open StephenThessman opened 4 years ago

StephenThessman commented 4 years ago

Got the challenge to start working. We are using the follow the left side of the maze technique. The robot does a fine job of getting around the first two bends. However, have not figured out a way for the robot to turn around the U bend though. Once we get this working challenge I think should be complete.

Added: "if (averagePos > 100 && averagePos < 200 && get_pixel(cameraView, rowSelected, cameraView.width/2, 3) < 250)"

This allows robot to dectect if wall is in front and then turn right as a result keeping the wall always on its left. Added each pixel colour values to for loops to determine if red wall or a gap.

Changes: Changed all the whiteCount to redCount for challenge. Removed the additional for loops in challenge that did not do anything. Just went through column = 0 to cameraView.width but nothing was done with value. Means code is slightly tidier. Change the vLeft and vRight ot just vSpeed as we were always using the same value for this. Did testing for each core, completion and what of challenge works so far. No issue with the speed change value.

Queries: Is our FOVArraySize actually correct?... we go up to side size of 10 but we get the whole height for when determining the arraySize. Any help with U bend turn would be amazing.

lucy-musicalfish commented 4 years ago

will ask arthur today about whether we need to have a wall follower algorithm that goes both ways, ie could follow left and follow right.