First off, a big thank you to the hardware and software developers of the APM autopilot. Without it I wouldn't have been able to pull off a working autonomous system in such a short time. Thanks as well to Jack Dunkle for helping me out with a late encoder addition.
A couple months ago I saw the SparkFun AVC announcements and decided to enter. I bought parts early, but didn't get it all working right until the end. Here are all the details on my entry, for anyone interested.
Hardware
Software
My code runs three loops, nominally at 100Hz, 10Hz, and 1Hz. Here's what each one does.
And that's it! I tried to do some fancy stuff with the rangefinder, detecting obstacles approaching at close to vehicle speed (stationary obstacles straight ahead) and then making the car swerve to avoid them. It worked too poorly and so I took it out, since I figured it would probably hurt more than help.
The last little bit is dealing with GPS coordinates (latitude and longitude). I converted them immediately to Cartesian coordinates on a plane. In a small area, this works very well. I had two sets of conversion factors, one for Pasadena and one for Boulder.
Compass mounting calibration was key for getting this to work. My method was setting a waypoint, pointing the vehicle toward the waypoint, and changing an offset parameter until the heading error was close to 0.
I was able to avoid the barrels and get the arch bonus by careful waypoint placement to minimize the effect of GPS error (waypoints far apart). Also, I was lucky.
SparkFun AVC
I came to Boulder Thursday night without working throttle/steering controllers and no waypoint code written, but I managed to work it out Friday morning and afternoon, testing in my friend's apartment's parking lot. Friday evening I tried to write obstacle avoidance but scrapped it and slept instead.
Saturday morning I got to SparkFun a little early and set up my waypoints (7 of them), and ran some test runs. I made it around about half the time, doing better after I altered the steering trim to eliminate a leftward (and water-trap-ward) drift.
I ended up with 3rd place and $100, which is much better than I expected. Congratulations to Team Tobor and Team Minuteman, from what I've read, heard, and observed, they were both running very slick systems. Thanks to SparkFun for putting this competition on, I'll definitely be back next year!
Comment by Nathan on April 25, 2011 at 2:04pm Hey John, great job on the race. Getting throttle control and waypoint management working in about a day is quite impressive!
Your rustler looked pretty fast. Was it the one that shot out like a rocket at the beginning of the mass start? That was funny.
I'm working on a write-up on my experience with the race. I'll try to post it tonight. Congrats,
Nathan (aka minuteman)
Comment by John Leichty on April 26, 2011 at 1:37am Nathan, thanks. No, my Rustler was busted too badly to participate in the mass start. I think that was DonutsCoffeeMuffins.
Chris, sure thing. My code is at the link below. Use at your own risk. :-)
Comment by Richard Burnside on April 30, 2011 at 6:55am My wife got a video of the last heat showing your car break its wheel. Here's the link: http://goo.gl/HWs6B
I'm pretty sure that your car broke it's wheel hit the wooden crate at the beginning of the race and not when it hit the stroller...my wife's stroller! Slow motion shows the wheel detach awkwardly after the impact.
BTW, I was in your heat (team roadrunner).
Comment by John Leichty on April 30, 2011 at 11:42am Ouch, you're definitely right, and that makes a lot more sense. Thanks for posting that.
Here's the view from the car: http://bit.ly/j64DHG
Comment by Robert Sellers on January 2, 2012 at 7:06pm I'll be there as a new competitor in 2012. I look forward to competing against you!
Comment
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.51 members
83 members
24 members
682 members
1289 members
© 2013 Created by Chris Anderson.
Powered by

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