Curvature (Cheesy) Drive
Fancy Arcade Drive for better robot control
Curvature Drive, or "Cheesy Drive", is a controller mapping for operator control that was first popularized by Team 254, The Cheesy Poofs, of FRC. Curvature Drive applies some math to the joystick inputs from a controller to provide a more intuitive driving experience for new VEX (or FRC) drivers
The original Cheesy Drive implementation (from their 2015 Java Code) essentially does three things:
The "curvature" naming comes from the algorithm's change to the way that the "turn" joystick input is processed. When you a driving forward or backwards and turning at the same time, the turn input affects the curvature of the movement rather than adding/subtracting linearly from the wheel speeds. The turn output is a sum of the throttle and turn inputs, meaning that the robot will turn faster when it's moving forward at a higher speed. Again, the goal here is more control at low speeds. Note that the turn input is not changed when the robot is turning in place, this just affects the way the robot drives in an "S" shaped path.
Cheesy Drive also applies some non-linearity to the joystick input so that there is more control at the low speeds. Larger changes in joystick inputs result in smaller changes in real speed when driving slow, but when the joystick is pushed to a high speed, you jump up to full speed faster.
Third, that turn input is affected by a negative inertia accumulator. Most robots have a fair bit of turning inertia, which can make it easy to accidentally overshoot a turn. The negative inertia accumulator acts almost like a reverse integral controller - the longer the robot has been turning (fast) for, the slower the robot will turn.
Implementation
You can find an implementation of Cheesy Drive, with all three components listed above, in the Team BLRS Turning Point code or in the snippet below. The snippet is platform-agnostic, and should run without modification in either PROS or VEXCode.
Teams Contributed to this Article:
BLRS (Purdue SIGBots)
Last updated