Add RamseteCommand (#1951)

This commit is contained in:
Oblarg
2019-10-27 00:33:41 -04:00
committed by Peter Johnson
parent 989df1b461
commit 75438ab2ce
20 changed files with 1590 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ void DriveSubsystem::SetMaxOutput(double maxOutput) {
}
double DriveSubsystem::GetHeading() {
return std::remainder(m_gyro.GetAngle(), 360);
return std::remainder(m_gyro.GetAngle(), 360) * (kGyroReversed ? -1. : 1.);
}
double DriveSubsystem::GetTurnRate() {

View File

@@ -33,7 +33,7 @@ const double kEncoderDistancePerPulse =
// Assumes the encoders are directly mounted on the wheel shafts
(kWheelDiameterInches * 3.142) / static_cast<double>(kEncoderCPR);
const bool kGyroReversed = false;
const bool kGyroReversed = true;
const double kStabilizationP = 1;
const double kStabilizationI = .5;