|
Simple dead-reckoning autonomous
This message is a little late, and I suspect there are other similar posts, I just couldn't find them...
Anyway, I have watched hundreds of competition videos, and participated in 2 regionals, and I was very surprised at how few robots attempted any sort of autonomous operations. I have to admit that when I first looked at Rack 'n' Roll autonomous, I thought that anything other than scoring had no value in the game.
However, after watching a lot of games, I came to the conclusion that even just driving forward and blocking the path between the rack and the wall could delay the opposing alliance enough to get some extra scoring done before they start pushing your alliance robots around.
What I hope to do with this post is give some teams a little push, and some helpful information to get going with a simple autonomous program.
The first step is calculating the wheel RPMs needed to achieve the desired distance and turn. I have attached an Excel spreadsheet that tries to help with this. It is not 100% accurate, but I think close enough, but I haven't tested these numbers on an actual robot.
The next step is measuring the wheel RPM. I picked up a LASER tachometer on eBay for about $30, and it does a great job of mesuring wheel speeds. Here is where I got mine, you might find others: (eBay is acting up right now and I can't provide a link, but here is a good search string "digital laser photo tach os".
The third step is adding some sequencing code to your robot program. If you're using EasyC is should be easy to output a value to the motors, wait a little bit, then turn them off. If you're using MPLAB, I have attached a short C file that can be #included in the user_routines_fast.c file, right above the User_Autonomous() function. Inside of this function, call Autonmous_Tick() where it says "put your code here".
This file implements a simple state machine for sequencing through some steps that output to PWMs, or anything else you want. It is a simple version that can be used in a number of applications.
I hope this all makes sense, and that it helps get some teams to try autonomous operations, even this late in the game.
Good luck.
|