Saturday, June 1, 2013

Week 9

YAY!  Search algorithm issues have been resolved.  After several weeks of tweaking this part of the code for the robot we've finally got it acting in a manner that we'd like.  The issue before is that the robot would sweep past the target several times before noticing it there or it would notice the target and when approaching the target the angle wouldn't be good and the robot would then miss the target and go back to searching again.

The Fix:
A piece of code was inserted that had the robot sweep the the right until it noticed and object and then to continue sweeping until no more object was found.  A beep would then sound to indicate that the robot found the right most edge of the object.  The robot would then begin to sweep in the opposite direction until it past the object and would sound a beep indicating it has located the left most edge of the target.

Now the robot would take that distance, divide by 2 and move that number back to the right.  This positioned the robot nearly centered to object every time and then the robot would approach the object without missing it, perform a function as desired depending on the type of target and then continue its way throughout the building.

Now that we've got this underway the robot is complete and ready for presentation!

No comments:

Post a Comment