Sparkfun AVC summary from Minuteman--LONG

Minuteman in the pits

 

Lining up for the final heat

 

Roadrunner

 

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.

Views: 494

Comment by Bernard Michaud on April 26, 2011 at 7:01am

Just love that realistic description. That's the real life.

Thanks and BRAVO for the persistence !

Comment by Luke on April 26, 2011 at 10:59am
Great writeup Nathan, especially for those of us who weren't there - you gave me a great mental picture of what the event must be like. Better luck next year, but you should be proud of your accomplishments this time as well! Taking a unique approach and still placing as high as you did is a success in itself.
Comment by Paul Mather on April 26, 2011 at 7:51pm

Here's this spectator's view on Nathan's madness. I was at the event and was officially registered as a last minute plane entry called "Plan B" and I was assisting Doug with his plane "Death by Pinetree." I was heat #18, Doug was #13 and I think Nathan was somewhere around heat #5 or #6. So I spent a little time watching the ground events first thing in the morning.

 

Nathan was really confusing a lot of spectators as he must have run the course about 6 times before his heat and picked up his car mid-run each time sometimes after the 4th turn....so we watched the cars all take off with the bang of the starting gun and about 1/6th of the crowd followed the Sparkfun spectacle around turn one....meanwhile, in at the starting line, Nathan had perfectly aligned his car and took off. I'm still not sure how he got around the mass of people standing in the road on the lake side of the building, but there he was sprinting behind his car. All of the other competitors in the heat were dead in their tracks....but not Nathan. As he made it down to the final turn I remember watching him scoop up his car and continue running into the pits. It was bizarre to see. "Did that guy just ruin his run on purpose?" I was asking myself and those around me.

 

It took another heat or two and Nathan once again being the only competitor to make it around the building only to ruin his run on the last turn. He appeared to have completed the course numerous times when nobody else in the field had even come close. He sure looked like a shoe in once I realized he was only testing (which required me asking him at one point and he explained about the change in temperature). When it was his actual heat to race in, there was another car, the yellow Grasshopper that seemed to be equally as fast. Off the starting line, Nathan's course was further to the left and then made a 90 degree turn to try and hit the hoop which at that point was on the right side of the road. This caused problems when there was a car out in front as Nathan's car would have to cross in front of his competition. I saw the judge step on his car and figured he was done for the day....and he'd been robbed. I didn't realize it was a judge until I read your write-up here. I thought it was the driver of the Grasshopper or a spectator. If Nathan had been in ANY other heat but the one he was assigned, he wouldn't have had anything to worry about.

 

After seeing him complete the circuit so many times I didn't really think there was any chance anyone else would beat him. I was shocked to find that he came in second!?!? And behind by only 1 second? These were guys with manual stop watches...easily within the margin of error. I would have called it a tie and split the winnings between both of you. It was way too close.

Comment by Nathan on April 26, 2011 at 9:33pm

HappyK, thanks for the perspective and the comments. I remember chatting with you, and I remember you saying that you would be at the competition. I didn't put 2 and 2 together until now. I wish I had thought to chat with you about your ground control software, but I was pretty self absorbed at the time.

 

As for the many successful practice runs, that's what hurts the most about my loss. Why did they have to be just practice runs? But, I know what I need to do next year, and I have to assume that they will no longer allow practice runs.


Developer
Comment by John Arne Birkeland on April 27, 2011 at 2:35am
First of you where well withing you right to compete with the current rules. But I have to play the devil's advocate here and ask if your approach is in the spirit of the challenge? What I mean is, can your system truly be called an self navigating autopilot? To me having to learn the track beforehand, defeats the purpose since it is more like playing back a recording then navigating obstacles. Don't get me wrong, you solution is technically very sound. I am just not sure it will fly in the long run (someone mentioned limiting practice runs). I would recommend a hybrid solution. Dead reckoning for short term navigation using GPS coordinates and other sensors for long term corrections.
Comment by Paul Mather on April 27, 2011 at 4:28am
No problem Nathan. It was a hectic day for everyone competing. I remember reading your post here on DIYdrones a few days before the competition and was amazed to see how well it worked. Compared to the GPS systems which generally didn't make it off the start/finish line and if they did they mostly didn't make the first turn.... It was amazing to me how bad everyone did....but I guess that side of the building was giving funky GPS readings...
Comment by Nathan on April 27, 2011 at 7:41am

John, thanks for the input. I would argue, though, that my approach was the very essence of the spirit of the competition. Of the bots I surveyed at the competition, I think every one depended on a GPS, and probably a compass or gyro, at the bare minimum. I believe that for the past two years this has been the case as well. Without patting myself on the back too much, I did attempt something new and original (OK, dead reckoning isn't new or original, but applied to this competition, I  think it is).

 

Also, I think every bot (including mine) has the same basic algorithm. Try to estimate your current location, and calculate what direction you need to go. In the case of tobor, estimating where you are means fusing together data from multiple sensors and filtering them to make a best estimate. For some others it was simply trusting the GPS. In that sense, mine wasn't fundamentally different. Every one of these methods has some inherent error in the estimation, and every one of the winning teams had to take practice runs and adjust waypoints. Scott (tobor) told me that he adjusted the waypoint for the second turn after each run to finally get through the hoop. So, practicing the course is well within the spirit of the competition, I think. 

Comment by Phillip Toone on April 28, 2011 at 9:11am
I can't believe they used manual stopwatches.  SAE did the same thing for the mini-baja acceleration competition when I was in college.  Consequently I didn't have much faith in any declared "winner" when the times were so close.  I remember being a kid in the rodeo club back in the 80's. We were just a bunch of hicks with horses but we somehow managed to afford and setup a laser based timing system for our horse events.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service