paper: FRC2590 Nemesis 2014 Code

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

FRC2590 Nemesis 2014 Code
by: AGPapa

The final code for 2590’s 2014 robot. All autonomous scripts are included.

In 2014 I implemented a modified of 33’s BeeScript for autonomous scripting. This modified version has subscripts, conditionals and variables.

The subscript capability allowed me to a run a different script file from within the original script file. Nesting below two levels is not supported (a subscript cannot have another subscript inside it).

The conditionals allowed me to run different subscripts depending on whether or not the right goal was hot.

The variables allowed me to attach a name to a value and use that in autonomous scripts (or elsewhere in the code where that variable was used). The variables initialized by reading from a file in Begin.vi and are used elsewhere in the code (mostly for PID constants) instead of magic numbers. Reading from the file allowed me to change the constants without having to recompile code. New variables could be created and used in autonomous scripts, although this was never used.

This autonomous scripting capability allowed me to quickly and easily develop new autonomous code. During the season this gave our team the capability to consistently score two balls in the hot goals. For this release I added a script to shoot two balls in the same goal. This was intended to shoot over the low goals and avoid goalies in autonomous.

Some other cool things contained in the code are a small state machine controlling the shooter, a vision system on the dashboard for detecting the hot goals and auto-upshift code for the drivetrain.

The code should be fairly clear and well commented, but I’d be more than happy to answer any questions.

Nemesis2014-pre_IRI-2015-01-01.zip (8.49 MB)