This is the AdvantageKit Swerve Template with REV SparkMax hardware, enhanced with maple-sim integration for improved chassis physics simulation.
Not many changes were made to the original project—only the necessary ones to implement maple-sim. See the changelog from the original project.
The control loops of the chassis run on REV motor controllers. During simulation, they are replaced with WpiLib PIDController, so there might be slight differences between the real and simulated robot.
The usage of this project is identical to the original. See the AdvantageKit Online Documentation for instructions on how to use this template.
Change Constants.currentRobotMode to SIM and run simulateJava.
Connect the robot from AdvantageScope, open AdvantageScope Simulation Layout, and drive your robot around!
The AdvantageKit Vision Example is also included in this project. Note that there is a slight difference when setting up vision if you're using maple-sim. See the code.