Our goal in this assignment was to first an foremost checkoff, and then if we had the time and energy go about optimizing our bot for competition. At first, our strategy could be summarized as follows:
However, we quickly realized that for checkoff, we could simplify this strategy a lot. We decided to not even try to go to the FLAP zone and instead immediately go to the front tape line demarcating the force bins by detecting the 1 kHz IR beacons. Our final working strategy can be summarized as follows:
- Go to the FLAP zone
- Follow the tape from the FLAP zone up to the front line demarcating the force bins
- Follow this front line
- Turn to drop chips each time a 1 kHz beacon was detected
- Go back to the FLAP zone when our bot had deposited all its chips
However, we quickly realized that for checkoff, we could simplify this strategy a lot. We decided to not even try to go to the FLAP zone and instead immediately go to the front tape line demarcating the force bins by detecting the 1 kHz IR beacons. Our final working strategy can be summarized as follows:
- Use the 1 kHz IR beacons to move to the front tape line (aim between the two rightmost beacons)
- Follow the line to the left
- Whenever the right IR sensor detects a beacon, turn right, dump one chip and turn left back onto the line
The drawback to this new strategy was that it was not as optimized for the competition as our initial strategy had been. However, it was much simpler to implement. Furthermore, during implementation we realized how much encoders would have been a plus on our bot. Our bot ended up requiring a lot of tuning to get it to move in a relatively straight line and make sure that it turned accurately, two aspects key to the success of our strategy. Encoders would have solved these problems and probably saved us about 8 hours of optimization. Encoders would also have solved our problem of overshooting. Because of the robot's inertia, we tended to stop farther than we wanted when transitioning between different states (for instance, we saw this while turning to dump chips or moving towards to front tape line). Not only did we have to tune for this, but also it forced us to add a special state in which we turned by very small steps to make sure we went back to the line properly.
In the end, our checkoff was pretty robust however, and we were happy with our strategy. Our final Arduino program code can be found attached below.
Arduino program | |
File Size: | 9 kb |
File Type: | ino |