Monday, June 18, 2012

2012 Autonomous Vehicle Competition (AVC)

Data Bus. Photo: Susan brady
The Dark Days Before

A few days before the competition my chances were in the toilet. My robot kept crashing into curbs, totally inconsistent, unable to navigate the course at any kind of decent speed. I flashed back to the embarrassing AVC disaster of 2011.

A year of slaving, theorizing, simulating... all seemed in vain, a waste of time, zero progress made. Then on Thursday I made a discovery: the entire problem traced to the heading estimation at the start of the run. I changed the code. And, little did I know, everything changed....

Thursday night I drove up to Boulder for one last ditch effort. After a couple tweaks, suddenly, miraculously, the robot was on rails! I upped the speed, tweaked some waypoints to accommodate the fast turn speeds.

Success. More speed. Success. And more! I quit while I was ahead after chasing the robot around the parking lot at 20mph. Consistency was amazing, speed was just what I'd hoped for. Would it be enough?

The drive home, I was amped, electric, amazed. It worked... it finally works! It all came together! I had made it around the building in around 35 seconds...

Oh my God! I might actually have a shot at this thing, after all! All it has to do on Saturday is run like it did Thursday night. Despite total exhaustion, sleep was hard to achieve that night...

Race Day, Run 1

Team 0x27's 1/5th scale buggy. Photo: Susan Brady
I was feeling better overall but incredibly nervous. Many friends were there to cheer me on. I met up with fellow competitor friends I'd been chatting with through email for months. I was in the last heat. Plenty of time to scope out the competition, make final waypoint adjustments.

I took time to watch the other heats, feeling a bit more confident but nerves still growing. I had only seen a few extremely fast robots. I knew what my robot was capable of but... anything could happen. Could I really stand a chance today? I didn't know about Team 0x27.

Data Bus at the starting line. Photo: Ted Meyers
My heat came up. Nerves. Up to the start line. Start! Robot shoots off-- oh ... no! Veering hard right... totally taken by surprise.

I watch in stunned horror as Data Bus does an exact repeat of its performance of April, 2011, making a beeline right into the building. The robot slams at full speed into the wall before I even think to disable it.

My the heat is over. What ... happened? How can this be? I'm right back to April, 2011's epic failure. This can't be. The robot was doing great Thursday. I have to snap out of it. I have logs. Perl scripts. Octave scripts, gosh dangit.

I don't even notice what happened to Team 0x27's giant 1/5th scale 4wd buggy. It had turned in an amazing run, going through the hoop for a time deduction.

Team Roadrunner. Photo: Susan Brady
I trudge over to the pits, hammer the cow catcher back into shape, and dig into the logs. The answer presents itself instantly. The gps plot shows the robot's skewed estimate of its position and heading.

The heading data shows violent, nearly instant heading changes in the first few hundred milliseconds of the run. The robot thinks it's pointing north. It was actually pointing east.

Team Daisy Chain. Photo: Susan Brady
That blasted ramp! All it took was bouncing off the ramp to completely confuse my robot. Ted offers a brilliant suggestion--go slower at the start. I hear him but, inexplicably, I don't actually take the advice.

Instead, I decide the robot should ignore the gyro reading for a second after startup. I test with friends' help in the nearby parking lot. The vehicle jumps off a curb and seems to be ok, but now there's an issue with the PID controller. The robot speed is stuttering. Now what?! 

Team DieWheel! Photo: Susan Brady
Overshooting due to a fully charged battery? I adjust PID parameters, nothing.  Sunlight interference? no. Time is quickly running out before the next heat. I look at the logs again. Speed measured from the left encoder is spiking like nuts. 

Do I just recode to ignore the encoder? Or wire the right encoder into both left and right sides to fake out the MCU? Then I realize ... the left encoder has gone out of adjustment. I move it closer to the encoder disc and test. Solved. Whew.

Photo: Susan Brady
Run 2

Photo: Susan Brady
At the line I'm feeling pretty sure I've not goofed the code. It should work now. Data Bus is ignoring the gps for 3 seconds until it converges and now it ignores the gyro for a second after startup. No problem. This will work. I think?

I'm a little more ready on the remote when to my utter dismay the robot takes off at full speed making a wide left turn into the crowd! I stop it before it injures anyone.

All the self-doubt is back in a microsecond. Oh swell. I've spent even more countless hours coming up with yet another robot that excels only at crashing. Time for a new hobby? My wife reminds me: "You know what this robot can do." 

Team Short Circuit. Photo: Susan Brady
I better go look at logs. Heading is a total mess. Whatever I did in code made things worse. Gyro bias is out of control and wildly inaccurate headings dominate. No wonder it crashed.

Photo: Susan Brady
I undo what I did in the code, and then add a new configuration parameter: start speed. I finally take Ted's great advice and start the robot at 4 m/s for one second, just enough to gently drive off the start ramp, then hammer down! I check and double-check the code. I test it in the parking lot. Looks good.

Run 3

Two time Champion Team Tobor. Photo: S. Brady
By this point the constant tension and pressure, not to mention the ambient temperature, have me exhausted. I actually am relaxed. At this point either it works or it doesn't. I've done all I can. I'm too tired to get worked up any longer.

It'll probably fail. I don't even know yet if any of my waypoints are in the right place to avoid barrels and course markers. If it even makes it past the first turn. Probably it'll make it that far, then crash into a barrel or hit a curb or something. I can try again next year.

Team Minuteman
Meanwhile, Minuteman has earned a 2nd place time, going through a hoop deducting 30 seconds off a very fast time. Team 0x27's buggy has amazed the crowd with it's scary speed and precision. They've run the course with an incredible time and have gone through the hoop. They're in first place.

I've learned through the pit grapevine that they're sporting a high-end GPS capable of 60cm accuracy. Their team of 6 all in matching black t-shirts are as intimidating as the giant black robot that mercilessly plows through the red barrel obstacles, effortlessly knocking them out of the way. They've solved the obstacle avoidance problem by not playing that game at all. Obstacle obliteration works much better.

I line up more carefully at the starting line and notice the GPS signal bouncing all over. So does Team 0x27 and team Namniart next to me. I back my robot off the starting line. Signal improves. Team 0x27 has had the same idea, but they are about 5 meters behind the starting line. I'm advised to watch out so I don't get hit.

It all comes down to this run. Success? ... or failure and humiliation? Probably the latter. The start "gun" goes off and I press the red button with a mixture of hope and dread... Data Bus slowly goes over the ramp, then starts to pick up speed

Photo: Susan Brady
WHAM! I feel a massive object impact my leg.

Photos: Susan Brady
I'm over. On my butt.  Holy CRAP that hurts! The pain in my ankle filters in and I look around seeing 0x27's robot traveling towards the dumpster... cripes, I've just been bowled over by a robot! My eyes go back to Data Bus...

Data Bus tears off from the starting line. Photo: Susan Brady
The robot makes the first turn... I realize my ankle is not well. I attempt to get up, realizing I won't be running to check my robot on the other side but I'm mostly thinking about hobbling over off the course. Man this hurts. No blood though.

Photo: Susan Brady
I get to the dumpster and turn around, catching a glimpse of yellow shooting out... Yellow!!!

The little Bus makes the final turn, my eyes are saucers... it's heading for the finish line accelerating to top speed... the crowd is cheering as Data Bus approaches the finish...

Photos: Susan Brady
Holy Toledo! Data Bus finally DID IT!

It brings itself to a stop exactly the same place it did on Thursday. I'm staring at the robot totally elated... it finally made it around the building!

People are coming up to me to make sure I'm ok... Team 0x27 apologizes, sees if I'm ok. I'm offered pain killers, bandaids, and ice packs by the wonderful people at Sparkfun. Somebody tells me the time... no hoop, but 37 seconds.

They tell me Data Bus is in third place. And that's it, the last run, I'm in third. I'm in THIRD! Oh my God! I've just placed third?!

The Beast


Oh Crap!
Photo: Susan Brady


The folks at Sparkfun are universally and unequivocally awesome people. Every one I have met has been awesome. Like the guy who came out to say hi on Thursday night and then practically dove into a prickly juniper bush to help me look for the video camera I lost off the robot when it slammed into the curb... 

Photo: S. Brady
And like the amazing folks that ran upstairs and laser-cut and crafted a Purple Heart Award at the last minute to give to me and Team Snowby for our respective injuries.

That was insanely cool. Thank you, Sparkfun people. :)

And, epic Kudos to Sparkfun for putting on the Best AVC Event Ever! They really pulled off a fantastic event. The spectator ropes were a brilliant idea and I'm glad the barrels moved around this year.

Team 0x27 earned first place for their unprecedented, awe-inspiring performance. Team Minuteman turned in excellent times on their impressive runs for a second place finish. Congratulations! And yes, I earned third place. :) 

Also, congratulations to the air category winners! It is no small feat to do this competitions in three dimensions!

Anyone who gave this a go: congratulations to you. Even if your robot crashed, even if your robot didn't make it off the starting line, you tried something really cool that few other people have tried and I know you learned all kinds of cool things. Whether you met your own expectations or not, believe me you deserve congratulations.

Meanwhile, I have to say a big thanks to all the people who have given me advice and help along the way. I deeply appreciate everyone who's emailed, conversed, commented, posted, etc.

I learned a lot, technically this year, but the most important lesson by far is how much more one can accomplish through collaboration and sharing of information than by going it alone.

I hope that in 2013, we can communicate more and really raise the bar for what our robots can do.

Photo: Susan Brady

Want to learn more about Data Bus? Take the "Data Bus Nickle Tour"


  1. Great write-up. After the dire predictions on your blog, and your first two failed runs, I kind of had you discarded as a competitor. Pretty much figured I had 2nd place all wrapped up. On the third heat, when the bus re-appeared around the last corner and caught some major air off the finish line, my jaw dropped. Definitely the coolest finish of the day. I guess I'm lucky you didn't make the hoop! Great job, and great blog. I wish I had taken some time to chat with you. See you next year--? -Minuteman.

  2. Congratulations! It's been great fun following your preparations. Besides your obvious technical skill, you have a gift for entertaining and informative writing.

  3. Yeah, it was a great AVC this year! Since I actually completed the course this year, maybe I will work on speed next. But what I really want to know is: where can I send my consulting bill? =)

  4. In case anyone is interested , the robot with the cat on it is Potentially Frenetic's, "The Woozle".

  5. @Minuteman: thanks! Hope to see you next year. Sorry I didn't get a chance to talk; I was too heads down fixing my robot. :( If you want to shoot me an email anytime and swap stories or compare notes, I'd be happy to (I have a contact me link on the blog here)

    @Steve: Thanks very much, that is most kind of you! Catch ya later and take care

  6. Nice story I can relate 100% as you have already commented on my version of the same story our experiences are very similar.

    Paul aka @unrocket

  7. I had my spectator's ticket ready for AVC 2012, but illness kept me away. I watched Sparkfun's live-produced stream instead. I had a total deja-vu moment at the start of heat 3. I even said out loud: "he's gonna get hit." And I had a hunch that if you did get hit, Karma would return the balance.


  8. Chapeau bas monsieur !
    The more I read your blog, the more I'm considering joinning a robot team - unlike you, I don't have the will and the energy to do this kind of project by my self.
    Keep posting your awesome stuff.


Note: Only a member of this blog may post a comment.