Sunday, April 15, 2007

Rockhopper wins first place in Expert division!


Needless to say I am rather happy with the result! The contest consisted of 3 runs. On each run there are a total of 4 tasks worth one point each. The tasks are: put out the candle in the lower level of the maze, put out the candle on the upper level, find and mark the "baby" and go up and down the ramp between floors. I was not able to find the baby on any of the runs (the first run it actually did find the baby but dropped the beacon in the hallway outside of the room instead of in the room) put out the candle and made it up and down the ramp (total of 2 points). On my 2nd and 3rd runs it put out both candles and made it up and down the ramp on each for 3 points on each run. My total came to 8 points, the 2nd place robot only scored 2, 3rd place put out one candle for 1 point.

The thing that gave me the edge was reliability. I kept my navigation code very simple (in fact so simple I hesitate to call it "navigation"). I had done a _lot_ of testing ahead of time and tried to make sure it was able to handle any situation without getting stuck. At one point it did manage to get partially wedged against a wall but it _knew_ it was stuck and was able to get free (after 15 or 20 seconds of spinning it's wheels). Other than that my biggest issue was since it doesn't have any real sort of navigation or knowledge of where it is located in the maze it often went into the same room multiple times while missing other rooms entirely. I made some small tweaks (ok, hacks really) to the code between runs and improved it a bit.

The competition was a lot of fun. I enjoyed meeting several of the other robot builders. I had several people ask me a lot of questions about the robot which I really enjoyed. Hopefully people learned some new things from talking to me, I know I learned a few new things from talking to the other builders as well.

I plan on still making a few more updated to the blog with what I have learned over the past couple of months and also some thoughts for the future. I do however need to get back to working on our kitchen before Jane shoots me! So no more robot projects for a little while but I will get back to it! I am thinking I will likely do the competition at Trinity next year but after that I am thinking robot soccer would be a new and interesting challenge.

One last note. For those of you how have followed along and are getting the robot building bug I highly recommend the competition at Trinity. They have entry level divisions for younger builders as well as 2 different high school divisions and a "senior" division open to college students or individual hobbyists. And of course the expert division if you want to run your robot against Rockhopper II next year!

Saturday, April 14, 2007

Greetings from Hartford

The big weekend is finally here. Jane and I are in Hartford for the weekend for the Trinity College robot competition. So the robot is officially "done". Of course by "done" I mean I am out of time! There are still a lot of things I would like to do, mostly on the software end but I am still fairly happy with what I have. The robot is able to get around the maze without getting stuck. It is able to put the candle out nearly all of the time, the only "glitch" here is sometimes it bumps into the candle before it sees it. I can find the "baby" somewhat reliably although that hasn't been tested quite as much.

The biggest thing I wasn't able to get to is some sort of mapping software so that it has some concept of where it is at. It is pretty simple navigation code at this point. It simply follows the left wall then after a certain amount of time (which can be configured at compile time) it switches to following the opposite wall. Hopefully this will be enough to prevent it getting stuck in a loop. Unlike previous years they are not going to reconfigure the maze between runs so I hopefully can look at the layout early in the day and make any needed changes.

I am told there are a total of 10 robots entered in the "expert" division. I talked with 3 or 4 of the other "expert" division builders today. It sounds like most of them made the typical mistake of making things too complex and leaving too much to do toward the end. My robot was the only one I saw actually moving about reliably in the maze so it is looking good as long as nothing breaks (knocking on wood as I type of course).

They usually post results on the web page later in the day after the competition if any of you are curious to see how I did. I will certainly add a new post here but likely not until Monday and since that is my last day before going back to work I will probably sleep late!

Monday, April 9, 2007

The final week!

It is crunch time now. I am down to less than a week to go before the contest. Sorry I have not been good about posting lately. Rockhopper is completely built now (or as built as it is going to be). Building the bot itself and getting the low-level programming done and working took longer than expected (i.e. see my last post about the i2c performance issue). So, it looks like once again I don't have much time left to do the interesting high-level AI programming I wanted to do. I do however have it working fairly well now. It can detect and put out the candle without much trouble. It can also do a fairly good job of not getting stuck in the maze. I was having some trouble where it would run into the corner of a wall if it was in the blind spot of my ir range sensors and sometimes the bumper switches would not trigger so it would just keep pushing against the wall (very bad). I added some code to check the wheel speed based on the wheel encoders so now when the rpm of the wheels drops it knows it is stuck. This seems to be working nicely now.

I also built a beeper used to mark where the "baby" is in the maze. The "baby" is a 15 watt light bulb painted black. When the robot finds this it is supposed to drop a beeper that beeps 2 times per second. I am really happy with my solution for how I drop the beeper. I will try to take pictures of it if I get a chance. Basically it is just a motor on a hinge with a small rubber wheel on it. The wight of the motor holds the beeper in place then when the motor is turned on, the wheel spins the beeper off. This also releases the switch on the beeper which turns it on. This all works better than expected. I now need to work on my code for finding the baby itself. I plan on doing that later today.

What I have been working on the last couple of days is trying to use a neural network to interpret the sonar data. I hope that this will help filter out the false pings you commonly get with sonars. So far I am not having much luck but I have found a few critical errors in my code. I wrote the original code late at night long after I should have gone to bed so it isn't as clean as I would like. If I don't get it working somewhat well by lunchtime today I am going to scrap the neural net idea and write some simple code that uses the raw data. It will be more likely to do strange things because of false pings but at this point I am running out of time!

So, looks like I can certainly do the task of the competition but not as well as I would like. Probably the biggest thing that I need that I have done no work on is somewhat to know if it is just doing circles in the maze and not actually exploring new areas. If I get my sonars and the "baby" detection stuff working that will be my next task.

Next Tuesday I go back to work. I really am enjoying my time off but it will be nice to get back to a 5 day work week! I have been averaging about 10 hours a day 7 days a week on this.