boilerplate vel correction

This commit is contained in:
aarav18
2022-03-07 19:56:25 -07:00
parent 931c0cbd12
commit fa7d48c864
5 changed files with 115 additions and 42 deletions
@@ -414,8 +414,8 @@ public class RobotContainer {
Rotation2d rotation = m_robotSwerveDrive.m_gyro.getRotation2d();
// FIXME: Chassis speeds are created from joystick inputs and do not reflect
// actual robot velocity.
Translation2d velocity = new Translation2d(m_robotSwerveDrive.getChassisSpeeds()[0],
m_robotSwerveDrive.getChassisSpeeds()[1]);
Translation2d velocity = new Translation2d(m_robotSwerveDrive.getChassisSpeeds().vxMetersPerSecond,
m_robotSwerveDrive.getChassisSpeeds().vyMetersPerSecond);
Waypoint waypoint = new Waypoint(position, position, position, rotation.getDegrees(), false,
SwerveDriveConstants.PATH_RECORD_VELOCITY ? velocity.getNorm() : null, false);
pathPoints.add(waypoint);