FRC 319 - 2018 Code Release

Team 319 is proud to release our final code for 2018. As always, 319 has an open policy on everything and this code has been publicly available since kickoff, but we’re excited to answer any questions you have.

This year we maintained two repositories. One for our 2018 robot code, and one for our path generator:

frc319-2018 Features
Full Command Based Autos and Configuration - Nothing complicated here, we bought in fully to WPILib’s Command Based architecture.
Path Following Using CTRE’s Arc Mode - We adopted CTRE’s newest feature in Arc Mode to follow paths and loved it.
Self-Collision Avoidance - The bot adjusts the limits of its axes based on its current pose.
Custom Controller Class - An extension of WPILib’s Joystick that gives additional functionality.
TalonSRX Wrapper - These add functionality to the CTRE-provided classes and use method names that we found to be more intuitive.
MotionParameters class - Contains all the necessary parameters for motion magic control.

BobTrajectory Features
BobTrajectory uses 254’s 2014 arc generation code, and then translates it to Java files with properties that can be fed to TalonSRX controllers in motion profile arc mode. It enabled us to get a fairly reliable 2.5 cube scale auto and a 3 cube switch auto this year, as well as several other teams.

I frequently use your code base and totally don’t just copy and paste stuff from it. The fact that there are packages in our code base with 319 in the name means nothing…

We can’t outright use your code like some teams but I know we pulled some examples from it this past year so we could learn a few things. It’s good code. Thanks for making it available!

Matt, find/replace 319 with Spectrum is my normal go-to method when stealing many things from 319’s code base. It works very well.

Thanks for sharing all your code Ty and the rest of 319, definitely one of the most helpful githubs out there

Don’t forget to replace all those pesky Bob_____ classes too.

Thanks for sharing your code and keeping things public during the season. All your help was greatly appreciated by 558 this year.

It’s great that you guys do some advanced stuff but also follow the command based structure. It helps teams like us that are still learning java and stick to the WPI architecture but also want to keep improving and developing more complex controls.

I wanted to ask about your autotune classes.
Were these actually used to tune this year or was this an experimental thing? Did you find the gains you got from these were fairly accurate or were you still making adjustments and using these as a general starting point?

Good catch! I forgot about the autotune classes. We didn’t use them so much this year as we did last year. They’re basically a programmatic way of following CTRE’s velocity tuning walkthrough. We used them last year and they got us probably 90% of the way. I’d say it cut our tuning time by at least 70%.