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.
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.
Whether or not we use LabVIEW next year, I’m learning C and/or C++. i think my head exploded from lack of being able to read the code. then again, it is midnight… oh well. Good stuffs =)
Its not that its too complicated, its just that i’m not literate in C++, just as i’m sure teams who only use C++ would have trouble with reading LabVIEW.
True story. When I look at the behind the scenes working of a VI I only see blocks and lines! xD
While LabView is great for automation and process control environments, if you’re looking for a career as a programmer, learning C++ will help you along much further. While you’re learning, make sure to learn basic Object Oriented concepts like encapsulation, minimization of coupling, and ect. as these will greatly increase the quality of your code in all languages.
If your school offers dual enrollment at a local college, I highly recommend you look into that option. Not only will you get a strong background in the language, but you’ll already have credits on your college transcript.
I’m definately getting into C(++) but at the moment i’m too busy to get a class and/or get into learning it myself however next year i’m planning on jumping into it.
by the way, go to the front panel of your robot’s main code and go to View–>VI Hierarchy. All of those are necessary to run the robot and i don’t know if its the same with C++ but just wow.
Yeah, if you download the code for WPILib, there is quite a bit of infrastructure necessary to make it all work. Then also consider that the FPGA (which does the heavy lifting in LabView and C++) is a ton of different modules written using LabView, and its a pretty complex system this year.
I’m pretty sure the FPGA was designed using a hardware description language, like VHDL or Verilog. I’d be very impressed if LabView can do synthesizable hardware designs
As an update, we’ve added an embedded webserver to the robot, that has an interface you can use to change variables on the fly. I believe LabView has a similar capability (it was the inspiration for it), but you have to use LabView to use it. This just needs a web browser.