The fire-fighting cricket is responsible for the following components:
Click here to see our
code for Cricket 2 (only for
those who truly care . . .).
The biggest difficulty we had in approaching the candle involved getting the robot pointed in the correct direction immediately after entering a doorway and recognizing the presence of the candle. In some placements of the candle, the robot would need to make a full 90° turn to be pointing at the candle. When the angle was that large, the robot was not as reliable, and occasionally turned the wrong direction.
One modification which added to the reliability and accuracy of the candle sensors was adding black tubing around the sensors. This restricted the range from which the sensors received IR light, thus lowering their readings. Without the tubing, both candle sensors would read the maximum value before the robot was close enough to extinguish the candle. Therefore, restricting the ranges and lowering the sensor readings allowed the robot to get meaningful values at a closer range than was possible without the tubing. Additionally, with the tubing, the likelihood that the sensor reading was being effected only by the IR light from the candle increased, thereby increasing the accuracy of the readings.
We included an escape clause which stopped the robot if the sensor readings got too high. In practice, the robot should sense that it has crossed the white line around the candle and stop before the sensor readings ever cross this threshold. This clause was added for the sake of safety, reducing the possibility that our robot might ever run into a lit candle. Fortunately, the robot always stopped before it got to the candle.
Finally, after the robot stopped, it needed to align to the candle again. This is because it might have been in the process of aligning when it crossed the white line, and it needs to be pointed directly at the flame in order to extinguish it. This alignment was done by pivoting, rather than turning, so that the robot did not get any closer to the candle. After this final alignment, the robot is ready to extinguish.
At this point, it is assumed that the robot is aligned directly at the candle, and is 5-6" from the flame. After testing many distances and different candle heights, we found 5-6" to be the range in which the robot was most likely to extinguish the candle. The contest specifications stipulate that the height of the flame will be between 6" and 8" tall.
Because the robot is so close to the candle at the point of extinguishing, we ran into some trouble with lighting the propellant of the shaving cream can on fire. We found that this was only a problem when the can got neared empty, so we cut back the number of trials we used on each can. Fortunately, none of the fires lit by the propellant were at all serious. After the initial shock, they were easily blown out, with no damage incurred.
It should be noted that we never integrated all of the components of Cricket 2. Extensive testing of the extinguishing procedure were done in order to ensure the safety of the method and to find the optimal distance from which to extinguish the candle. However, due to time restraints, we were not able to integrate approaching and extinguishing the candle.