So this week is the final week, meaning that by the end of it we needed a working demo video of the robot to show for. To get to this point, there were still some problems which prevented the robot finishing each lap, but after fixing those problems, I can now present the following 1-lap demo:
The major problems were ones which halted the program, or otherwise prevented the robot from completing the lap. The most prominent of these was that because of the way we stored the paper track (rolling it up) the track had to be pinned down, and between the pins along the edge the paper kept riding up. This was a problem because the robot’s wheels would catch on the edge of the paper and either cause it to stop, or cause it to veer unexpectedly, often causing it to go off track. Another issue was that due to the small space in which I had to record a demo, when the robot executed the Green function (turned off the track and dropped the box) the IR sensor function would trip from detection of the wall, causing the robot to stop. To bypass this I had to disable the IR function for the main demo. The other big problem was the dispensing of the cardboard box. The arm seemed to drop the cardboard box perfectly on any non-filmed test runs, but upon attempting to film the robot, the box would nearly always get stuck on the end of the arm. To fix this I simply upped the speed at which the arm lowers, giving the box added momentum as it was thrown. I also had to slightly decrease the angle in both the lifting and dropping functions to prevent the arm motor getting stuck as I described in the previous post.
As a comparison of the final game and the initial brief, the game scenario matches the following complexity requirements:
- Pick-up and reposition of an object
- Colour detection
- Touch detection
- Position change detection (IR)
- Information display
- Button Input
- Line Following
- Timing control for an activity
- Detection of the position of an object based on it’s distance
- Repetition of behaviours (loop)
A full image of the program’s code is available here.