Since it seems to be all the rage, I'll announce the posting of our teams code for this year here on CD (of course, its actually been available since the middle of march... ). Some features:
- 4 independently steerable wheels in swerve drive
- 'CompassDrive' (created by a student on our team), which allows you to control the robot relative to the field using a gyro (ie, push the joystick in a direction and the robot moves that way).
- Maintenance routines using an interactive menu system on the Driver Station LCD
- Custom servos to control each wheel, with an interrupt-driven auto-calibrate system
- A consistent and working autonomous mode using the gyro to control our position relative to the field.
- We created a custom layered framework to support selectable control system types at the top layer, with a bottom layer that controls the bot based on speed/angle/rotation parameters.
Files are posted at
http://www.virtualroadside.com/FRC/#Kwarqs2009
As a bonus, the code all compiles and works with my WPILib Test Harness, available at the same website. Unfortunately, I never got around to creating mechanisms to represent the encoders and such, so it doesn't look all that shiny. But you can see the menu system doing stuff in any case.
