Today is Saturday. Our site visit is on Tuesday. I've been working non-stop on getting basic waypoint-following down, but it just won't work. I can't get rid of the weaving. The problem is that it doesn't ever know exactly which direction it's pointing. It's all a matter of heading. An artical from Circuit Cellar at http://www.circuitcellar.com/library/print/0404/Miller165/3.htm describes the problem:
"A single-antenna GPS can provide heading information, but it is not instantaneous. It inherently lags the movement of the robot or vehicle because the derived heading requires previous position data. A GPS could not tell you where you are heading if you were to stop and change directions. Like compasses, GPS receivers do not require external reference heading calibration. Once moving, the GPS heading update rate is a maximum of approximately 1 Hz, although some receivers add damping, which increases this time constant even more. A dual-antenna GPS receiver can provide instantaneous heading—or yaw—information, although the recommended distance between the two antennas is 1 m. This fact, along with its large price tag, can be a limiting factor for many mobile robot applications."
Because of this I have been using dead reckoning unless the Expeditor has been going straight for a few seconds, but it's still not that good. Today I bought a $400 GPS with a built in compass and switched it out, but the compass always thought the computer's harddrives were north. I raised it up on a PVC pipe a few feet, and it gave a good heading, but IT STILL LAGGED. It was better though. A little. It still works at speeds about 2 MPH but not higher. I did a lot of other work today also. I have a lot more work to do in the next two days.
I took the robot out to the site visit field before school, and then remembered that the pull start was broken so I couldn't start the engine. I pushed it down the first waypoint-segment. It had the same weaving behavior as ever. This is extremely frustrating.
UPDATE: I went to Home Depot and got a ratchet socket to open the pull start cover, opened it, took it apart, fixed the spring, and put a new rope on it. Now it works.
This week (except Friday) I start school two hours late, so I've been working in the morning on the robot. Today the pull start rope on the engine ripped and went into the engine. One more thing to do before the site visit... There's one week left.
At about 9 PM I went out to test the robot on the street, but the steering by remote control wouldn't work. After an hour I had fixed the problem. A wire had randomly broken in a connector. This is getting very frustrating.
This morning I fixed the battery wiring, but accidentally melted a 5V regulator. Afterwards I got some orange buckets at Home Depot to use to mark the waypoints on the site visit route as well as two 32 gallon garbage cans and some free wood for lateral boundary markers. The garbage cans being green, I also bought some white spray paint in case the neural networks can't detect the green garbage cans in the green field.
At the field I marked the lateral boundaries of almost the whole course, and tested the waypoint following some more to observe the robot's behavior. I also recorded data while driving the course, avoiding the waypoint markers and garbage cans on the route.
Once home I modified the software in yet another attempt to perfect the waypoint following.
The waypoint following only works while driving at speeds under 3 MPH. The GPS position seems to lag behind a certain number of seconds, which makes sense assuming it's averaging many GPS positions every second - if it's moving forwards, of course the average of the locations will be somewhere behind it. The higher the speed goes the crazier it's driving gets, until at speeds above about 6 MPH it just seems random.
I obtained permission to use a new field and sent an email to DARPA about the site visit location change. At the field I used the GPS to mark a route, and then had the Expeditor drive it. I encountered the problem above, until the battery fell off the robot and ripped some wires. Heh.
I tested it and it finally works. Now I have to perfect the garbage can avoidance.
Tested several new things and discovered and fixed several bugs. Still some problems.
I didn't go to baseball practice after school because I wasn't feeling very good, so I had some daylight left when I got home to test the robot. Using a neural network trained on a couple minutes of data recorded from the robot it was able to successfully turn and avoid a garbage can in the street.
There were still some problems with position finding, however. I made some changes to the code and found a few bugs. I'll test next time I get the chance.
I got the new OOPic chip in the mail and it works. That's a bit odd that the other one unexplainably stopped working. It isn't a good thing when parts of your autonomous ground vehicle stop working for no apparent reason.
I took the Expeditor out to the site visit location again to try to test it. It started out sunny, but the field was almost completely under water. It doesn't seem very likely it will be dry by the site visit. After that our minivan got stuck in the mud until a helpful guy in a pick-up truck came and pulled it out. It started raining very hard soon afterwards. I still haven't waterproofed X. I need Chris to help with that but he's sick with Mono.
Before the site visit (within the next two weeks) I need to
I reglued the throttle servo to the homemade servo horn - the original glue had broken.
Planning on testing the waypoint following again and then teaching X some obstacle avoidance, I took it out to my dad's friend Baird's field, but I immediately encountered a problem - the engine wouldn't start. Besides this, it started raining very hard. I have to water-proof the robot - it may be raining during the site visit and it has to be able to drive anyway. I took the robot to a auto shop, but they didn't know what was wrong with it. They checked the spark plug and it worked, and then sprayed some starter fluid in the combustion chamber and tried starting it and it worked a little, but according to the man at our next stop this was a very stupid thing to do and it will burn the oil off the sides of the cylinder and then the piston will scratch it. At our next stop, a lawn-mower repair shop, we got a new spark plug and it worked perfectly. The guy there said the problem was that the engine was flooded and it damaged the spark plug. I think it became flooded when I left it sitting in my garage for several weeks and I forgot to turn the fuel cut-off on.
I guess I'll start working on waterproofing it since there's nothing I can do in the rain.
Our site visit location:
I did some more programming and added some pictures to February 26th's blog. Our site visit is scheduled for May 3rd from 8:00 AM to 10:00 AM. Nineteen days left.
Fixed some steering issues. The store I ordered the OOPic replacement chip from is out of stock, so I ordered another entire OOPic from a different store.
I did a little wiring for the brake lights and audible/visible warning devices, but the OOPic unexplainedly broke, so I ordered a new chip for $33, this time a newer version.
I also made the 18 necessary markers for the site visit out of some pieces of wood and caution tape I happened to have.
I got some connectors at Radio Shack.
I edited the route planning simulator to simulate much less accurate sensor input from the neural networks (quite a bit less accurate than I'm expecting) and it still worked pretty well. Next week is Spring Break so I can teach X to avoid garbage cans in a field for the site visit. It will be awesome.
DARPA has selected us for a site visit.
I did another push test. Tomorrow DARPA will announce which teams have been accepted for site visits. I only hope we're one of them. I also made a slight change to the software so X will only try to turn the wheels if it's moving, just in case it's stopped in rocks because it was paused or it's processing and it's unable to turn the wheels, I don't want it using the 75 amps or so, plus it's probably bad for the steering motor.
I finally got some tests in. X has the same weaving behavior while trying to drive in a straight line, but this time I think it's for a different reason - the GPS has built-in filtering to try to get it's position in the same place and moving in a straight line, but it seems that this is causing it to delay its noticing when the vehicle has turned by about three or four seconds, and by this time the vehicle has already turned too much and has to correct itself. All I have to do is go by dead reckoning until X has been driving in a straight line for a certain number of seconds and then use GPS info.
After several hours of software development my friends Dane and Beto and I pushed the robot down the street and it finally drove straight down the street!