| The Present | ||
|---|---|---|
Navigation Algorithm
While in a hallway, Perseus's navigation algorithm is based on a simple 'follow the left wall' rule. He turns right by noticing a wall in front and a wall to his left and then executing a 90 degree turn on the spot until his left sensors see both see the left wall. Anytime he sees a void to the left, he gradually turns left until his left sensors again see the wall. He will therefore always choose to go left if possible, straight if not, and right if those options are not viable.
Perseus follows a different algorithm when he is in a room. After he crosses a white line (they mark entrances to rooms), he gradually turns left until he sees the left wall again. At that point, he stops and executes a 180 degree right turn to check for the candle. If he doesn't see it, he continues forward out of the room and follows the left wall again. If he does, he rescans the room until he sees the candle again and then goes forward to snuff it.
Perseus has a few fail-safes that make his navigation algorithm robust, both inside of rooms and in the hallways. If Perseus is executing his left-turning procedure for greater than a certain amount of time, he backs up and restarts his turn. This makes sure that he can't get stuck on a corner or on the staircase (a tricky navigation problem due to its height). If he gets to close to the front wall, he backs up, resamples his sensors, and goes from there. Inside a room, he watches for the white circle that surrounds the candle and if he sees it before completing his initial left turn, he goes automatically into candle-snuffing mode. If he thinks he saw the candle in the first sweep of the room but can't find it again, he exits the room and goes about his business. If he thinks he does see it in the second sweep, but ends up spending a certain amount of time trying to locate it exactly, he recovers from this and exits the room.
Snuffing the Candle
Perseus's method for snuffing the candle is to extend a snuffer over top of the candle and then lower it. Once he knows that he has seen the candle, he approaches it with halting forwards and turns, centering on the candle as he approaches it. The way he knows to snuff the candle is if he's over the white circle and his middle light sensor (of three) is within the requisite threshhold.
One problem with this method that we encountered during the competition is that he can't snuff a candle that is in corner if he's approaching it along the wall. Due to the placement of the snuffing arm, the tuna can can't reach the candle in that situation. Because he doesn't have a redo procedure for attempting to snuff the candle a second time if the candle is still lit after he doees it the first time, he cannot recover from this problem.
Body and Electronics
Perseus's main body is a plastic chassis and is otherwise made of duct tape and legos. The chassis in specially made for small robots; we actually cannibalized two previous years' robots and made a three-layer chassis so that we could protect his delicate electronic innards as well as have a low-to-the-ground bit on which to mount some of his sensors. The chassis came with a pair of hacked servomotors with wheels as well as a front-central wheel which allows turns.
The structure that supports his sensors and snuffing arm is made of legos and tape. The snuffing mechanism itself is made of legos, a string, and a tinfoil- and duct tape-wrapped tuna can. The can is lowered on the string to snuff the candle. It is hot-glued and taped to the chassis. He has a lego motor controlling the extension and retraction of the snuffing arm and another lego motor to lower and raise the tuna can.
Perseus's onboard computer is a Handyboard, a small unit with batteries, a processor, an LCD screen, seven analog and nine digital input ports, and four motor ouput ports, amongst various other electronic bits. However, the Handyboard alone could not fulfill our needs, both because it lacked the requisite processing speed for all of our sensors and because it didn't have enough analog ports. This is why we have another processor, a LogoChip, as the eyes. It recieves input from the light sensors and one reflectance sensor and processes the input more quickly than the Handyboard is able because it is not also burdened with navigation. It sends digital input to the Handyboard (in the form of "Didn't see a candle", "Candle to the right", "Candle to the left", "Candle RIGHT IN FRONT", and "Front reflectance sensor sees the circle") so that the Handyboard can decide what to do about the information.
Sensor Overview
Perseus navigates using a series of sensors for seeing walls, finding the candle, and checking for room entrances, which are demarcated by a white line on the floor across the doorway.
The sensors responsible for seeing the wall are the same style of infrared sensor that are commonly used to automate hands-free faucets in public bathrooms. They can be used to measure the distance between the sensor and an object in front of it. One drawback of these particular sensors is that they are optimized to "notice" an object at approximately the distance that a person would wave their hand in front of a faucet sensor, for example. So, when the distance is very large, the value output by the sensor is very small. As the object gets closer, the sensor value increases, until it reaches a peak at this "optimal" distance. The value then decreases again as the object gets very close. This is useful when the goal is to perform an action only when the distance is at or around this peak. However, this property was problematic for us because it results in two different distances, one on either side of the peak, giving the same output. We solved this problem by positioning the sensors so that all possible measurements would be on one side of the peak.
Reflectance sensors are responsible for detecting the white lines on the floor that mark the four room entrances. A white surface is more reflective than a black surface, and carpet also has low reflectivity. We encountered problems with these sensors because they are also sensitive to distance. This would not have been an issue had it not been for the thickness of the carpets in the maze at the competition, which caused the sensors to briefly get too close to the ground when the front wheel was up on the carpet but the back wheels were not.
A different style of infrared sensor are responsible for seeing the candle. Three sensors are lined up horizontally on the front of the robot. The left- and right-most sensors have a relatively wide field of view, and their values are compared to determine whether Perseus needs to turn left or right in order to be lined up with the candle. The center sensor has a narrower field of view, and is responsible for noticing that Perseus has come close enough to the candle to snuff it out.
Design Process
In the process of designing this robot, we dealt with both the mechanical and electrical components of the robot itself, as well as the necessary coding. The first stage of the design, completed during Wintersession 2007, was a robot powered by LEGO motors driving a LEGO gear train who could navigate the maze moderately well, and locate a white circle on the floor inside the room. For the first part of the Spring semester, our focus was on improving the reliability of the robot's navigation through the rooms and hallways of the maze. We also brainstormed possible methods for snuffing out the candle. We undertook a major overhaul of the robot body about halfway through the semester, replacing the LEGO motors and gear train with hacked servo motors and plastic base parts from a robot kit used by a previous year's group. Because we now had not only different motors, but one motor driving each wheel rather than both motors driving a dual differential gear train, a lot of testing was necessary to get the navigation working reliably again. After completing the transition to the new body, we split the work for a short time. Ayla began developing the behavior for locating the candle, while Sarah Beth continued to work on the navigation. Finally, we worked together on the candle snuffing mechanism.
Personal Statements
Sarah Beth
Working on this project was a very fulfilling experience for me. Seeing a complex project through from start to finish, as well as being involved at every level from abstract planning to sensor wiring, was a very rewarding experience and a welcome change from the more routine aspects of schoolwork. Robotics is a field with many unique challenges, and I enjoyed tackling them. Ayla and I also had a great team dynamic, which made the stressful times manageable and the less stressful times a lot of fun. All in all, this has been an experience I will not soon forget.
Ayla
I had an absolutely fantastic time working on this project (for the most part). It sparked my interest in robotics and made me realize that it's possible for me to do it, whereas before robotics seemed much too complex and difficult for the likes of me. It was a great learning experience in that I worked with a partner successfully, learned a completely new and different coding style and language, worked within the black box of electronics and circuits, and learned that the combination of real-world and virtual elements in robotics cand be both fascinating and extremely frustrating.
I was disappointed when we didn't qualify for the competition, but it was a satisfying experience nonetheless. Presenting at Ruhlman (where Perseus performed very, very well) was a good substitute for competing. I look forward to doing more robotics projects at Wellesley in the future!
Ayla and Sarah Beth would like to thank their faculty advisor, Lyn Turbak, for his invaluable help and support.