Thread: 1024's code
View Single Post
  #1   Spotlight this post!  
Unread 03-08-2010, 09:11 PM
LukeS LukeS is offline
4272 mentor, 1024 alumnus
AKA: Luke Shumaker
FRC #4272
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Indianapolis, IN
Posts: 60
LukeS is an unknown quantity at this point
1024's code

Here are complete copies of 1024's code for our 2009 and 2010 bots, in Java.

We meant to post this earlier, but never got around to it. The DC regional made it clear that this would have helped a few teams during build season, so here is 1024's code.

2009: Lunacy - reimplemented in Java
Here is a Java-reimplementation of 1024's Lunacy code. It is pretty faithful to the original LabVIEW code we wrote last year, except it doesn't have traction control (you can see where it should be in the `org.mckenzierobotics.y2009.TeamCode.drive' class (a method exists, but it is empty)). At several places, I don't understand what is going on, I just re-implemented what my LabVIEW code said, though I don't remember why it works. What's nice though, is that this code is fairly complete. Something that may be worth noting: if a class starts upper-case, that means that it was directly a VI in LabVIEW, opposite for lower-case. Also, note that all of my code for this bot is released under the GNU GPL 2+.

2010: Breakaway
I'll upload our code for this year's bot later, I only have an old copy on this computer. Naturally, this code is still evolving. Also, this is released under a BSD-3 license


Something that other people have a problem with when looking at our code, is understanding how we abstract things. In both projects, we have a `Control' class that is used as a way for Autonomous or Teleop to interact with the robot. Neither Autonomous or Teleop EVER touch hardware on the Robot directly. People normally have a hard time wrapping their minds around this, but when they do it makes a lot of sense.

Both of these have Mercurial repositories, so you can see how they evolved... though our comments aren't always helpful. We have pretty good Javadocs for both (also anormdun here (Andrew Dunlap) insists on being referred to as `LOLCAT' in the code)

Last edited by LukeS : 03-08-2010 at 10:19 PM. Reason: typo
Reply With Quote