DevilBotz2876 / ChargedUp2023

Code for the FRC 2023 Robotics Competition
Other
3 stars 0 forks source link

DriveStraightToDock should not use distancePid #132

Closed BrownGenius closed 1 year ago

BrownGenius commented 1 year ago

Since DriveStraightToDock adjust speeds based on "ground", "on ramp", or "balancing" and then automatically transitions to BalancePID, it shouldn't be using a distancePid. The distancePid slows down the robot to avoid overshoot, limiting how fast the robot moves. This causes the competition bot to get stuck trying to move up the ramp.

Instead, we want DriveStraightToDock to use a fixed speed of attack to the ramp and then slow down as it reaches various states.

E.g.:

  1. When approaching ramp: 1 meter/sec
  2. When on ramp: 0.75 meter/sec
  3. When balancing: 0.50 meter/sec