paper: Killer Bees 2010 - BuzzXV Code

Thread created automatically to discuss a document in CD-Media.

Killer Bees 2010 - BuzzXV Code
by: apalrd

A complete copy of the robot code written for The Killer Bees 2010 robot, BuzzXV. Written in LabVIEW.

I was reading over the code from many other teams, and realized that I had not released mine, and if I was curious enough to read other team’s code they were probably curious enough to read mine.

How it works:
Robot Main.vi contains the basic loop, and the teleop function. I added a call to teleop when disabled to assist in debugging.

Three other loops are spawned, to handle Drivetrain (everything but the drive motors), the Claw (often referred to as “uber-claw”), and the Kicker/Ball-O-Fier (Roller). Each one handles its own timing.

Most of the code was written when the robot concept was created, and evolved as the robot changed. I have a file (articulation_constants.vi) which contains an enumerated state and several arrays of calibration data for a window-motor based articulation system for the center wheels, which we eventually abandoned in favor of using the claw to lift the center wheels. Likewise, most of the claw code was written later to handle the chassis lifting, and eventually evolved to automate the lifting based on whether the robot was turning or not.

I also included the dashboard I wrote for the Classmate. It is tabbed, so it handles each robot state (disabled, auto, teleop, debugging) separately. It automatically switches between pre-match (disabled), autonomous, and teleop if it is one of those three states. (It won’t switch if it is in a debug tab). It includes the kicker and claw variables, state, and output, as well as drivetrain average speed (in ft/sec). The drivetrain speed has two arrows, for the current speed and the max speed hit since boot.

If you look through the directories, you might find unused VI’s. This shows the evolution of the code as the robot evolves; Some of the original code still exists but is no longer used.

Warning: My laptop monitor has a resolution of 1920x1200. I sized all of my VI windows for this monitor, so they might not fit on your screen well.

I tried to keep as much of the code in original condition as possible, so you might find unused functions and variables, such as the “old” autonomous drive_straight.vi (which actually drives based on motor power for a fixed distance), which has since been replaced by the “new” drive_for_distance.vi (which does P control to speed on each side of the drivetrain). Any calls to the gyro are old, as the robot no longer has a gyro (We removed it for weight reasons at the championships.)

If you read through my comments (especially the blocks) you will find insight to what I was thinking while coding, and my thoughts looking back at it as I prepared it for release on CD.

If you have any questions, feel free to ask.

Buzz15_Code.zip (7.48 MB)
KB Coding.pdf (439 KB)

Would you mind attaching your white-paper as well to this thread? Is it still relevant to the latest round of code?

The whitepaper has lost relevancy, as it was written based on the initial code used at Kettering. Since then, the claw code has been expanded to include shifting the claw transmission, automated ride height control, and some improvements in the P controller when lifting (The gain scheduler and a few other improvements). I also wrote some timing code for the roller (It is still there, just commented out), removed any hope of camera use, and implemented the closed-loop speed control in autonomous.

I guess I could write something new, when I have some time.

I updated my original paper to include more up-to-date information, and fixed some issues with the original. Uploaded above.