Nathan's Posts (4)

Sort by

Minuteman AVC 2012

3689463395?profile=original
Minuteman
This is another write-up of my Sparkfun AVC experience. This year I worked closely with Roadrunner, who ran a similar vehicle and the same code. We collaborated using google code and SVN, which made us feel like "real" programmers.
3689463417?profile=original
Minuteman's twin, Roadrunner.
Minuteman intro
Minuteman uses a dead reckoning navigation system with a gyro for direction, and an optical encoder for distance. The car starts at a known position and direction which is designated as coordinates (0,0) and angle 0. As the car moves, the direction and distance are used to compute the new position approximately every inch. This process is all interrupt-driven, so the position is computed, even when the car is under manual control.

Programming the car is done by manually driving it around a course and recording waypoints (4 waypoints for a square course, for example). To re-run the course, it is set back at the original starting position (and angle), and set to auto-mode.  The car uses a proportional steering algorithm to steer to the waypoints with open-loop throttle control. If the car doesn’t hit the waypoints exactly as programmed, the waypoints may be edited on a spreadsheet for fine-tuning. Generally, if allowed to temperature-stabilize, it is very repeatable from run to run.

Ardupilot
I chose an ardupilot (original) for this project. It’s basically an arduino with a multiplexer and attiny chip for switching between manual and auto modes. It is powered directly from the ESC and has worked like a real champ throughout much testing and countless crashes.
3689463506?profile=original
Ardupilot--the brains

Gyro
The gyro is an Analog Devices ADXRS613, single axis, analog output,  from Sparkfun. It is sampled at 19.4 kHz by a free-running ADC on the ardupilot. My testing has shown that the null value shifts linearly with temperature, so letting the car temperature-stabilize for 5 or 10 minutes before running is important. Once stabilized, the drift over 1 minute is negligible. The gyro rate is very stable over the temperature range of interest, and is assumed to be linear over all rates (within specification).

Encoder
The encoder is attached to the transmission input shaft. It’s made with parts from an old computer mouse, and has 8 divisions per revolution. The signal is very clean, and is able to drive an interrupt on the ardupilot with no signal conditioning. With the light shield in place, I believe it’s completely immune to noise.
3689463477?profile=original3689463437?profile=original Optical encoder, on transmission
Pricetag
Losi XXX roller: $60
brushless ESC and motor: $60
Gyro: $25
Ardupilot: $25
Total: $170

AVC 2012
On Friday I went with RR to the sparkfun building for testing. There were probably 10 other teams there doing the same. Testing went well, and I was able to establish some waypoints for the corners and some possible barrel locations. My best lap times were around 40 sec.The car can go much faster, but goes out of sight quickly and would be destroyed by a curb--so I didn't want to take any chances. 

On the day of the race we got to sparkfun at about 7:45 and started testing. My first problem was that a food truck had parked in front of the electric pole I had been sighting the car to (have to set the initial angle for dead reckoning). I re-sighted on a tree, which was later covered by another food truck. I tried not to take it personally :)
3689463490?profile=original
I use a scope for setting the initial angle

First Heat
After setting up my waypoints for the hoop, I did a bit more testing, and ran an entire loop. Then I had to put together a complete course and adjust some waypoint locations, however the testing period was over. I made the adjustments in the spreadsheet and uploaded it to the car. I had not tested the full programmed course, so I crossed my fingers, sighted-in the initial angle, calibrated the gyro, and sent it off at the starting "gun".  To my surprise and relief, all the adjustments were right on, and the car navigated perfectly. My time was about 50 seconds - 30 = 20 seconds (I think). This was faster than any previous official time, so just like last year I held the course record, at least for a brief time. I maintained my first place throughout the heat, until round 8 when team 0x27 clocked a very fast time by plowing straight through barrels and through the hoop. It was a huge 1:5 scale car and had no problem swatting the barrels aside. I believe their time, with hoop deduction, was 6 seconds. 
3689463523?profile=original Start of heat 1
Second Heat
The second round, I was feeling good. I would have to turn the speed up very high to beat 0x27,  and I wasn’t ready to do that yet. So, instead I cranked it up to 40% (1700 us) which is still pretty fast. I changed nothing else, including the waypoints. I lined it up, and it took off. As it rounded the first turn and headed to the hoop, I could tell something was a little off. It was a tad to the right and headed very close to a barrel. As it went by, the front right tire nicked the barrel, breaking the steering linkage. My initial reaction was that the run was over, and I was about to hit the kill switch. I let it go, though, just out of curiosity. The bump had steered the car a bit to the left, and it went directly through the hoop. As it continued to the second turn I had a glimmer of hope that it may somehow still be able to steer. All the turns were right-hand, which favored the left (and unbroken) wheel. As it shakily rounded the turn I started to smile. It rounded the third turn a bit off course, but close enough to keep going. With dead reckoning, any small course errors near the beginning can mean total failure the further you go. It headed down the straightaway, going wide left, and nearing the boundary poles. It stayed in, though and headed around the final turn. By this point it was far ahead of me, and I didn’t get to see it go for the finish line. I counted off a few seconds, trying to estimate when it would cross the finish line, then hit the kill switch. I could tell from the announcements and applause that it must have made it! I jogged around the corner to see it lying about ten feet past the finish line, one wheel folded up. This point hadn’t gone unnoticed, by the announcer, who was graciously pointing it out to the crowd. As my time came back, I had even more reason to smile. It had completed the course, with a broken steering linkage, in 9.4 seconds (including bonus). I was now only 5 seconds outside of first!

Stepping it up
Now my attention was turned to fixing the steering. I didn't have a replacement for the part that had broken, but only the mounting hole had broken. Fortunately, there were other mounting holes available, so the fix was quick. Now, I waited for Team 0x27. I need to see just how fast I might have to go in the final round. As it turns out, they bested their previous time, and were now at 2 seconds. So, this meant that it was time to pull out all the stops. Go for broke. I felt my second place was pretty secure (only to find out later that it wasn’t). My car, with its Velineon brushless motor and lipo battery is capable of some insanely fast speeds. So I decided to crank it up to 100% throttle. I had never tested it at anything close to this speed. If it made it around without crashing, it would probably be well under 30 seconds--remember, it had just done 40 seconds (unadjusted) at 40% throttle and a broken wheel. So, I made the changes, and decided to do a bit of testing.

Disaster strikes!
As no testing is allowed on the course, I went to a neighboring parking lot to test it. There wasn’t as much space there, but I really wanted to see how it would do in a straight line, and around a single turn. I pointed the car straight down a corridor, and let her rip. It took off like a banshee, the slipper clutch screaming wildly to keep the front wheels on the ground. Instantly, it veers at about a 20 degree angle (doh my first waypoint was at an angle!) It’s screaming along, headed perpendicular to a curb, and still picking up speed. I panick, fumbling for the kill switch, but it’s too late. The car slams into the curb with such force that the entire steering assembly is severed. I see the main chassis fly in one direction, and the steering assembly in another. I know immediately that my day is over. I’m happy that I did well for two rounds, but frustrated at my stupidity. This is exactly why I never tested it at these speeds. Failures are catastrophic.

Assessing the damage 
Cursing myself, I go pick up the pieces. The brushless controller, with its huge heat sink has separated in 3 parts. The LCD has broken from its mounting and separated from the cable. The car is lifeless. The chassis is sheared in two. I take it back to the pit to more closely assess the condition. I plug everything back together and flip the switch. It turns on. I pull the trigger, and the wheels spin. The steering servo is OK also. Hmmm. I put the two pieces of the chassis together--it’s a pretty clean break.
3689463554?profile=originalSpeed control in bad shape

MacGyver time
It’s announced that the next heat will start in about 45 min. A crazy idea starts to form. I need some epoxy, and some kind of stiff strut. I raid Roadrunner’s tool kit for some hex wrenches. I go in search of some epoxy, and one of the aero guys lends me a bit. Meanwhile sparkfun goes looking for some as well. I apply some of the epoxy to the hex keys and hold them in place on the bottom of the chassis. My son, Eric helps with the application, while I hold it together. Sparkfun comes to the rescue with a larger tube, and we start liberally applying the epoxy. Within about about 20 minutes it’s firm enough to stay together on its own weight, but still feels much too soft to run on. On the suggestion of a fellow competitor, I borrow a head gun, hoping to accelerate the curing process. It’s 5 min. epoxy, but that seems awfully optimistic.
3689463541?profile=original
Epoxy patch, hex keys and all

Heat 3
The first round of heat 3 starts, and I’m done with the heat gun. The epoxy still isn’t hard to the touch, but it’s starting to feel pretty strong. I put it on the ground a run it around a bit. Seems OK. I can’t believe I’m about to race after what I had just witnessed 45 minutes ago. I get everything set for the run. My heat comes up, and I line up next to the monster truck (a stampede). The race starts, and my car jogs off the line for a few feet. See, with the speed dialed up so high, I didn’t want it to jump the start line too much, so I had it go out slowly for the first few feet before accelerating. This is a deviation from the other two runs, where the car immediately jumped out to the lead and stayed there. This time, though, the monster truck gets a few feet out in front, and when my car finally decides to take off, it angles to the first waypoint and slams aggressively into the back of the monster truck, flipping them both over. My run is over, and I have unfortunately ruined the other car’s run as well. Surprisingly, the epoxy holds, and the chassis is fine.
3689463567?profile=original
Pile-up on starting line

Data Bus
Now, I wait for the other heats, feeling confident that I’ve got 2nd place in the bag. My most probable competitor, Roadrunner, has an amazing heat which involves weaving around multiple barrels, through the hoop, breaking a wheel, and ultimately crashing out on the 3rd turn. He was on pace to beat me. The last heat features team 0x27 which inexplicably has a glitch at the starting line, and doesn’t make it to the first turn. GPS jamming, they thought (?) I see data bus head out around the first turn, not thinking much of it. When it flies around the last turn about 30 seconds later, and catches some major air crossing the finish line, I have flashbacks to the previous year when I had been beaten in the very last heat. Fortunately for me, data bus missed the hoop--his 37 second lap time would have torpedoed me. I’m lucky for once, I guess.
3689463658?profile=original
Data Bus, catching air

Mano a Mano
As a final competition, just for fun, I am asked if I want to go head to head with team 0x27, and I accept. We both go to line-up, but realize that we want the same starting position. We separate the cars by about a foot, my sleek and sporty Losi XXX next to the 1:5 scale behemoth. I’m assured that the proximity won’t be a problem, since team 0x27’s car will be gone before minuteman has a chance to get in the way. The race starts, and I smile when minuteman gets out to the first corner well ahead of the other car. Unfortunately, that’s where the fun ends.

I have never tested minuteman to go all-out. It’s just too fast. Under manual control I have briefly taken it to full throttle, and any small twitches of the steering usually result in a heinous roll that makes me wonder what I’ve destroyed. My code is a little better than that, though and knows to apply brakes when approaching a waypoint. The braking level has been set to not cause skidding, but that may not apply at really high speeds. As the car approaches the first turn, it applies brakes, fishtails a bit, and swerves, causing a rollover. When the steering null point is off, minuteman tends to swerve at the last moment to hit a waypoint. The previous crash and re-attachment of the front end had resulted in a change in the steering null, as well as the hard braking at high speed was a recipe for failure.
3689463616?profile=originalGoliath 1 - David 0

The Winners
Team 0x27 finished the course in an (unofficial) record time of 27 seconds, Their car did amazingly well, and was easily the most robust. The huge 1:5 scale size allowed it to plow through barrels and glide over potholes with relative impunity. They had worked on obstacle avoidance software, but it was apparently un-needed and not used. They benefitted from good programmers, financial support from sponsors, and top notch navigation equipment not available to most hobby enthusiasts. Their GPS unit was an industrial-grade Hemisphere, the kind of equipment that isn’t listed with a price, just a “contact us”. It has a 20Hz update rate, and didn’t seem to have any trouble navigating on the side of the building where most GPS’s get lost. In chatting with their lead programmer, it sounds like their algorithms were very robust, and they apparently had about 3000 lines of code. It was an impressive project all around.

Next year
It appears now that vehicles will be going fast enough that an average “basher” has no chance of winning. Stampede? Grasshopper? Emaxx? electric wheelchair?  All of these will likely be too ponderous to navigate turns at 20+ mph. I think you will need a well-tuned race car to take the top spot. Fortunately for me, my Losi XXX already fits that bill. It would be nice to have a 1:5 scale brushless monster, but that’s not in my budget. Maybe it’s time to start looking for a sponsor.

Minuteman is set-up for a dirt track with jumps and washboards. This means the suspension is plush, and tends to roll when cornering at high speed. To counter this, I’ll lower the suspension, using shock spacers, and stiffen it up with different springs and more viscous oil. I’ll play with the toe and camber and hopefully end up with a car that zips through the turns on pavement. I considered going with a road-specific car, maybe AWD. With the rough conditions of the sparkfun parking lot, though, I guess I’ll stick with the Losi.

On the software side, there isn’t much to do. I’ll probably add in some cross-track correction, and smarter speed management (closed loop). Maybe at some point I’ll play around with object detection. I’m thinking opencv on an android or something. I’d also like to be able to edit waypoints over bluetooth, using my android. It’s hard to plan too much without knowing if Sparkfun will decide to drastically change the rules. We’ll just have to wait and see.

Thanks
And finally, I’d like to thank Sparkfun for making it all happen. From the organizers, to the volunteers, the guy who found some epoxy for me, and the nice lady trying to interview socially-awkward engineers about their nerdy projects. The cool announcer, the race director, all the guys that loaded and unloaded heavy equipment. You’re all awesome!
Read more…

More details on Minuteman

3689403967?profile=original
GPS vs. Dead Reckoning
So, I decided to try the bare minimum first, then add complexity as needed. It turned out that dead-reckoning worked pretty well. With some refinements, I think it will work REALLY well. Also I came to the conclusion that heavy reliance on GPS will doom any bot to slow speeds. The location error and slow refresh rates make it useless for speeds like 30+ mph (which is my goal). I understand that the speed and direction improve at higher speeds. I guess my point is that if you rely too heavily (or completely) on it, and it only updates at 1 Hz (or even at 10 Hz), you will be into the wall before you know where you are. There has to be some degree of location estimation between updates to keep you on course (at least on a tight course like the sparkfun parking lot).
Steering
Steering was simply proportional to the angle between the current heading and the waypoint, with a 90 deg. limit. (next time I'll make it proportional to speed, or yaw rate limited). I used a nominal setting for "straight", then just added or subtracted from that depending on the direction. The one problem I had with this is that my "straight" setting changed at some point, so the bot would very slightly pull to one side. As it would approach the waypoint, it would eventually get close enough to realize that there was a significant error in heading and swerve a bit right before the waypoint. Maybe a real PI controller, emphasis on the I would help correct that.
Throttle
The throttle was even more embarrassingly crude. It was open loop, with a fast and slow setting. Within a certain radius of the waypoint it would kick down to slow to navigate the turn, then kick back up to fast for long distances. Since I have an encoder on the transmission, I could have easily incorporated a PID controller (actually probably just proportional) and controlled the speed really well. I actually wrote that code, but didn't have time to test it.
GPS
Chassis
My car, BTW is a Losi XXX graphite. I had bought one as a roller a while back and though it would be perfect for this application. I also thought of using my emaxx, but its plush suspension rolls a lot during turns, which, if I understand correctly, will add error to my gyro. I figured I had to keep the gyro as close to parallel to the ground as possible.
In regards to wheel slip and dead reckoning, I haven't figured out how much I have to worry about pushing through turns. If the front wheels slip a bit, will it matter? Will the gyro data still be valid? Obviously if the rear wheels slip, then I've got a problem, because that's where my odometer is.
Odometer
One other issue that I meant to address was wheel expansion and it's effect on the odometry. I could come up with a simple multiplier that is proportional to the speed: simple curve fit. There's lot's-o-stuff I never got around to. 
Read more…

Sparkfun AVC summary from Minuteman--LONG

3689402714?profile=originalMinuteman in the pits

 

3689402689?profile=originalLining up for the final heat

 

3689402739?profile=originalRoadrunner

 

8:30 AM Friday, April 22. I leave Los Alamos, NM, headed for Denver. The weather is blustery, but I have a good audio book to keep me entertained for the 6 hour drive. After a stop for some food and gas in Walsenberg, CO I arrive at my brother’s house in Highlands Ranch by 3:00. We load load his stuff in my xterra, and head for the sparkfun building. There are a few teams practicing the course with their ground vehicles. I see a few traxxas rustlers, and the big t-rex vehicle. A father and son team is troubleshooting their car, and a handful of sparkfun employees are setting up tents and tables. The starting ramp and barrels have not yet been placed. My brother (team Roadrunner) and I get our vehicles out and commence the testing. Roadrunner’s car (a traxxas stampede) uses GPS for navigation, and depends mainly on a compass to adjust the heading. The side of the building closest to the pond seems to be difficult for most teams to navigate due to poor gps signal quality and limited space. Roadrunner has some successful runs and he refines his code and waypoint placement.

I start testing minuteman, and have some successful runs. Minuteman is a dead reckoning system, that is unaware of it’s latitude and longitude with reference to earth. It only knows where it is in relation to where it started. It knows how far it’s gone and at what angle. Each inch or so, it updates its coordinates, and it does all of this in the background. It can be manually driven to some location, and it will take care of updating its position as it goes. At any time, it can save its current location as a waypoint in eeprom memory. Many waypoints can be saved sequentially, and later navigated automatically.

How, specifically, does it do this? Well, it uses two sensors, an optical encoder on the input shaft of the transmission, and a mems gyro. The encoder measures, very accurately, how far the wheels have turned. Its output is fed to an external interrupt on the controller (an ardupilot), and every x number of clicks, it calculates a new position. To calculate the new position, you also need the angle, which is provided by the gyro. That’s it, in a nutshell. I’ll add though, that you must always start the car at the same point and at the same angle to get repeatable runs.

So, for it to work you first have to manually drive the car to the various turning points, and set a waypoint at each one. With the ardupilot, it is simple to switch between auto and manual control, which facilitates this process. To set the waypoint, I click the 3rd channel button on my transmitter. The arupilot is programmed to recognize this action and save the x,y coordinates.

So, back to the parking lot, I map out the waypoints, and run the car a few times. At “slow” speed, the car navigates the course in about 1 minute (see, Minuteman, get it?) and at fast speed it goes around in 30-40 seconds. This is without the barrels and hoop, which will add some complexity.

Things don’t go off without a hitch, though. In fast mode, the car overshoots the points significantly. It will later course-correct by itself, provided it hasn’t already crashed into a curb. So it takes some practice to set the waypoints for high-speed runs. Usually I have to set the waypoints, then run it in auto mode a few times under close supervision. I can abort the run if it looks like it’s headed into a curb--this saves me quite a few times. Once a course is dialed-in though, it repeats it very reliably from run to run.

At the really high speeds, I had to be very cautious. Any mis-set waypoint could cause the car careen into a wall, and most likely break. The car goes much faster than I can run, so I would have to arm the car and let it sit and calibrate for about 10 seconds while I took-off sprinting around the building. I would be down at the second turn, now watching and waiting for it to come screaming around the corner. I would watch the car to make sure it was still on course, then sprint to the next  turn. Minuteman would pass me right about at turn 3. I would continue to chase long enough to see it round corner 4 (now way up ahead of me), and as soon as I saw it head for the finish line, I would abort, knowing that the run was successful.  I did this 4 or 5 times, until I could no longer run!

Satisfied with the testing, roadrunner and I headed back to Denver for the night. Next morning, we left at 7:20, with some foreboding clouds to the north. Small flakes of snow were falling, and soon we started passing southbound cars that were covered in snow. Not a good sign. By the time we got to sparkfun, at 8:35, the roads were wet, and a steady mix of light snow and rain was falling. We set up our gear under the tent and tried to get warm. I set up right next to the DIY drones team, so I got to hang out with the popular kids! Their quad copters gathered a lot of attention.

Around 9:00, I decided to brave the moisture, and do some practice runs. I did a setup run, then a test run at slow speed (60-second pace). On the test run, it navigated around the barrels and through the hoop and was rounding the 3rd corner, when it stopped. The LCD screen was blank, and I couldn’t get it to respond. This was really bad news, because in my many hours of testing, it had NEVER done anything like this. I hurried back to the tent, and tried to revive it. I recharged the battery and tried to blow any moisture off the controller board  (there were a few small drops of water). I still couldn’t get any response. Now I was really nervous. I figured at worst case, I could probably buy a new ardupilot from sparkfun and install it, but I would probably miss a heat or two. Meanwhile, Roadrunner came by to offer help, and he tracked-down a heat gun. Fortunately, about 2 or 3 minutes of hot air solved the problem, and I wrapped the ardupilot in plastic at tape.

By now, though the heats were starting, and I wasn’t set to go. Somehow in the process, my waypoints were fouled up, and I would have to reset them by running the course. Between heats, I got in a couple of practice runs, staying out of the way of the contestants. Now, I felt pretty good about everything, and I waited for my turn.

In heat 7, just before me, was roadrunner. With high hopes, he started, and was navigating the first turn, when he was T-boned by another car. They were both stuck beyond recovery and were forced to forfeit the round.

Now it was my turn. I lined up on the end of the ramp in my designated starting position and got everything armed. The starting gun fired, and my car sped off to the first corner.  Disaster soon struck, though, as a judge for one of the other cars inadvertently stepped on mine. Afterward, It looked like that kid from that bullying video on youtube who gets slammed to the ground. It just looped around in circles with a dazed look.  Luckily, though, nothing was broken.  As there was some time until the start of the aerial vehicles, I was permitted a do-over, as the interference was from one of the judges. This time, the car navigated the course perfectly, threading the hoop and rounding all the corners right on cue. The time was 56 seconds, plus a 30 second deduction for the hoop, made my official time 26 seconds! So far so good!

Now I had time to relax. The next-best time was around 1:20 seconds, and they didn’t make the hoop. So, I took some time to chat with the other participants, and to answer some questions about my dead-reckoning system.

While the awesome aerial vehicles were providing the entertainment, I thought about how to do the next run. I decided a medium speed would be best instead of going all-out, so I set it to about a 45 second pace. I started testing before the start of the 2nd round, but began to meet resistance from the event director. Apparently I was gaining an unfair advantage by running my repeated tests, and in general getting in the way of the event, so an announcement was made that no more test runs would be allowed.

After much begging, I was able to make a few set-up runs, but I had to line-up for my second heat without testing my newly programmed waypoints.  At the start, the car rushed out to the first waypoint, and turned a HARD right--a little too hard. I had set the next waypoint back at greater than 90 degrees to get lined up for the hoop, and with the increased speed, the car spun-out--end of turn. A test run would have revealed the problem, but it wasn’t to be.

This time, tobor (my main competition) had stepped things up, and finished with an excellent time of 1:02. For the second time, he didn’t make the hoop, but if he had made it...that would only be a 6 second difference. Now my supreme confidence was melting. What if he could still go faster? What if he finally got the hoop? I knew my car was capable of really fast runs, but without being able to set it up properly, I might not make it.  I went to lunch with a feeling of doom.

I got back from lunch, and while the raffle was going on I decided to try more test runs to dial-in my waypoints. I was quickly told that I would not be able to practice, because it was unfair. It was still at least another 10 minutes before the start of the final round, and there was nothing going on around the start line. I pleaded my case again, and was allowed to do a few more runs.

Now, however, there would be a wait of about 30 minutes between the start of the first heat and the final 8th heat where I could do no more practice runs. This wouldn’t be so bad except that the sun had finally come out, and things were warming-up nicely. Now, my negligence in not temperature-calibrating my gyro was starting to haunt me. Would this cause a slight change in the angular rate, causing some skew? I would find out soon enough.

Add to my worries, that the barrels had been moved and the arc was positioned a little differently. I knew my run was doomed. Maybe, though, tobor would once again miss the hoop. Or maybe his car just couldn’t go any faster.

So, as the final heat started, I had a pit in my stomach. My car got right off the line this time, and navigated the first turn nicely. But, as it sped down the straightaway, it passed the hoop just to the right. That was it. I couldn’t beat my other score without making the hoop, so the run was virtually over. The car navigated the next two corners and was on the final straightaway, when it smashed into one of the islands that stick out in to the parking lot. It broke a front suspension arm, but it didn’t matter. It’s day was already over. Meanwhile, tobor had indeed navigated the hoop--of course. It worked it’s way around the course at a good clip, but somehow it didn’t seem so fast. As it came around the final corner, a gaggle of spectators in tow, I was still hopefully confident that it hadn’t beat my 26 second time.

But, apparently my biological clock isn’t so great. 55 seconds was the reported time...and making the hoop, that was a final time of 25 seconds...one second faster the me...really? REALLY? Did he have to make the hoop on  *that*one*run*? REALLY?? That was the moment I was dreading. I felt like Laurent Fignon in the final time trial of the tour de France. I saw it coming from mile away, and was helpless to avoid it.

Minuteman was easily capable of victory. It could navigate the course faster than any of the cars there--I would say probably faster than any that have run it...so why didn’t it win? For various reasons. But first off, I have to congratulate Scott of team tobor. Well played sir! Your fusion of multiple sensors using DUAL kalman filters was rock solid. You finished every heat and clinically marched to victory with each successive attempt. Great job!

So why do I make the bold claim that minuteman was capable of victory? Well, it’s just fast and stable. It can go faster than 25 mph, and it goes straight to every waypoint without hesitation. It doesn’t hunt around or veer off course or miss waypoints. When the waypoints are properly set, it will burn through the course in under 30 seconds. But, being capable of victory, doesn’t guarantee victory.

Minuteman, unfortunately, required a lot of setup and expertise to use. It was difficult to know where to set the waypoints to avoid overshoot and/or spin-out.  Also, I never got around to temperature compensating the gyro, a fact that will haunt me for some time.

In the end, I have to concede that maybe mine just wasn’t the best system. Maybe dead reckoning is just too imprecise to be successful. Maybe it just requires too much set-up and testing, and is too prone to operator error. Or, maybe I just shouldn’t have slacked-off all March and April--I should have made all the little refinements that I never got around to. That’s a lot of maybes. One thing for sure, though, is that you won’t see me next year with a GPS-based vehicle!

Thanks, sparkfun, for organizing this event. I saw a lot of kids and teenagers there that were eager to get involved. Hopefully this sort of activity will inspire future generations to be as technologically innovative as generations past.

Also, as a note, roadrunner finally got a successful run of 1:18 on his last heat, putting him in 4th place overall. This was faster than any of the winning times from past years. I can vouch that a year ago, he was basically starting at zero on how to get an autonomous vehicle running. So, if you’re on the fence about competing next year, just do it. Get an arduino and an R/C car and some sensors from sparkfun, and go for it. It will be worth your time.

Read more…
3689401671?profile=original

I will be competing in the Sparkfun AVC competition this year using Ardupilot hardware in a ground vehicle. My car is called Minuteman, and works on simple dead reckoning. It uses Ardupilot hardware, with an optical encoder and a gyro as the only sensors. No GPS, no compass, no proximity sensors. Testing has been really simplified by using the ardupilot, because with my 3 channel radio, I can easily switch between auto and manual mode with the push of a button. I can first map-out a course by driving it manually and using my 3rd channel to set waypoints. Then I can put the car in auto mode, and have it re-trace the course. It's pretty simple in theory, but took a lot of fine-tuning to get working.

 

Making this project work with ardupilot required a complete re-purposing of almost everything on the ardupilot. A few modifications were made to the board to facilitate testing, and a fully custom firmware was written. It's hard to say how things will go this weekend at the competition, as I will not have a chance to pre-run the course (until the day of the competition). In near-by parking lots, it performs well. I'm optimistic! 

 

Read more…