Sunday, March 18, 2007

halfway point report

I am now at the halfway point through my sabbatical and Rockhopper is starting to look somewhat complete as far as the building part of it goes. Now I can start getting serious with writing code. I have spent the last few days with getting the bumper build and installed (along with switches to tell the CPU if it has hit something), fixing up and organizing the wiring and writing a Linux device driver to send the PWM signal to to the motors to control speed.

The first real usable user-space program I wrote was a simple bit of code that allowed me to log in remotely and drive the robot around with keyboard commands. I was surprised at how fast it moves with 12V batteries. I won't be driving the motors at full speed much. I considered just running them at 6V but I want the full 12V to power the fan to blow out the candle. I might be able to run it at full speeds down hallways when the sonars and IR rangefinders both say all is clear but at the speeds it moves it rolls so far after a STOP command that it will likely just crash a lot. I can do active breaking with the motors however I am concerned about how much stress that puts on the motor's gears.

I then wrote a short program to wander around and turn if it sees something close using the ir range finding sensors. This is Rockhopper's first bit of autonomous programming! I set up some boards as boundaries and let it roam about for a while. This pic below shows it happily roaming about.
My next plan is to take the code for roaming about the maze I wrote for my last robot (Fawkes) and port it over. It was written in Java and Rockhopper's code is in C but I am mostly interested in the algorithms I used. Fawkes was able to follow the maze completely flawlessly so that should be a good starting point. Once I get it working farily well I will incorporate the sonar sensor inputs for redundancy.


Matt said...

You talk about basic autonomous robot programming, and I get the urge to ask, "Can it turn right, or do you have to make three left turns?"

Anonymous said...

Doug is secretly a big NASCAR fan ;)