|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
Team 624 CRyptonite 2014 LabVIEW Code Release
Team 624, CRyptonite, would like to release the code for our 2014 robot, Sidewinder.
http://team624.org/files/624 2014 Code Release.zip Our code was written entirely by the students in our programming subteam. Some features: - A scripted autonomous with multiple modes, using an editor that "compiles" scripts into CSV files that we can eaily read as a 2-dimensional array in LabVIEW code - Hot goal detection with vision processing on the dashboard using an adapted version of the LabVIEW examples to work with two Axis network cams on the robot - Automatic gear shifting based on information from this thread - An automated ball pickup sequence using Banner IR sensors to detect the presence of the ball - Automated shooting of our pneumatic catapult, with a solenoid to select between two pressure regulators, as well as a variable "soft shot" that releases a bit of air before firing - A fancy custom dashboard featuring 117 tunable robot parameters that can be saved to a text file (we actually had to stop using NetworkTables midway through competition season because it was overloading our cRIO CPU at random times, likely related to the massive amount of dashboard controls and indicators) - I2C communication with an Arduino to control Adafruit NeoPixel LED strips to display status information such as shooter status, robot gear, and drivetrain mode for the driver. - Detection of the white line on the field with Banner IR sensors to automatically make running shots (we ended up not using this after week 1 because of the amount of defense and our large shooter "sweet spot") - Gyro stabilization of strafing with the H-drive to keep the robot yaw steady - An automated "roll maneuver" to rapidly turn the robot 180 degrees while driving down the field (this was an experiment during the offseason that ended up not having much use on the field) We used git with LabViewGitEnv for source control (more info on that here). Because git merging is a horrible experience with LabVIEW code, we broke our code down into many small subVIs. We used a general rule of thumb that if a VI block diagram doesn't fit on a (1366 x 768) laptop screen, it should be broken up into smaller subVIs. This led to a very different architecture than we have had in the past, and in my opinion it made our code much more readable and maintainable, avoiding the typical "LabVIEW Spaghetti Syndrome" That said, the code is still very messy because it evolved in parallel with the features on the robot. We did a lot of programming and modifications before mechanisms on the robot were entirely worked out, so there is a lot of dead code that hasn't been cleaned up. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|