|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Team 2423 C++ Code
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. ![]() |
|
#2
|
||||
|
||||
|
Re: Team 2423 C++ Code
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 =)
|
|
#3
|
||||
|
||||
|
Re: Team 2423 C++ Code
Well, some of it is a bit complicated I suppose. Something to work on for next year.
|
|
#4
|
||||
|
||||
|
Re: Team 2423 C++ Code
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.
|
|
#5
|
||||
|
||||
|
Re: Team 2423 C++ Code
Quote:
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. |
|
#6
|
||||
|
||||
|
Re: Team 2423 C++ Code
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. |
|
#7
|
||||
|
||||
|
Re: Team 2423 C++ Code
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.
![]() |
|
#8
|
|||
|
|||
|
Re: Team 2423 C++ Code
Quote:
![]() |
|
#9
|
||||
|
||||
|
Re: Team 2423 C++ Code
No, I'm 95% sure its done in LabView. http://www.ni.com/fpga/
|
|
#10
|
|||||
|
|||||
|
Re: Team 2423 C++ Code
Quote:
Last edited by Alan Anderson : 20-04-2009 at 21:50. |
|
#11
|
||||
|
||||
|
Re: Team 2423 C++ Code
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.
I'll be releasing the code for that shortly in a separate project, but its pretty sweet. Theres a demo posted here: http://www.chiefdelphi.com/forums/sh...ad.php?t=76928 |
|
#12
|
|||
|
|||
|
Re: Team 2423 C++ Code
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2423 KwarQs: Robot Video | AmoryG | Robot Showcase | 2 | 02-03-2009 20:38 |
| 2423 The KwarQs Picture #2 | AmoryG | Robot Showcase | 9 | 22-02-2009 20:13 |
| Code Declaration Window - Check Team in Code | DtD | C/C++ | 3 | 20-01-2009 07:09 |
| Team THRUST - Kevin's Code and Camera Code Combine | Chris_Elston | Programming | 3 | 31-01-2005 22:28 |