It’s the day before kickoff and we on Team 1519 are finally ready to release our 2018 code, including the minor updates we made to support the 2019 beta control system.
Autonomous remains one of our areas of focus; this year we had 17 different autonomous programs, each of which could have multiple variants depending upon field layout. These autonomous programs were made up of smaller building blocks that performed portions of the drive path, placement on the scale or switch from different locations, etc. The more complex autonomous programs were sequences of the autonomous program building blocks, all strung together using the Command-based robot features.
Our mainstay autonomous programs were the “StartRightScaleAndSwitch” program, which placed 2 cubes - one on the scale, and one on the switch, for all 4 combinations of scale and switch - and a multi-cube scale auto, which placed 2+ cubes on the scale (automatically determining which is the “hot” scale from the field data). We also regularly ran a “smart switch” autonomous, and many of the other variants of these.
Our autonomous driving paths are almost exclusively done by a “DriveStraightOnHeading” command which has the robot drive an odometry-measured distance on a given heading (specified in degrees) with closed-loop robot steering to drive on the specified heading. Nearly all of our “turns” in autonomous driving are handled by the closed-loop control of “DriveStraightOnHeading.” In other words, if we “go straight and then turn left,” we would do this as follows: drive forward 100 inches on a heading of zero degrees, and then drive forward 100 inches on a heading of 270 degrees. The robot will drive forward 100 inches and then do an arcing left turn onto a new heading of 270 degrees. No “turn” command is actually specified. This makes for easy, smooth navigation. (Well, as long as the navX gyro works properly, which it did for us very reliably.)
If you’d like to see the robot in action, a good match to watch is Qual 44 at the University of New Hampshire District Event. Our robot is on the blue alliance and starts in the near corner of the screen.
We’re doing something different for the code release this year - rather than attaching a zip file to this post with all the code, we’ve made our “2018-Robot” repository on github public so that all can see it: https://github.com/FRC1519/2018-Robot
Feel free to post questions here or to email or PM me if I don’t seem to be paying attention to this thread during the build season…