Use gyro angle instead of robot angle for odometry (#2081)

The odometry classes previously took in the robot angle as an argument, meaning that users had to take care of offsetting the gyro themselves to accurately report the robot angle. This change will make it so that users will not have to worry about resetting gyros and adding offsets themselves, as this will be handled by the odometry classes.
This commit is contained in:
Prateek Machiraju
2019-11-15 20:34:10 -05:00
committed by Peter Johnson
parent 1b66ead49d
commit 841ef91c0f
23 changed files with 258 additions and 77 deletions

View File

@@ -71,5 +71,5 @@ class Drivetrain {
m_frontLeftLocation, m_frontRightLocation, m_backLeftLocation,
m_backRightLocation};
frc::MecanumDriveOdometry m_odometry{m_kinematics};
frc::MecanumDriveOdometry m_odometry{m_kinematics, GetAngle()};
};