, SwerveDriveConfiguration)","u":"limitVelocity(edu.wpi.first.math.geometry.Translation2d,edu.wpi.first.math.kinematics.ChassisSpeeds,edu.wpi.first.math.geometry.Pose2d,double,double,java.util.List,swervelib.parser.SwerveDriveConfiguration)"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"location"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"LocationJson()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveDrive","l":"lockPose()"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"LOW"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_forwardKinematics"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_inverseKinematics"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_modules"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_moduleStates"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_numModules"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"m_prevCoR"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"MACHINE"},{"p":"swervelib.math","c":"Matter","l":"mass"},{"p":"swervelib.math","c":"Matter","l":"massMoment()"},{"p":"swervelib.math","c":"Matter","l":"Matter(Translation3d, double)","u":"%3Cinit%3E(edu.wpi.first.math.geometry.Translation3d,double)"},{"p":"swervelib.parser.deserializer","c":"PIDFRange","l":"max"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"maxAngularVelocity"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"maxAngularVelocity"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"maxSpeed"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"maxSpeed"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"maxSpeed"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"maxSpeed"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"maxSpeed"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"measuredChassisSpeeds"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"measuredStates"},{"p":"swervelib.parser.deserializer","c":"PIDFRange","l":"min"},{"p":"swervelib.parser","c":"SwerveParser","l":"moduleConfigs"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"moduleCount"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"moduleCount"},{"p":"swervelib.parser.json","c":"ModuleJson","l":"ModuleJson()","u":"%3Cinit%3E()"},{"p":"swervelib.parser","c":"SwerveParser","l":"moduleJsons"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"moduleLocation"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"moduleLocationsMeters"},{"p":"swervelib","c":"SwerveModule","l":"moduleNumber"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"modules"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"modules"},{"p":"swervelib","c":"SwerveDrive","l":"moduleSynchronizationCounter"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"motor"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"motor"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"motor"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"motor"},{"p":"swervelib.parser.json","c":"MotorConfigDouble","l":"MotorConfigDouble()","u":"%3Cinit%3E()"},{"p":"swervelib.parser.json","c":"MotorConfigDouble","l":"MotorConfigDouble(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"swervelib.parser.json","c":"MotorConfigInt","l":"MotorConfigInt()","u":"%3Cinit%3E()"},{"p":"swervelib.parser.json","c":"MotorConfigInt","l":"MotorConfigInt(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"swervelib.imu","c":"NavXSwerve","l":"NavXSwerve(SerialPort.Port)","u":"%3Cinit%3E(edu.wpi.first.wpilibj.SerialPort.Port)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"nominalVoltage"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"nominalVoltage"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"NONE"},{"p":"swervelib.math","c":"SwerveMath","l":"normalizeAngle(double)"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"offset"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"offset"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"offset"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"offset"},{"p":"swervelib.imu","c":"NavXSwerve","l":"offset"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"offset"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"offset"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"omegaRadPerSecond"},{"p":"swervelib.parser","c":"SwerveParser","l":"openJson(File)","u":"openJson(java.io.File)"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"optimalVoltage"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"optimalVoltage"},{"p":"swervelib.parser","c":"PIDFConfig","l":"output"},{"p":"swervelib.parser","c":"PIDFConfig","l":"p"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"physicalCharacteristics"},{"p":"swervelib.parser","c":"SwerveParser","l":"physicalPropertiesJson"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"PhysicalPropertiesJson()","u":"%3Cinit%3E()"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"PhysicsSim()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"pid"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"pid"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig()","u":"%3Cinit%3E()"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double)","u":"%3Cinit%3E(double,double)"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double, double)","u":"%3Cinit%3E(double,double,double)"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double, double, double)","u":"%3Cinit%3E(double,double,double,double)"},{"p":"swervelib.parser","c":"PIDFConfig","l":"PIDFConfig(double, double, double, double, double)","u":"%3Cinit%3E(double,double,double,double,double)"},{"p":"swervelib.parser","c":"SwerveParser","l":"pidfPropertiesJson"},{"p":"swervelib.parser.json","c":"PIDFPropertiesJson","l":"PIDFPropertiesJson()","u":"%3Cinit%3E()"},{"p":"swervelib.parser.deserializer","c":"PIDFRange","l":"PIDFRange()","u":"%3Cinit%3E()"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"Pigeon2Swerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"Pigeon2Swerve(int, String)","u":"%3Cinit%3E(int,java.lang.String)"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"PigeonSwerve(int)","u":"%3Cinit%3E(int)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"placeInAppropriate0To360Scope(double, double)","u":"placeInAppropriate0To360Scope(double,double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"placeInAppropriate0To360Scope(double, double)","u":"placeInAppropriate0To360Scope(double,double)"},{"p":"swervelib.math","c":"Matter","l":"position"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Position"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"positionConversionFactor"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"positionConversionFactor"},{"p":"swervelib","c":"SwerveDrive","l":"postTrajectory(Trajectory)","u":"postTrajectory(edu.wpi.first.math.trajectory.Trajectory)"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"rampRate"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"random(double)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"random(double, double)","u":"random(double,double)"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"readingError"},{"p":"swervelib","c":"SwerveDrive","l":"replaceSwerveModuleFeedforward(SimpleMotorFeedforward)","u":"replaceSwerveModuleFeedforward(edu.wpi.first.math.controller.SimpleMotorFeedforward)"},{"p":"swervelib","c":"SwerveDrive","l":"resetOdometry(Pose2d)","u":"resetOdometry(edu.wpi.first.math.geometry.Pose2d)"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"robotRotation"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"rotationUnit"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"run()"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"run()"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"run()"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"run()"},{"p":"swervelib.simulation.ctre","c":"VictorSPXSimProfile","l":"run()"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"set(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"set(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"set(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"set(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"set(double)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setAbsoluteEncoder(SwerveAbsoluteEncoder)","u":"setAbsoluteEncoder(swervelib.encoders.SwerveAbsoluteEncoder)"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"setAngle(double)"},{"p":"swervelib","c":"SwerveModule","l":"setAngle(double)"},{"p":"swervelib","c":"SwerveDrive","l":"setChassisSpeeds(ChassisSpeeds)","u":"setChassisSpeeds(edu.wpi.first.math.kinematics.ChassisSpeeds)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setCurrentLimit(int)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setCurrentLimit(int)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setCurrentLimit(int)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setCurrentLimit(int)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setCurrentLimit(int)"},{"p":"swervelib","c":"SwerveModule","l":"setDesiredState(SwerveModuleState2, boolean)","u":"setDesiredState(swervelib.math.SwerveModuleState2,boolean)"},{"p":"swervelib","c":"SwerveDrive","l":"setGyro(Rotation3d)","u":"setGyro(edu.wpi.first.math.geometry.Rotation3d)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setInverted(boolean)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setLoopRampRate(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setLoopRampRate(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setLoopRampRate(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setLoopRampRate(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setLoopRampRate(double)"},{"p":"swervelib","c":"SwerveDrive","l":"setModuleStates(SwerveModuleState2[], boolean)","u":"setModuleStates(swervelib.math.SwerveModuleState2[],boolean)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setMotorBrake(boolean)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setMotorBrake(boolean)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setMotorBrake(boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setMotorBrake(boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setMotorBrake(boolean)"},{"p":"swervelib","c":"SwerveModule","l":"setMotorBrake(boolean)"},{"p":"swervelib","c":"SwerveDrive","l":"setMotorIdleMode(boolean)"},{"p":"swervelib.imu","c":"ADIS16448Swerve","l":"setOffset(Rotation3d)","u":"setOffset(edu.wpi.first.math.geometry.Rotation3d)"},{"p":"swervelib.imu","c":"ADIS16470Swerve","l":"setOffset(Rotation3d)","u":"setOffset(edu.wpi.first.math.geometry.Rotation3d)"},{"p":"swervelib.imu","c":"ADXRS450Swerve","l":"setOffset(Rotation3d)","u":"setOffset(edu.wpi.first.math.geometry.Rotation3d)"},{"p":"swervelib.imu","c":"AnalogGyroSwerve","l":"setOffset(Rotation3d)","u":"setOffset(edu.wpi.first.math.geometry.Rotation3d)"},{"p":"swervelib.imu","c":"NavXSwerve","l":"setOffset(Rotation3d)","u":"setOffset(edu.wpi.first.math.geometry.Rotation3d)"},{"p":"swervelib.imu","c":"Pigeon2Swerve","l":"setOffset(Rotation3d)","u":"setOffset(edu.wpi.first.math.geometry.Rotation3d)"},{"p":"swervelib.imu","c":"PigeonSwerve","l":"setOffset(Rotation3d)","u":"setOffset(edu.wpi.first.math.geometry.Rotation3d)"},{"p":"swervelib.imu","c":"SwerveIMU","l":"setOffset(Rotation3d)","u":"setOffset(edu.wpi.first.math.geometry.Rotation3d)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setPosition(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setPosition(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setPosition(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setPosition(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setPosition(double)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setReference(double, double)","u":"setReference(double,double)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"setVoltageCompensation(double)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"setVoltageCompensation(double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"setVoltageCompensation(double)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"setVoltageCompensation(double)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"setVoltageCompensation(double)"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim","l":"sim"},{"p":"swervelib","c":"SwerveDrive","l":"simIMU"},{"p":"swervelib","c":"SwerveModule","l":"simModule"},{"p":"swervelib.simulation.ctre","c":"PhysicsSim.SimProfile","l":"SimProfile()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Simulation"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"sizeFrontBack"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"sizeLeftRight"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"SparkMAX_slotIdx()","u":"%3Cinit%3E()"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"SparkMaxBrushedMotorSwerve(CANSparkMax, boolean, SparkMaxRelativeEncoder.Type, int, boolean)","u":"%3Cinit%3E(com.revrobotics.CANSparkMax,boolean,com.revrobotics.SparkMaxRelativeEncoder.Type,int,boolean)"},{"p":"swervelib.motors","c":"SparkMaxBrushedMotorSwerve","l":"SparkMaxBrushedMotorSwerve(int, boolean, SparkMaxRelativeEncoder.Type, int, boolean)","u":"%3Cinit%3E(int,boolean,com.revrobotics.SparkMaxRelativeEncoder.Type,int,boolean)"},{"p":"swervelib.encoders","c":"SparkMaxEncoderSwerve","l":"SparkMaxEncoderSwerve(SwerveMotor)","u":"%3Cinit%3E(swervelib.motors.SwerveMotor)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"SparkMaxSwerve(CANSparkMax, boolean)","u":"%3Cinit%3E(com.revrobotics.CANSparkMax,boolean)"},{"p":"swervelib.motors","c":"SparkMaxSwerve","l":"SparkMaxSwerve(int, boolean)","u":"%3Cinit%3E(int,boolean)"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"speedMetersPerSecond"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"state"},{"p":"swervelib","c":"SwerveDrive","l":"stateStdDevs"},{"p":"swervelib.encoders","c":"SwerveAbsoluteEncoder","l":"SwerveAbsoluteEncoder()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveDrive","l":"swerveController"},{"p":"swervelib","c":"SwerveController","l":"SwerveController(SwerveControllerConfiguration)","u":"%3Cinit%3E(swervelib.parser.SwerveControllerConfiguration)"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"SwerveControllerConfiguration(SwerveDriveConfiguration, PIDFConfig)","u":"%3Cinit%3E(swervelib.parser.SwerveDriveConfiguration,swervelib.parser.PIDFConfig)"},{"p":"swervelib.parser","c":"SwerveControllerConfiguration","l":"SwerveControllerConfiguration(SwerveDriveConfiguration, PIDFConfig, double)","u":"%3Cinit%3E(swervelib.parser.SwerveDriveConfiguration,swervelib.parser.PIDFConfig,double)"},{"p":"swervelib","c":"SwerveDrive","l":"SwerveDrive(SwerveDriveConfiguration, SwerveControllerConfiguration)","u":"%3Cinit%3E(swervelib.parser.SwerveDriveConfiguration,swervelib.parser.SwerveControllerConfiguration)"},{"p":"swervelib","c":"SwerveDrive","l":"swerveDriveConfiguration"},{"p":"swervelib.parser","c":"SwerveDriveConfiguration","l":"SwerveDriveConfiguration(SwerveModuleConfiguration[], SwerveIMU, double, boolean)","u":"%3Cinit%3E(swervelib.parser.SwerveModuleConfiguration[],swervelib.imu.SwerveIMU,double,boolean)"},{"p":"swervelib.parser","c":"SwerveParser","l":"swerveDriveJson"},{"p":"swervelib.parser.json","c":"SwerveDriveJson","l":"SwerveDriveJson()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveDrive","l":"swerveDrivePoseEstimator"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"SwerveDriveTelemetry()","u":"%3Cinit%3E()"},{"p":"swervelib.imu","c":"SwerveIMU","l":"SwerveIMU()","u":"%3Cinit%3E()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"SwerveIMUSimulation()","u":"%3Cinit%3E()"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"SwerveKinematics2(Translation2d...)","u":"%3Cinit%3E(edu.wpi.first.math.geometry.Translation2d...)"},{"p":"swervelib.math","c":"SwerveMath","l":"SwerveMath()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveModule","l":"SwerveModule(int, SwerveModuleConfiguration)","u":"%3Cinit%3E(int,swervelib.parser.SwerveModuleConfiguration)"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"SwerveModuleConfiguration(SwerveMotor, SwerveMotor, SwerveAbsoluteEncoder, double, double, double, PIDFConfig, PIDFConfig, double, SwerveModulePhysicalCharacteristics)","u":"%3Cinit%3E(swervelib.motors.SwerveMotor,swervelib.motors.SwerveMotor,swervelib.encoders.SwerveAbsoluteEncoder,double,double,double,swervelib.parser.PIDFConfig,swervelib.parser.PIDFConfig,double,swervelib.parser.SwerveModulePhysicalCharacteristics)"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"SwerveModuleConfiguration(SwerveMotor, SwerveMotor, SwerveAbsoluteEncoder, double, double, double, PIDFConfig, PIDFConfig, double, SwerveModulePhysicalCharacteristics, boolean, boolean, boolean, double, double)","u":"%3Cinit%3E(swervelib.motors.SwerveMotor,swervelib.motors.SwerveMotor,swervelib.encoders.SwerveAbsoluteEncoder,double,double,double,swervelib.parser.PIDFConfig,swervelib.parser.PIDFConfig,double,swervelib.parser.SwerveModulePhysicalCharacteristics,boolean,boolean,boolean,double,double)"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"SwerveModulePhysicalCharacteristics(double, double, double, double, double, double, int, int)","u":"%3Cinit%3E(double,double,double,double,double,double,int,int)"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"SwerveModulePhysicalCharacteristics(double, double, double, double, double, double, int, int, double, double, int, int)","u":"%3Cinit%3E(double,double,double,double,double,double,int,int,double,double,int,int)"},{"p":"swervelib","c":"SwerveDrive","l":"swerveModules"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"SwerveModuleSimulation()","u":"%3Cinit%3E()"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"SwerveModuleState2()","u":"%3Cinit%3E()"},{"p":"swervelib.math","c":"SwerveModuleState2","l":"SwerveModuleState2(double, Rotation2d, double)","u":"%3Cinit%3E(double,edu.wpi.first.math.geometry.Rotation2d,double)"},{"p":"swervelib.motors","c":"SwerveMotor","l":"SwerveMotor()","u":"%3Cinit%3E()"},{"p":"swervelib.parser","c":"SwerveParser","l":"SwerveParser(File)","u":"%3Cinit%3E(java.io.File)"},{"p":"swervelib","c":"SwerveModule","l":"synchronizeEncoders()"},{"p":"swervelib","c":"SwerveDrive","l":"synchronizeModuleEncoders()"},{"p":"swervelib.simulation.ctre","c":"TalonFXSimProfile","l":"TalonFXSimProfile(TalonFX, double, double, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.TalonFX,double,double,boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"TalonFXSwerve(int, boolean)","u":"%3Cinit%3E(int,boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"TalonFXSwerve(int, String, boolean)","u":"%3Cinit%3E(int,java.lang.String,boolean)"},{"p":"swervelib.motors","c":"TalonFXSwerve","l":"TalonFXSwerve(WPI_TalonFX, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.WPI_TalonFX,boolean)"},{"p":"swervelib.simulation.ctre","c":"TalonSRXSimProfile","l":"TalonSRXSimProfile(TalonSRX, double, double, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.TalonSRX,double,double,boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"TalonSRXSwerve(int, boolean)","u":"%3Cinit%3E(int,boolean)"},{"p":"swervelib.motors","c":"TalonSRXSwerve","l":"TalonSRXSwerve(WPI_TalonSRX, boolean)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX,boolean)"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"TelemetryVerbosity()","u":"%3Cinit%3E()"},{"p":"swervelib","c":"SwerveController","l":"thetaController"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"timer"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"timer"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toChassisSpeeds(SwerveModuleState2...)","u":"toChassisSpeeds(swervelib.math.SwerveModuleState2...)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toSwerveModuleStates(ChassisSpeeds)","u":"toSwerveModuleStates(edu.wpi.first.math.kinematics.ChassisSpeeds)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toSwerveModuleStates(ChassisSpeeds, Translation2d)","u":"toSwerveModuleStates(edu.wpi.first.math.kinematics.ChassisSpeeds,edu.wpi.first.math.geometry.Translation2d)"},{"p":"swervelib.math","c":"SwerveKinematics2","l":"toTwist2d(SwerveModulePosition...)","u":"toTwist2d(edu.wpi.first.math.kinematics.SwerveModulePosition...)"},{"p":"swervelib.parser.json","c":"DeviceJson","l":"type"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"updateData()"},{"p":"swervelib","c":"SwerveDrive","l":"updateOdometry()"},{"p":"swervelib.simulation","c":"SwerveIMUSimulation","l":"updateOdometry(SwerveKinematics2, SwerveModuleState2[], Pose2d[], Field2d)","u":"updateOdometry(swervelib.math.SwerveKinematics2,swervelib.math.SwerveModuleState2[],edu.wpi.first.math.geometry.Pose2d[],edu.wpi.first.wpilibj.smartdashboard.Field2d)"},{"p":"swervelib.simulation","c":"SwerveModuleSimulation","l":"updateStateAndPosition(SwerveModuleState2)","u":"updateStateAndPosition(swervelib.math.SwerveModuleState2)"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"values()"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry.TelemetryVerbosity","l":"values()"},{"p":"swervelib.motors","c":"SparkMaxSwerve.SparkMAX_slotIdx","l":"Velocity"},{"p":"swervelib.parser","c":"SwerveModuleConfiguration","l":"velocityPIDF"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"verbosity"},{"p":"swervelib.simulation.ctre","c":"VictorSPXSimProfile","l":"VictorSPXSimProfile(VictorSPX)","u":"%3Cinit%3E(com.ctre.phoenix.motorcontrol.can.VictorSPX)"},{"p":"swervelib","c":"SwerveDrive","l":"visionMeasurementStdDevs"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"wheelDiameter"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"wheelDiameter"},{"p":"swervelib.parser.json","c":"PhysicalPropertiesJson","l":"wheelGripCoefficientOfFriction"},{"p":"swervelib.parser","c":"SwerveModulePhysicalCharacteristics","l":"wheelGripCoefficientOfFriction"},{"p":"swervelib.telemetry","c":"SwerveDriveTelemetry","l":"wheelLocations"},{"p":"swervelib","c":"SwerveController","l":"withinHypotDeadband(double, double)","u":"withinHypotDeadband(double,double)"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"x"},{"p":"swervelib","c":"SwerveController","l":"xLimiter"},{"p":"swervelib.parser.json.modules","c":"LocationJson","l":"y"},{"p":"swervelib","c":"SwerveController","l":"yLimiter"},{"p":"swervelib","c":"SwerveDrive","l":"zeroGyro()"}];updateSearchResults();
\ No newline at end of file
diff --git a/docs/overview-summary.html b/docs/overview-summary.html
index d34c9d6..e451afa 100644
--- a/docs/overview-summary.html
+++ b/docs/overview-summary.html
@@ -1,11 +1,11 @@
-
+
Generated Documentation (Untitled)
-
+
diff --git a/docs/overview-tree.html b/docs/overview-tree.html
index 3c3aae3..47b1748 100644
--- a/docs/overview-tree.html
+++ b/docs/overview-tree.html
@@ -1,11 +1,11 @@
-
+
Class Hierarchy
-
+
diff --git a/docs/swervelib/SwerveController.html b/docs/swervelib/SwerveController.html
index a523005..b3dcd16 100644
--- a/docs/swervelib/SwerveController.html
+++ b/docs/swervelib/SwerveController.html
@@ -1,11 +1,11 @@
-
+
SwerveController
-
+
diff --git a/docs/swervelib/SwerveDrive.html b/docs/swervelib/SwerveDrive.html
index e64e739..09d7d20 100644
--- a/docs/swervelib/SwerveDrive.html
+++ b/docs/swervelib/SwerveDrive.html
@@ -1,11 +1,11 @@
-
+
SwerveDrive
-
+
@@ -772,7 +772,7 @@ loadScripts(document, 'script');
setGyro
public void setGyro(edu.wpi.first.math.geometry.Rotation3d gyro)
-Set the Gyroscope offset using a Rotation3d object. (Only yaw works currently.)
+Set the Gyroscope offset using a Rotation3d object.
- Parameters:
gyro - Gyroscope offset.
diff --git a/docs/swervelib/SwerveModule.html b/docs/swervelib/SwerveModule.html
index 31374a1..8b84050 100644
--- a/docs/swervelib/SwerveModule.html
+++ b/docs/swervelib/SwerveModule.html
@@ -1,11 +1,11 @@
-
+
SwerveModule
-
+
@@ -126,14 +126,19 @@ loadScripts(document, 'script');
Last angle set for the swerve module.
-int
-
+double
+
+
Last velocity set for the swerve module.
+
+int
+
+
Module number for kinematics, usually 0 to 3.
-
-
-
@@ -281,6 +286,13 @@ loadScripts(document, 'script');
+
+lastVelocity
+public double lastVelocity
+Last velocity set for the swerve module.
+
+
+
simModule
diff --git a/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html b/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html
index 6826074..a43fab7 100644
--- a/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html
+++ b/docs/swervelib/encoders/AnalogAbsoluteEncoderSwerve.html
@@ -1,11 +1,11 @@
-
+
AnalogAbsoluteEncoderSwerve
-
+
diff --git a/docs/swervelib/encoders/CANCoderSwerve.html b/docs/swervelib/encoders/CANCoderSwerve.html
index 2c8ebc0..5d97852 100644
--- a/docs/swervelib/encoders/CANCoderSwerve.html
+++ b/docs/swervelib/encoders/CANCoderSwerve.html
@@ -1,11 +1,11 @@
-
+
CANCoderSwerve
-
+
diff --git a/docs/swervelib/encoders/SparkMaxEncoderSwerve.html b/docs/swervelib/encoders/SparkMaxEncoderSwerve.html
index 73b3feb..755b128 100644
--- a/docs/swervelib/encoders/SparkMaxEncoderSwerve.html
+++ b/docs/swervelib/encoders/SparkMaxEncoderSwerve.html
@@ -1,11 +1,11 @@
-
+
SparkMaxEncoderSwerve
-
+
diff --git a/docs/swervelib/encoders/SwerveAbsoluteEncoder.html b/docs/swervelib/encoders/SwerveAbsoluteEncoder.html
index 9085333..55c226a 100644
--- a/docs/swervelib/encoders/SwerveAbsoluteEncoder.html
+++ b/docs/swervelib/encoders/SwerveAbsoluteEncoder.html
@@ -1,11 +1,11 @@
-
+
SwerveAbsoluteEncoder
-
+
diff --git a/docs/swervelib/encoders/package-summary.html b/docs/swervelib/encoders/package-summary.html
index 9dcf543..9ed5860 100644
--- a/docs/swervelib/encoders/package-summary.html
+++ b/docs/swervelib/encoders/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib.encoders
-
+
diff --git a/docs/swervelib/encoders/package-tree.html b/docs/swervelib/encoders/package-tree.html
index 445c61c..ea79fed 100644
--- a/docs/swervelib/encoders/package-tree.html
+++ b/docs/swervelib/encoders/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib.encoders Class Hierarchy
-
+
diff --git a/docs/swervelib/imu/ADIS16448Swerve.html b/docs/swervelib/imu/ADIS16448Swerve.html
index 4af0910..3229353 100644
--- a/docs/swervelib/imu/ADIS16448Swerve.html
+++ b/docs/swervelib/imu/ADIS16448Swerve.html
@@ -1,11 +1,11 @@
-
+
ADIS16448Swerve
-
+
@@ -98,10 +98,10 @@ loadScripts(document, 'script');
ADIS16448_IMU device to read the current headings from.
-private double
-
+private edu.wpi.first.math.geometry.Rotation3d
+
-
Offset for the ADIS16448 yaw reading.
+
Offset for the ADIS16448.
@@ -153,19 +153,19 @@ loadScripts(document, 'script');
Get the instantiated IMU object.
edu.wpi.first.math.geometry.Rotation3d
-
+
+
Fetch the Rotation3d from the IMU without any zeroing.
+
+edu.wpi.first.math.geometry.Rotation3d
+
+
Fetch the Rotation3d from the IMU.
-void
-
-
-
Fetch the yaw/pitch/roll from the IMU.
-
void
-
+setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
-
Set the yaw in degrees.
+
Set the gyro offset.
@@ -192,10 +192,10 @@ loadScripts(document, 'script');
-
-yawOffset
-private double yawOffset
-Offset for the ADIS16448 yaw reading.
+
+offset
+private edu.wpi.first.math.geometry.Rotation3d offset
+Offset for the ADIS16448.
@@ -244,28 +244,28 @@ loadScripts(document, 'script');
-
-setYaw
-public void setYaw(double yaw)
-Set the yaw in degrees.
+
+setOffset
+public void setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
+Set the gyro offset.
- Specified by:
-setYaw in class SwerveIMU
+setOffset in class SwerveIMU
- Parameters:
-yaw - Yaw angle in degrees.
+offset - gyro offset as a Rotation3d.
-
-getYawPitchRoll
-public void getYawPitchRoll(double[] yprArray)
-Fetch the yaw/pitch/roll from the IMU.
+
+getRawRotation3d
+public edu.wpi.first.math.geometry.Rotation3d getRawRotation3d()
+Fetch the Rotation3d from the IMU without any zeroing. Robot relative.
- Specified by:
-getYawPitchRoll in class SwerveIMU
-- Parameters:
-yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
+getRawRotation3d in class SwerveIMU
+- Returns:
+Rotation3d from the IMU.
diff --git a/docs/swervelib/imu/ADIS16470Swerve.html b/docs/swervelib/imu/ADIS16470Swerve.html
index bc272c6..21fb025 100644
--- a/docs/swervelib/imu/ADIS16470Swerve.html
+++ b/docs/swervelib/imu/ADIS16470Swerve.html
@@ -1,11 +1,11 @@
-
+
ADIS16470Swerve
-
+
@@ -98,10 +98,10 @@ loadScripts(document, 'script');
ADIS16470_IMU device to read the current headings from.
-private double
-
+private edu.wpi.first.math.geometry.Rotation3d
+
-
Offset for the ADIS16470 yaw reading.
+
Offset for the ADIS16470.
@@ -153,19 +153,19 @@ loadScripts(document, 'script');
Get the instantiated IMU object.
edu.wpi.first.math.geometry.Rotation3d
-
+
+
Fetch the Rotation3d from the IMU without any zeroing.
+
+edu.wpi.first.math.geometry.Rotation3d
+
+
Fetch the Rotation3d from the IMU.
-void
-
-
-
Fetch the yaw/pitch/roll from the IMU.
-
void
-
+setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
-
Set the yaw in degrees.
+
Set the gyro offset.
@@ -192,10 +192,10 @@ loadScripts(document, 'script');
-
-yawOffset
-private double yawOffset
-Offset for the ADIS16470 yaw reading.
+
+offset
+private edu.wpi.first.math.geometry.Rotation3d offset
+Offset for the ADIS16470.
@@ -244,28 +244,28 @@ loadScripts(document, 'script');
-
-setYaw
-public void setYaw(double yaw)
-Set the yaw in degrees.
+
+setOffset
+public void setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
+Set the gyro offset.
- Specified by:
-setYaw in class SwerveIMU
+setOffset in class SwerveIMU
- Parameters:
-yaw - Yaw angle in degrees.
+offset - gyro offset as a Rotation3d.
-
-getYawPitchRoll
-public void getYawPitchRoll(double[] yprArray)
-Fetch the yaw/pitch/roll from the IMU.
+
+getRawRotation3d
+public edu.wpi.first.math.geometry.Rotation3d getRawRotation3d()
+Fetch the Rotation3d from the IMU without any zeroing. Robot relative.
- Specified by:
-getYawPitchRoll in class SwerveIMU
-- Parameters:
-yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
+getRawRotation3d in class SwerveIMU
+- Returns:
+Rotation3d from the IMU.
diff --git a/docs/swervelib/imu/ADXRS450Swerve.html b/docs/swervelib/imu/ADXRS450Swerve.html
index 910772c..cd79707 100644
--- a/docs/swervelib/imu/ADXRS450Swerve.html
+++ b/docs/swervelib/imu/ADXRS450Swerve.html
@@ -1,11 +1,11 @@
-
+
ADXRS450Swerve
-
+
@@ -98,10 +98,10 @@ loadScripts(document, 'script');
ADXRS450_Gyro device to read the current headings from.
-private double
-
+private edu.wpi.first.math.geometry.Rotation3d
+
-
Offset for the ADXRS450 yaw reading.
+
Offset for the ADXRS450.
@@ -153,19 +153,19 @@ loadScripts(document, 'script');
Get the instantiated IMU object.
edu.wpi.first.math.geometry.Rotation3d
-
+
+
Fetch the Rotation3d from the IMU without any zeroing.
+
+edu.wpi.first.math.geometry.Rotation3d
+
+
Fetch the Rotation3d from the IMU.
-void
-
-
-
Fetch the yaw/pitch/roll from the IMU.
-
void
-
+setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
-
Set the yaw in degrees.
+
Set the gyro offset.
@@ -192,10 +192,10 @@ loadScripts(document, 'script');
-
-yawOffset
-private double yawOffset
-Offset for the ADXRS450 yaw reading.
+
+offset
+private edu.wpi.first.math.geometry.Rotation3d offset
+Offset for the ADXRS450.
@@ -244,28 +244,28 @@ loadScripts(document, 'script');
-
-setYaw
-public void setYaw(double yaw)
-Set the yaw in degrees.
+
+setOffset
+public void setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
+Set the gyro offset.
- Specified by:
-setYaw in class SwerveIMU
+setOffset in class SwerveIMU
- Parameters:
-yaw - Yaw angle in degrees.
+offset - gyro offset as a Rotation3d.
-
-getYawPitchRoll
-public void getYawPitchRoll(double[] yprArray)
-Fetch the yaw/pitch/roll from the IMU.
+
+getRawRotation3d
+public edu.wpi.first.math.geometry.Rotation3d getRawRotation3d()
+Fetch the Rotation3d from the IMU without any zeroing. Robot relative.
- Specified by:
-getYawPitchRoll in class SwerveIMU
-- Parameters:
-yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
+getRawRotation3d in class SwerveIMU
+- Returns:
+Rotation3d from the IMU.
diff --git a/docs/swervelib/imu/AnalogGyroSwerve.html b/docs/swervelib/imu/AnalogGyroSwerve.html
index da1a622..42f73bb 100644
--- a/docs/swervelib/imu/AnalogGyroSwerve.html
+++ b/docs/swervelib/imu/AnalogGyroSwerve.html
@@ -1,11 +1,11 @@
-
+
AnalogGyroSwerve
-
+
@@ -98,10 +98,10 @@ loadScripts(document, 'script');
-private double
-
+private edu.wpi.first.math.geometry.Rotation3d
+
-
The yaw offset for the gyroscope.
+
Offset for the analog gyro.
@@ -153,19 +153,19 @@ loadScripts(document, 'script');
Get the instantiated IMU object.
edu.wpi.first.math.geometry.Rotation3d
-
+
+
Fetch the Rotation3d from the IMU without any zeroing.
+
+edu.wpi.first.math.geometry.Rotation3d
+
+
Fetch the Rotation3d from the IMU.
-void
-
-
-
Fetch the yaw/pitch/roll from the IMU.
-
void
-
+setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
-
Set the yaw in degrees.
+
Set the gyro offset.
@@ -192,10 +192,10 @@ loadScripts(document, 'script');
-
-yawOffset
-private double yawOffset
-The yaw offset for the gyroscope.
+
+offset
+private edu.wpi.first.math.geometry.Rotation3d offset
+Offset for the analog gyro.
@@ -248,28 +248,28 @@ loadScripts(document, 'script');
-
-setYaw
-public void setYaw(double yaw)
-Set the yaw in degrees.
+
+setOffset
+public void setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
+Set the gyro offset.
- Specified by:
-setYaw in class SwerveIMU
+setOffset in class SwerveIMU
- Parameters:
-yaw - Yaw angle in degrees.
+offset - gyro offset as a Rotation3d.
-
-getYawPitchRoll
-public void getYawPitchRoll(double[] yprArray)
-Fetch the yaw/pitch/roll from the IMU.
+
+getRawRotation3d
+public edu.wpi.first.math.geometry.Rotation3d getRawRotation3d()
+Fetch the Rotation3d from the IMU without any zeroing. Robot relative.
- Specified by:
-getYawPitchRoll in class SwerveIMU
-- Parameters:
-yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
+getRawRotation3d in class SwerveIMU
+- Returns:
+Rotation3d from the IMU.
diff --git a/docs/swervelib/imu/NavXSwerve.html b/docs/swervelib/imu/NavXSwerve.html
index d65eff7..0524fab 100644
--- a/docs/swervelib/imu/NavXSwerve.html
+++ b/docs/swervelib/imu/NavXSwerve.html
@@ -1,11 +1,11 @@
-
+
NavXSwerve
-
+
@@ -98,10 +98,10 @@ loadScripts(document, 'script');
-private double
-
+private edu.wpi.first.math.geometry.Rotation3d
+
-
Offset for the NavX yaw reading.
+
Offset for the NavX.
@@ -153,19 +153,19 @@ loadScripts(document, 'script');
Get the instantiated IMU object.
edu.wpi.first.math.geometry.Rotation3d
-
+
+
Fetch the Rotation3d from the IMU without any zeroing.
+
+edu.wpi.first.math.geometry.Rotation3d
+
+
Fetch the Rotation3d from the IMU.
-void
-
-
-
Fetch the yaw/pitch/roll from the IMU.
-
void
-
+setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
-
Set the yaw in degrees.
+
Set the gyro offset.
@@ -192,10 +192,10 @@ loadScripts(document, 'script');
-
-yawOffset
-private double yawOffset
-Offset for the NavX yaw reading.
+
+offset
+private edu.wpi.first.math.geometry.Rotation3d offset
+Offset for the NavX.
@@ -248,28 +248,28 @@ loadScripts(document, 'script');
-
-setYaw
-public void setYaw(double yaw)
-Set the yaw in degrees.
+
+setOffset
+public void setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
+Set the gyro offset.
- Specified by:
-setYaw in class SwerveIMU
+setOffset in class SwerveIMU
- Parameters:
-yaw - Yaw angle in degrees.
+offset - gyro offset as a Rotation3d.
-
-getYawPitchRoll
-public void getYawPitchRoll(double[] yprArray)
-Fetch the yaw/pitch/roll from the IMU.
+
+getRawRotation3d
+public edu.wpi.first.math.geometry.Rotation3d getRawRotation3d()
+Fetch the Rotation3d from the IMU without any zeroing. Robot relative.
- Specified by:
-getYawPitchRoll in class SwerveIMU
-- Parameters:
-yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
+getRawRotation3d in class SwerveIMU
+- Returns:
+Rotation3d from the IMU.
diff --git a/docs/swervelib/imu/Pigeon2Swerve.html b/docs/swervelib/imu/Pigeon2Swerve.html
index 9a725c6..e054279 100644
--- a/docs/swervelib/imu/Pigeon2Swerve.html
+++ b/docs/swervelib/imu/Pigeon2Swerve.html
@@ -1,11 +1,11 @@
-
+
Pigeon2Swerve
-
+
@@ -98,6 +98,11 @@ loadScripts(document, 'script');
+private edu.wpi.first.math.geometry.Rotation3d
+
+
+
Offset for the Pigeon 2.
+
@@ -153,19 +158,19 @@ loadScripts(document, 'script');
Get the instantiated IMU object.
edu.wpi.first.math.geometry.Rotation3d
-
+
+
Fetch the Rotation3d from the IMU without any zeroing.
+
+edu.wpi.first.math.geometry.Rotation3d
+
+
Fetch the Rotation3d from the IMU.
-void
-
-
-
Fetch the yaw/pitch/roll from the IMU, inverts them all if SwerveIMU is inverted.
-
void
-
+setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
-
Set the yaw in degrees.
+
Set the gyro offset.
@@ -191,6 +196,13 @@ loadScripts(document, 'script');
Pigeon2 IMU device.
+
+
+offset
+private edu.wpi.first.math.geometry.Rotation3d offset
+Offset for the Pigeon 2.
+
+
@@ -254,28 +266,28 @@ loadScripts(document, 'script');
-
-setYaw
-public void setYaw(double yaw)
-Set the yaw in degrees.
+
+setOffset
+public void setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
+Set the gyro offset.
- Specified by:
-setYaw in class SwerveIMU
+setOffset in class SwerveIMU
- Parameters:
-yaw - Angle in degrees.
+offset - gyro offset as a Rotation3d.
-
-getYawPitchRoll
-public void getYawPitchRoll(double[] yprArray)
-Fetch the yaw/pitch/roll from the IMU, inverts them all if SwerveIMU is inverted.
+
+getRawRotation3d
+public edu.wpi.first.math.geometry.Rotation3d getRawRotation3d()
+Fetch the Rotation3d from the IMU without any zeroing. Robot relative.
- Specified by:
-getYawPitchRoll in class SwerveIMU
-- Parameters:
-yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
+getRawRotation3d in class SwerveIMU
+- Returns:
+Rotation3d from the IMU.
diff --git a/docs/swervelib/imu/PigeonSwerve.html b/docs/swervelib/imu/PigeonSwerve.html
index aa09c88..2050242 100644
--- a/docs/swervelib/imu/PigeonSwerve.html
+++ b/docs/swervelib/imu/PigeonSwerve.html
@@ -1,11 +1,11 @@
-
+
PigeonSwerve
-
+
@@ -98,6 +98,11 @@ loadScripts(document, 'script');
+private edu.wpi.first.math.geometry.Rotation3d
+
+
+
Offset for the Pigeon.
+
@@ -148,19 +153,19 @@ loadScripts(document, 'script');
Get the instantiated IMU object.
edu.wpi.first.math.geometry.Rotation3d
-
+
+
Fetch the Rotation3d from the IMU without any zeroing.
+
+edu.wpi.first.math.geometry.Rotation3d
+
+
Fetch the Rotation3d from the IMU.
-void
-
-
-
Fetch the yaw/pitch/roll from the IMU, inverts them all if SwerveIMU is inverted.
-
void
-
+setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
-
Set the yaw in degrees.
+
Set the gyro offset.
@@ -186,6 +191,13 @@ loadScripts(document, 'script');
Pigeon v1 IMU device.
+
+
+offset
+private edu.wpi.first.math.geometry.Rotation3d offset
+Offset for the Pigeon.
+
+
@@ -236,28 +248,28 @@ loadScripts(document, 'script');
-
-setYaw
-public void setYaw(double yaw)
-Set the yaw in degrees.
+
+setOffset
+public void setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
+Set the gyro offset.
- Specified by:
-setYaw in class SwerveIMU
+setOffset in class SwerveIMU
- Parameters:
-yaw - Angle in degrees.
+offset - gyro offset as a Rotation3d.
-
-getYawPitchRoll
-public void getYawPitchRoll(double[] yprArray)
-Fetch the yaw/pitch/roll from the IMU, inverts them all if SwerveIMU is inverted.
+
+getRawRotation3d
+public edu.wpi.first.math.geometry.Rotation3d getRawRotation3d()
+Fetch the Rotation3d from the IMU without any zeroing. Robot relative.
- Specified by:
-getYawPitchRoll in class SwerveIMU
-- Parameters:
-yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
+getRawRotation3d in class SwerveIMU
+- Returns:
+Rotation3d from the IMU.
diff --git a/docs/swervelib/imu/SwerveIMU.html b/docs/swervelib/imu/SwerveIMU.html
index 87e444f..e0da8aa 100644
--- a/docs/swervelib/imu/SwerveIMU.html
+++ b/docs/swervelib/imu/SwerveIMU.html
@@ -1,11 +1,11 @@
-
+
SwerveIMU
-
+
@@ -131,19 +131,19 @@ loadScripts(document, 'script');
Get the instantiated IMU object.
abstract edu.wpi.first.math.geometry.Rotation3d
-
+
+
Fetch the Rotation3d from the IMU without any zeroing.
+
+abstract edu.wpi.first.math.geometry.Rotation3d
+
+
Fetch the Rotation3d from the IMU.
-abstract void
-
-
-
Fetch the yaw/pitch/roll from the IMU.
-
abstract void
-
+setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
-
Set the yaw in degrees.
+
Set the gyro offset.
@@ -191,24 +191,24 @@ loadScripts(document, 'script');
-
-setYaw
-public abstract void setYaw(double yaw)
-Set the yaw in degrees.
+
+setOffset
+public abstract void setOffset(edu.wpi.first.math.geometry.Rotation3d offset)
+Set the gyro offset.
- Parameters:
-yaw - Yaw angle in degrees.
+offset - gyro offset as a Rotation3d.
-
-getYawPitchRoll
-public abstract void getYawPitchRoll(double[] yprArray)
-Fetch the yaw/pitch/roll from the IMU.
+
+getRawRotation3d
+public abstract edu.wpi.first.math.geometry.Rotation3d getRawRotation3d()
+Fetch the Rotation3d from the IMU without any zeroing. Robot relative.
-- Parameters:
-yprArray - Array which will be filled with {yaw, pitch, roll} in degrees.
+- Returns:
+Rotation3d from the IMU.
diff --git a/docs/swervelib/imu/package-summary.html b/docs/swervelib/imu/package-summary.html
index fc9d5db..48eb855 100644
--- a/docs/swervelib/imu/package-summary.html
+++ b/docs/swervelib/imu/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib.imu
-
+
diff --git a/docs/swervelib/imu/package-tree.html b/docs/swervelib/imu/package-tree.html
index eda38a2..38191ea 100644
--- a/docs/swervelib/imu/package-tree.html
+++ b/docs/swervelib/imu/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib.imu Class Hierarchy
-
+
diff --git a/docs/swervelib/math/Matter.html b/docs/swervelib/math/Matter.html
index 4a3de25..7951054 100644
--- a/docs/swervelib/math/Matter.html
+++ b/docs/swervelib/math/Matter.html
@@ -1,11 +1,11 @@
-
+
Matter
-
+
diff --git a/docs/swervelib/math/SwerveKinematics2.html b/docs/swervelib/math/SwerveKinematics2.html
index 030c8c6..321c800 100644
--- a/docs/swervelib/math/SwerveKinematics2.html
+++ b/docs/swervelib/math/SwerveKinematics2.html
@@ -1,11 +1,11 @@
-
+
SwerveKinematics2
-
+
diff --git a/docs/swervelib/math/SwerveMath.html b/docs/swervelib/math/SwerveMath.html
index dde7ab4..8e9c90d 100644
--- a/docs/swervelib/math/SwerveMath.html
+++ b/docs/swervelib/math/SwerveMath.html
@@ -1,11 +1,11 @@
-
+
SwerveMath
-
+
diff --git a/docs/swervelib/math/SwerveModuleState2.html b/docs/swervelib/math/SwerveModuleState2.html
index 7e3ba13..596933f 100644
--- a/docs/swervelib/math/SwerveModuleState2.html
+++ b/docs/swervelib/math/SwerveModuleState2.html
@@ -1,11 +1,11 @@
-
+
SwerveModuleState2
-
+
diff --git a/docs/swervelib/math/package-summary.html b/docs/swervelib/math/package-summary.html
index b2cde2c..273687d 100644
--- a/docs/swervelib/math/package-summary.html
+++ b/docs/swervelib/math/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib.math
-
+
diff --git a/docs/swervelib/math/package-tree.html b/docs/swervelib/math/package-tree.html
index 8e9becf..54db6b4 100644
--- a/docs/swervelib/math/package-tree.html
+++ b/docs/swervelib/math/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib.math Class Hierarchy
-
+
diff --git a/docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html b/docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html
index a6ed78e..cef7f80 100644
--- a/docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html
+++ b/docs/swervelib/motors/SparkMaxBrushedMotorSwerve.html
@@ -1,11 +1,11 @@
-
+
SparkMaxBrushedMotorSwerve
-
+
diff --git a/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html b/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html
index 5c5b1cf..e81afca 100644
--- a/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html
+++ b/docs/swervelib/motors/SparkMaxSwerve.SparkMAX_slotIdx.html
@@ -1,11 +1,11 @@
-
+
SparkMaxSwerve.SparkMAX_slotIdx
-
+
diff --git a/docs/swervelib/motors/SparkMaxSwerve.html b/docs/swervelib/motors/SparkMaxSwerve.html
index 3781637..0e4ad69 100644
--- a/docs/swervelib/motors/SparkMaxSwerve.html
+++ b/docs/swervelib/motors/SparkMaxSwerve.html
@@ -1,11 +1,11 @@
-
+
SparkMaxSwerve
-
+
diff --git a/docs/swervelib/motors/SwerveMotor.html b/docs/swervelib/motors/SwerveMotor.html
index 5741ea2..50eda8d 100644
--- a/docs/swervelib/motors/SwerveMotor.html
+++ b/docs/swervelib/motors/SwerveMotor.html
@@ -1,11 +1,11 @@
-
+
SwerveMotor
-
+
diff --git a/docs/swervelib/motors/TalonFXSwerve.html b/docs/swervelib/motors/TalonFXSwerve.html
index b8bc903..5c31262 100644
--- a/docs/swervelib/motors/TalonFXSwerve.html
+++ b/docs/swervelib/motors/TalonFXSwerve.html
@@ -1,11 +1,11 @@
-
+
TalonFXSwerve
-
+
diff --git a/docs/swervelib/motors/TalonSRXSwerve.html b/docs/swervelib/motors/TalonSRXSwerve.html
index 9b36712..fc853e9 100644
--- a/docs/swervelib/motors/TalonSRXSwerve.html
+++ b/docs/swervelib/motors/TalonSRXSwerve.html
@@ -1,11 +1,11 @@
-
+
TalonSRXSwerve
-
+
diff --git a/docs/swervelib/motors/package-summary.html b/docs/swervelib/motors/package-summary.html
index 1a69a69..f7abe17 100644
--- a/docs/swervelib/motors/package-summary.html
+++ b/docs/swervelib/motors/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib.motors
-
+
diff --git a/docs/swervelib/motors/package-tree.html b/docs/swervelib/motors/package-tree.html
index fba977b..5cf2de6 100644
--- a/docs/swervelib/motors/package-tree.html
+++ b/docs/swervelib/motors/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib.motors Class Hierarchy
-
+
diff --git a/docs/swervelib/package-summary.html b/docs/swervelib/package-summary.html
index daf1804..4f3dec2 100644
--- a/docs/swervelib/package-summary.html
+++ b/docs/swervelib/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib
-
+
diff --git a/docs/swervelib/package-tree.html b/docs/swervelib/package-tree.html
index efd0afa..d3419ba 100644
--- a/docs/swervelib/package-tree.html
+++ b/docs/swervelib/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib Class Hierarchy
-
+
diff --git a/docs/swervelib/parser/PIDFConfig.html b/docs/swervelib/parser/PIDFConfig.html
index 1eaf571..215bfa5 100644
--- a/docs/swervelib/parser/PIDFConfig.html
+++ b/docs/swervelib/parser/PIDFConfig.html
@@ -1,11 +1,11 @@
-
+
PIDFConfig
-
+
diff --git a/docs/swervelib/parser/SwerveControllerConfiguration.html b/docs/swervelib/parser/SwerveControllerConfiguration.html
index 130e2a1..b39b5db 100644
--- a/docs/swervelib/parser/SwerveControllerConfiguration.html
+++ b/docs/swervelib/parser/SwerveControllerConfiguration.html
@@ -1,11 +1,11 @@
-
+
SwerveControllerConfiguration
-
+
diff --git a/docs/swervelib/parser/SwerveDriveConfiguration.html b/docs/swervelib/parser/SwerveDriveConfiguration.html
index e73b26a..aec466c 100644
--- a/docs/swervelib/parser/SwerveDriveConfiguration.html
+++ b/docs/swervelib/parser/SwerveDriveConfiguration.html
@@ -1,11 +1,11 @@
-
+
SwerveDriveConfiguration
-
+
diff --git a/docs/swervelib/parser/SwerveModuleConfiguration.html b/docs/swervelib/parser/SwerveModuleConfiguration.html
index d92b138..097355b 100644
--- a/docs/swervelib/parser/SwerveModuleConfiguration.html
+++ b/docs/swervelib/parser/SwerveModuleConfiguration.html
@@ -1,11 +1,11 @@
-
+
SwerveModuleConfiguration
-
+
diff --git a/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html b/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html
index 528fd34..b8d726a 100644
--- a/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html
+++ b/docs/swervelib/parser/SwerveModulePhysicalCharacteristics.html
@@ -1,11 +1,11 @@
-
+
SwerveModulePhysicalCharacteristics
-
+
diff --git a/docs/swervelib/parser/SwerveParser.html b/docs/swervelib/parser/SwerveParser.html
index 56f853f..187b511 100644
--- a/docs/swervelib/parser/SwerveParser.html
+++ b/docs/swervelib/parser/SwerveParser.html
@@ -1,11 +1,11 @@
-
+
SwerveParser
-
+
diff --git a/docs/swervelib/parser/deserializer/PIDFRange.html b/docs/swervelib/parser/deserializer/PIDFRange.html
index 60391f0..8df733b 100644
--- a/docs/swervelib/parser/deserializer/PIDFRange.html
+++ b/docs/swervelib/parser/deserializer/PIDFRange.html
@@ -1,11 +1,11 @@
-
+
PIDFRange
-
+
diff --git a/docs/swervelib/parser/deserializer/package-summary.html b/docs/swervelib/parser/deserializer/package-summary.html
index bc781ed..1ec8908 100644
--- a/docs/swervelib/parser/deserializer/package-summary.html
+++ b/docs/swervelib/parser/deserializer/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib.parser.deserializer
-
+
diff --git a/docs/swervelib/parser/deserializer/package-tree.html b/docs/swervelib/parser/deserializer/package-tree.html
index 8a1971a..80433a5 100644
--- a/docs/swervelib/parser/deserializer/package-tree.html
+++ b/docs/swervelib/parser/deserializer/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib.parser.deserializer Class Hierarchy
-
+
diff --git a/docs/swervelib/parser/json/ControllerPropertiesJson.html b/docs/swervelib/parser/json/ControllerPropertiesJson.html
index 69e147e..2614621 100644
--- a/docs/swervelib/parser/json/ControllerPropertiesJson.html
+++ b/docs/swervelib/parser/json/ControllerPropertiesJson.html
@@ -1,11 +1,11 @@
-
+
ControllerPropertiesJson
-
+
diff --git a/docs/swervelib/parser/json/DeviceJson.html b/docs/swervelib/parser/json/DeviceJson.html
index dabd700..795ed93 100644
--- a/docs/swervelib/parser/json/DeviceJson.html
+++ b/docs/swervelib/parser/json/DeviceJson.html
@@ -1,11 +1,11 @@
-
+
DeviceJson
-
+
diff --git a/docs/swervelib/parser/json/ModuleJson.html b/docs/swervelib/parser/json/ModuleJson.html
index b1d1929..597bec8 100644
--- a/docs/swervelib/parser/json/ModuleJson.html
+++ b/docs/swervelib/parser/json/ModuleJson.html
@@ -1,11 +1,11 @@
-
+
ModuleJson
-
+
diff --git a/docs/swervelib/parser/json/MotorConfigDouble.html b/docs/swervelib/parser/json/MotorConfigDouble.html
index c16cadf..a01481a 100644
--- a/docs/swervelib/parser/json/MotorConfigDouble.html
+++ b/docs/swervelib/parser/json/MotorConfigDouble.html
@@ -1,11 +1,11 @@
-
+
MotorConfigDouble
-
+
diff --git a/docs/swervelib/parser/json/MotorConfigInt.html b/docs/swervelib/parser/json/MotorConfigInt.html
index 2f4779f..68d7836 100644
--- a/docs/swervelib/parser/json/MotorConfigInt.html
+++ b/docs/swervelib/parser/json/MotorConfigInt.html
@@ -1,11 +1,11 @@
-
+
MotorConfigInt
-
+
diff --git a/docs/swervelib/parser/json/PIDFPropertiesJson.html b/docs/swervelib/parser/json/PIDFPropertiesJson.html
index 22fb720..9f1d09b 100644
--- a/docs/swervelib/parser/json/PIDFPropertiesJson.html
+++ b/docs/swervelib/parser/json/PIDFPropertiesJson.html
@@ -1,11 +1,11 @@
-
+
PIDFPropertiesJson
-
+
diff --git a/docs/swervelib/parser/json/PhysicalPropertiesJson.html b/docs/swervelib/parser/json/PhysicalPropertiesJson.html
index 8c62c29..9fad9a2 100644
--- a/docs/swervelib/parser/json/PhysicalPropertiesJson.html
+++ b/docs/swervelib/parser/json/PhysicalPropertiesJson.html
@@ -1,11 +1,11 @@
-
+
PhysicalPropertiesJson
-
+
diff --git a/docs/swervelib/parser/json/SwerveDriveJson.html b/docs/swervelib/parser/json/SwerveDriveJson.html
index defff90..c9ae6e2 100644
--- a/docs/swervelib/parser/json/SwerveDriveJson.html
+++ b/docs/swervelib/parser/json/SwerveDriveJson.html
@@ -1,11 +1,11 @@
-
+
SwerveDriveJson
-
+
diff --git a/docs/swervelib/parser/json/modules/BoolMotorJson.html b/docs/swervelib/parser/json/modules/BoolMotorJson.html
index a781320..1dc00af 100644
--- a/docs/swervelib/parser/json/modules/BoolMotorJson.html
+++ b/docs/swervelib/parser/json/modules/BoolMotorJson.html
@@ -1,11 +1,11 @@
-
+
BoolMotorJson
-
+
diff --git a/docs/swervelib/parser/json/modules/LocationJson.html b/docs/swervelib/parser/json/modules/LocationJson.html
index 74d5e7b..f4483a2 100644
--- a/docs/swervelib/parser/json/modules/LocationJson.html
+++ b/docs/swervelib/parser/json/modules/LocationJson.html
@@ -1,11 +1,11 @@
-
+
LocationJson
-
+
diff --git a/docs/swervelib/parser/json/modules/package-summary.html b/docs/swervelib/parser/json/modules/package-summary.html
index 8a344a6..8c9de06 100644
--- a/docs/swervelib/parser/json/modules/package-summary.html
+++ b/docs/swervelib/parser/json/modules/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib.parser.json.modules
-
+
diff --git a/docs/swervelib/parser/json/modules/package-tree.html b/docs/swervelib/parser/json/modules/package-tree.html
index c55d1f3..1364835 100644
--- a/docs/swervelib/parser/json/modules/package-tree.html
+++ b/docs/swervelib/parser/json/modules/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib.parser.json.modules Class Hierarchy
-
+
diff --git a/docs/swervelib/parser/json/package-summary.html b/docs/swervelib/parser/json/package-summary.html
index a1d08ec..aa15fdd 100644
--- a/docs/swervelib/parser/json/package-summary.html
+++ b/docs/swervelib/parser/json/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib.parser.json
-
+
diff --git a/docs/swervelib/parser/json/package-tree.html b/docs/swervelib/parser/json/package-tree.html
index b3135d5..b4e7434 100644
--- a/docs/swervelib/parser/json/package-tree.html
+++ b/docs/swervelib/parser/json/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib.parser.json Class Hierarchy
-
+
diff --git a/docs/swervelib/parser/package-summary.html b/docs/swervelib/parser/package-summary.html
index 8b00ed1..3952c36 100644
--- a/docs/swervelib/parser/package-summary.html
+++ b/docs/swervelib/parser/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib.parser
-
+
diff --git a/docs/swervelib/parser/package-tree.html b/docs/swervelib/parser/package-tree.html
index a86b2df..34ee35d 100644
--- a/docs/swervelib/parser/package-tree.html
+++ b/docs/swervelib/parser/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib.parser Class Hierarchy
-
+
diff --git a/docs/swervelib/simulation/SwerveIMUSimulation.html b/docs/swervelib/simulation/SwerveIMUSimulation.html
index 2262834..db139a2 100644
--- a/docs/swervelib/simulation/SwerveIMUSimulation.html
+++ b/docs/swervelib/simulation/SwerveIMUSimulation.html
@@ -1,11 +1,11 @@
-
+
SwerveIMUSimulation
-
+
diff --git a/docs/swervelib/simulation/SwerveModuleSimulation.html b/docs/swervelib/simulation/SwerveModuleSimulation.html
index 152c318..35710e6 100644
--- a/docs/swervelib/simulation/SwerveModuleSimulation.html
+++ b/docs/swervelib/simulation/SwerveModuleSimulation.html
@@ -1,11 +1,11 @@
-
+
SwerveModuleSimulation
-
+
diff --git a/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html b/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html
index 9fcc100..78a3f10 100644
--- a/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html
+++ b/docs/swervelib/simulation/ctre/PhysicsSim.SimProfile.html
@@ -1,11 +1,11 @@
-
+
PhysicsSim.SimProfile
-
+
diff --git a/docs/swervelib/simulation/ctre/PhysicsSim.html b/docs/swervelib/simulation/ctre/PhysicsSim.html
index 798662d..040a2f5 100644
--- a/docs/swervelib/simulation/ctre/PhysicsSim.html
+++ b/docs/swervelib/simulation/ctre/PhysicsSim.html
@@ -1,11 +1,11 @@
-
+
PhysicsSim
-
+
diff --git a/docs/swervelib/simulation/ctre/TalonFXSimProfile.html b/docs/swervelib/simulation/ctre/TalonFXSimProfile.html
index 9ba1bc3..27dde19 100644
--- a/docs/swervelib/simulation/ctre/TalonFXSimProfile.html
+++ b/docs/swervelib/simulation/ctre/TalonFXSimProfile.html
@@ -1,11 +1,11 @@
-
+
TalonFXSimProfile
-
+
diff --git a/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html b/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html
index ee692a6..64e94bf 100644
--- a/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html
+++ b/docs/swervelib/simulation/ctre/TalonSRXSimProfile.html
@@ -1,11 +1,11 @@
-
+
TalonSRXSimProfile
-
+
diff --git a/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html b/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html
index bac6b7a..aac38e5 100644
--- a/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html
+++ b/docs/swervelib/simulation/ctre/VictorSPXSimProfile.html
@@ -1,11 +1,11 @@
-
+
VictorSPXSimProfile
-
+
diff --git a/docs/swervelib/simulation/ctre/package-summary.html b/docs/swervelib/simulation/ctre/package-summary.html
index 48fe2ed..3f59219 100644
--- a/docs/swervelib/simulation/ctre/package-summary.html
+++ b/docs/swervelib/simulation/ctre/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib.simulation.ctre
-
+
diff --git a/docs/swervelib/simulation/ctre/package-tree.html b/docs/swervelib/simulation/ctre/package-tree.html
index ddab880..f75c6ad 100644
--- a/docs/swervelib/simulation/ctre/package-tree.html
+++ b/docs/swervelib/simulation/ctre/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib.simulation.ctre Class Hierarchy
-
+
diff --git a/docs/swervelib/simulation/package-summary.html b/docs/swervelib/simulation/package-summary.html
index 600f417..b6cffc1 100644
--- a/docs/swervelib/simulation/package-summary.html
+++ b/docs/swervelib/simulation/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib.simulation
-
+
diff --git a/docs/swervelib/simulation/package-tree.html b/docs/swervelib/simulation/package-tree.html
index b1f087a..5e18b38 100644
--- a/docs/swervelib/simulation/package-tree.html
+++ b/docs/swervelib/simulation/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib.simulation Class Hierarchy
-
+
diff --git a/docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html b/docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html
index c3f9559..6b0dc74 100644
--- a/docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html
+++ b/docs/swervelib/telemetry/SwerveDriveTelemetry.TelemetryVerbosity.html
@@ -1,11 +1,11 @@
-
+
SwerveDriveTelemetry.TelemetryVerbosity
-
+
diff --git a/docs/swervelib/telemetry/SwerveDriveTelemetry.html b/docs/swervelib/telemetry/SwerveDriveTelemetry.html
index 5be04f5..566319f 100644
--- a/docs/swervelib/telemetry/SwerveDriveTelemetry.html
+++ b/docs/swervelib/telemetry/SwerveDriveTelemetry.html
@@ -1,11 +1,11 @@
-
+
SwerveDriveTelemetry
-
+
diff --git a/docs/swervelib/telemetry/package-summary.html b/docs/swervelib/telemetry/package-summary.html
index 19d81a0..863ef29 100644
--- a/docs/swervelib/telemetry/package-summary.html
+++ b/docs/swervelib/telemetry/package-summary.html
@@ -1,11 +1,11 @@
-
+
swervelib.telemetry
-
+
diff --git a/docs/swervelib/telemetry/package-tree.html b/docs/swervelib/telemetry/package-tree.html
index 356747d..e748973 100644
--- a/docs/swervelib/telemetry/package-tree.html
+++ b/docs/swervelib/telemetry/package-tree.html
@@ -1,11 +1,11 @@
-
+
swervelib.telemetry Class Hierarchy
-
+
diff --git a/swervelib/SwerveDrive.java b/swervelib/SwerveDrive.java
index 3ed9256..9319bb0 100644
--- a/swervelib/SwerveDrive.java
+++ b/swervelib/SwerveDrive.java
@@ -403,7 +403,7 @@ public class SwerveDrive
// simulated
if (!SwerveDriveTelemetry.isSimulation)
{
- imu.setYaw(0);
+ imu.setOffset(imu.getRawRotation3d());
} else
{
simIMU.setAngle(0);
@@ -682,7 +682,7 @@ public class SwerveDrive
if (!SwerveDriveTelemetry.isSimulation)
{
- imu.setYaw(swerveDrivePoseEstimator.getEstimatedPosition().getRotation().getDegrees());
+ imu.setOffset(new Rotation3d(0, 0, swerveDrivePoseEstimator.getEstimatedPosition().getRotation().getRadians()));
// Yaw reset recommended by Team 1622
} else
{
@@ -691,13 +691,13 @@ public class SwerveDrive
}
/**
- * Set the Gyroscope offset using a {@link Rotation3d} object. (Only yaw works currently.)
+ * Set the Gyroscope offset using a {@link Rotation3d} object.
*
* @param gyro Gyroscope offset.
*/
public void setGyro(Rotation3d gyro)
{
- imu.setYaw(gyro.getZ());
+ imu.setOffset(gyro);
}
}
diff --git a/swervelib/imu/ADIS16448Swerve.java b/swervelib/imu/ADIS16448Swerve.java
index 7b1b2ff..ed9ae42 100644
--- a/swervelib/imu/ADIS16448Swerve.java
+++ b/swervelib/imu/ADIS16448Swerve.java
@@ -17,9 +17,9 @@ public class ADIS16448Swerve extends SwerveIMU
*/
private final ADIS16448_IMU imu;
/**
- * Offset for the ADIS16448 yaw reading.
+ * Offset for the ADIS16448.
*/
- private double yawOffset = 0;
+ private Rotation3d offset = new Rotation3d();
/**
* Construct the ADIS16448 imu and reset default configurations. Publish the gyro to the SmartDashboard.
@@ -37,7 +37,9 @@ public class ADIS16448Swerve extends SwerveIMU
@Override
public void factoryDefault()
{
- yawOffset = (imu.getAngle() % 360);
+ offset = new Rotation3d(
+ Math.toRadians(imu.getYComplementaryAngle()), Math.toRadians(imu.getXComplementaryAngle()),
+ Math.toRadians(imu.getAngle()));
}
/**
@@ -50,40 +52,36 @@ public class ADIS16448Swerve extends SwerveIMU
}
/**
- * Set the yaw in degrees.
+ * Set the gyro offset.
*
- * @param yaw Yaw angle in degrees.
+ * @param offset gyro offset as a {@link Rotation3d}.
*/
- @Override
- public void setYaw(double yaw)
+ public void setOffset(Rotation3d offset)
{
- yawOffset = (yaw % 360) + (imu.getAngle() % 360);
+ offset = getRotation3d();
}
/**
- * Fetch the yaw/pitch/roll from the IMU.
+ * Fetch the {@link Rotation3d} from the IMU without any zeroing. Robot relative.
*
- * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees.
+ * @return {@link Rotation3d} from the IMU.
*/
- @Override
- public void getYawPitchRoll(double[] yprArray)
+ public Rotation3d getRawRotation3d()
{
- yprArray[0] = (imu.getAngle() % 360) - yawOffset;
- yprArray[1] = imu.getXComplementaryAngle() % 360;
- yprArray[2] = imu.getYComplementaryAngle() % 360;
+ return new Rotation3d(
+ Math.toRadians(imu.getYComplementaryAngle()), Math.toRadians(imu.getXComplementaryAngle()),
+ Math.toRadians(imu.getAngle()));
}
-
/**
* Fetch the {@link Rotation3d} from the IMU. Robot relative.
*
* @return {@link Rotation3d} from the IMU.
*/
+ @Override
public Rotation3d getRotation3d()
{
- return new Rotation3d(
- imu.getYComplementaryAngle(), imu.getXComplementaryAngle(), imu.getAngle())
- .minus(new Rotation3d(0, 0, Math.toRadians(yawOffset)));
+ return getRawRotation3d().minus(offset);
}
/**
diff --git a/swervelib/imu/ADIS16470Swerve.java b/swervelib/imu/ADIS16470Swerve.java
index d586872..eadfacd 100644
--- a/swervelib/imu/ADIS16470Swerve.java
+++ b/swervelib/imu/ADIS16470Swerve.java
@@ -17,9 +17,9 @@ public class ADIS16470Swerve extends SwerveIMU
*/
private final ADIS16470_IMU imu;
/**
- * Offset for the ADIS16470 yaw reading.
+ * Offset for the ADIS16470.
*/
- private double yawOffset = 0;
+ private Rotation3d offset = new Rotation3d();
/**
* Construct the ADIS16470 imu and reset default configurations. Publish the gyro to the SmartDashboard.
@@ -27,6 +27,7 @@ public class ADIS16470Swerve extends SwerveIMU
public ADIS16470Swerve()
{
imu = new ADIS16470_IMU();
+ offset = new Rotation3d();
factoryDefault();
SmartDashboard.putData(imu);
}
@@ -37,7 +38,9 @@ public class ADIS16470Swerve extends SwerveIMU
@Override
public void factoryDefault()
{
- yawOffset = imu.getAngle() % 360;
+ offset = new Rotation3d(
+ Math.toRadians(imu.getYComplementaryAngle()), Math.toRadians(imu.getXComplementaryAngle()),
+ Math.toRadians(imu.getAngle()));
}
/**
@@ -50,27 +53,25 @@ public class ADIS16470Swerve extends SwerveIMU
}
/**
- * Set the yaw in degrees.
+ * Set the gyro offset.
*
- * @param yaw Yaw angle in degrees.
+ * @param offset gyro offset as a {@link Rotation3d}.
*/
- @Override
- public void setYaw(double yaw)
+ public void setOffset(Rotation3d offset)
{
- yawOffset = (yaw % 360) + (imu.getAngle() % 360);
+ offset = getRotation3d();
}
/**
- * Fetch the yaw/pitch/roll from the IMU.
+ * Fetch the {@link Rotation3d} from the IMU without any zeroing. Robot relative.
*
- * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees.
+ * @return {@link Rotation3d} from the IMU.
*/
- @Override
- public void getYawPitchRoll(double[] yprArray)
+ public Rotation3d getRawRotation3d()
{
- yprArray[0] = (imu.getAngle() % 360) - yawOffset;
- yprArray[1] = imu.getXComplementaryAngle() % 360;
- yprArray[2] = imu.getYComplementaryAngle() % 360;
+ return new Rotation3d(
+ Math.toRadians(imu.getYComplementaryAngle()), Math.toRadians(imu.getXComplementaryAngle()),
+ Math.toRadians(imu.getAngle()));
}
/**
@@ -78,11 +79,10 @@ public class ADIS16470Swerve extends SwerveIMU
*
* @return {@link Rotation3d} from the IMU.
*/
+ @Override
public Rotation3d getRotation3d()
{
- return new Rotation3d(
- imu.getYComplementaryAngle(), imu.getXComplementaryAngle(), imu.getAngle())
- .minus(new Rotation3d(0, 0, Math.toRadians(yawOffset)));
+ return getRawRotation3d().minus(offset);
}
/**
diff --git a/swervelib/imu/ADXRS450Swerve.java b/swervelib/imu/ADXRS450Swerve.java
index 0af120b..699470f 100644
--- a/swervelib/imu/ADXRS450Swerve.java
+++ b/swervelib/imu/ADXRS450Swerve.java
@@ -17,9 +17,9 @@ public class ADXRS450Swerve extends SwerveIMU
*/
private final ADXRS450_Gyro imu;
/**
- * Offset for the ADXRS450 yaw reading.
+ * Offset for the ADXRS450.
*/
- private double yawOffset = 0;
+ private Rotation3d offset = new Rotation3d();
/**
* Construct the ADXRS450 imu and reset default configurations. Publish the gyro to the SmartDashboard.
@@ -37,7 +37,7 @@ public class ADXRS450Swerve extends SwerveIMU
@Override
public void factoryDefault()
{
- yawOffset = imu.getAngle() % 360;
+ offset = new Rotation3d(0, 0, Math.toRadians(imu.getAngle()));
}
/**
@@ -50,27 +50,23 @@ public class ADXRS450Swerve extends SwerveIMU
}
/**
- * Set the yaw in degrees.
+ * Set the gyro offset.
*
- * @param yaw Yaw angle in degrees.
+ * @param offset gyro offset as a {@link Rotation3d}.
*/
- @Override
- public void setYaw(double yaw)
+ public void setOffset(Rotation3d offset)
{
- yawOffset = (yaw % 360) + (imu.getAngle() % 360);
+ offset = getRotation3d();
}
/**
- * Fetch the yaw/pitch/roll from the IMU.
+ * Fetch the {@link Rotation3d} from the IMU without any zeroing. Robot relative.
*
- * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees.
+ * @return {@link Rotation3d} from the IMU.
*/
- @Override
- public void getYawPitchRoll(double[] yprArray)
+ public Rotation3d getRawRotation3d()
{
- yprArray[0] = (imu.getAngle() % 360) - yawOffset;
- yprArray[1] = 0;
- yprArray[2] = 0;
+ return new Rotation3d(0, 0, Math.toRadians(imu.getAngle()));
}
/**
@@ -78,10 +74,10 @@ public class ADXRS450Swerve extends SwerveIMU
*
* @return {@link Rotation3d} from the IMU.
*/
+ @Override
public Rotation3d getRotation3d()
{
- return new Rotation3d(0, 0, imu.getAngle())
- .minus(new Rotation3d(0, 0, Math.toRadians(yawOffset)));
+ return getRawRotation3d().minus(offset);
}
/**
diff --git a/swervelib/imu/AnalogGyroSwerve.java b/swervelib/imu/AnalogGyroSwerve.java
index e114062..ee55a18 100644
--- a/swervelib/imu/AnalogGyroSwerve.java
+++ b/swervelib/imu/AnalogGyroSwerve.java
@@ -17,9 +17,9 @@ public class AnalogGyroSwerve extends SwerveIMU
*/
private final AnalogGyro gyro;
/**
- * The yaw offset for the gyroscope.
+ * Offset for the analog gyro.
*/
- private double yawOffset;
+ private Rotation3d offset = new Rotation3d();
/**
* Analog port in which the gyroscope is connected. Can only be attached to analog ports 0 or 1.
@@ -34,8 +34,8 @@ public class AnalogGyroSwerve extends SwerveIMU
"Analog Gyroscope must be attached to port 0 or 1 on the roboRIO.\n");
}
gyro = new AnalogGyro(channel);
- SmartDashboard.putData(gyro);
factoryDefault();
+ SmartDashboard.putData(gyro);
}
/**
@@ -44,7 +44,7 @@ public class AnalogGyroSwerve extends SwerveIMU
@Override
public void factoryDefault()
{
- yawOffset = gyro.getAngle() % 360;
+ offset = new Rotation3d(0, 0, Math.toRadians(gyro.getAngle()));
}
/**
@@ -57,27 +57,23 @@ public class AnalogGyroSwerve extends SwerveIMU
}
/**
- * Set the yaw in degrees.
+ * Set the gyro offset.
*
- * @param yaw Yaw angle in degrees.
+ * @param offset gyro offset as a {@link Rotation3d}.
*/
- @Override
- public void setYaw(double yaw)
+ public void setOffset(Rotation3d offset)
{
- yawOffset = (yaw % 360) + (gyro.getAngle() % 360);
+ offset = getRotation3d();
}
/**
- * Fetch the yaw/pitch/roll from the IMU.
+ * Fetch the {@link Rotation3d} from the IMU without any zeroing. Robot relative.
*
- * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees.
+ * @return {@link Rotation3d} from the IMU.
*/
- @Override
- public void getYawPitchRoll(double[] yprArray)
+ public Rotation3d getRawRotation3d()
{
- yprArray[0] = (gyro.getAngle() % 360) - yawOffset;
- yprArray[1] = 0;
- yprArray[2] = 0;
+ return new Rotation3d(0, 0, Math.toRadians(gyro.getAngle()));
}
/**
@@ -85,10 +81,10 @@ public class AnalogGyroSwerve extends SwerveIMU
*
* @return {@link Rotation3d} from the IMU.
*/
+ @Override
public Rotation3d getRotation3d()
{
- return new Rotation3d(0, 0, gyro.getAngle())
- .minus(new Rotation3d(0, 0, Math.toRadians(yawOffset)));
+ return getRawRotation3d().minus(offset);
}
/**
diff --git a/swervelib/imu/NavXSwerve.java b/swervelib/imu/NavXSwerve.java
index 0e6b9ed..bb0bbbf 100644
--- a/swervelib/imu/NavXSwerve.java
+++ b/swervelib/imu/NavXSwerve.java
@@ -18,11 +18,11 @@ public class NavXSwerve extends SwerveIMU
/**
* NavX IMU.
*/
- private AHRS gyro;
+ private AHRS gyro;
/**
- * Offset for the NavX yaw reading.
+ * Offset for the NavX.
*/
- private double yawOffset = 0;
+ private Rotation3d offset = new Rotation3d();
/**
* Constructor for the NavX swerve.
@@ -37,6 +37,7 @@ public class NavXSwerve extends SwerveIMU
/* Alternatively: I2C.Port.kMXP, SerialPort.Port.kMXP or SerialPort.Port.kUSB */
/* See http://navx-mxp.kauailabs.com/guidance/selecting-an-interface/ for details. */
gyro = new AHRS(port);
+ factoryDefault();
SmartDashboard.putData(gyro);
} catch (RuntimeException ex)
{
@@ -51,7 +52,10 @@ public class NavXSwerve extends SwerveIMU
public void factoryDefault()
{
// gyro.reset(); // Reported to be slow
- yawOffset = gyro.getYaw() % 360;
+ offset = new Rotation3d(new Quaternion(gyro.getQuaternionW(),
+ gyro.getQuaternionX(),
+ gyro.getQuaternionY(),
+ gyro.getQuaternionZ()));
}
/**
@@ -63,29 +67,26 @@ public class NavXSwerve extends SwerveIMU
}
/**
- * Set the yaw in degrees.
+ * Set the gyro offset.
*
- * @param yaw Yaw angle in degrees.
+ * @param offset gyro offset as a {@link Rotation3d}.
*/
- @Override
- public void setYaw(double yaw)
+ public void setOffset(Rotation3d offset)
{
- // gyro.reset(); // Reported to be slow using the offset.
- yawOffset = (yaw % 360) + (gyro.getYaw() % 360);
+ offset = getRotation3d();
}
/**
- * Fetch the yaw/pitch/roll from the IMU.
+ * Fetch the {@link Rotation3d} from the IMU without any zeroing. Robot relative.
*
- * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees.
+ * @return {@link Rotation3d} from the IMU.
*/
- @Override
- public void getYawPitchRoll(double[] yprArray)
+ public Rotation3d getRawRotation3d()
{
-
- yprArray[0] = (gyro.getYaw() % 360) - yawOffset;
- yprArray[1] = (gyro.getPitch() % 360);
- yprArray[2] = (gyro.getRoll() % 360);
+ return new Rotation3d(new Quaternion(gyro.getQuaternionW(),
+ gyro.getQuaternionX(),
+ gyro.getQuaternionY(),
+ gyro.getQuaternionZ()));
}
/**
@@ -93,13 +94,10 @@ public class NavXSwerve extends SwerveIMU
*
* @return {@link Rotation3d} from the IMU.
*/
+ @Override
public Rotation3d getRotation3d()
{
- return new Rotation3d(new Quaternion(gyro.getQuaternionW(),
- gyro.getQuaternionX(),
- gyro.getQuaternionY(),
- gyro.getQuaternionZ()))
- .minus(new Rotation3d(0, 0, Math.toRadians(yawOffset)));
+ return getRawRotation3d().minus(offset);
}
/**
diff --git a/swervelib/imu/Pigeon2Swerve.java b/swervelib/imu/Pigeon2Swerve.java
index e865c87..2c60c55 100644
--- a/swervelib/imu/Pigeon2Swerve.java
+++ b/swervelib/imu/Pigeon2Swerve.java
@@ -18,6 +18,10 @@ public class Pigeon2Swerve extends SwerveIMU
* Pigeon2 IMU device.
*/
WPI_Pigeon2 imu;
+ /**
+ * Offset for the Pigeon 2.
+ */
+ private Rotation3d offset = new Rotation3d();
/**
* Generate the SwerveIMU for pigeon.
@@ -62,25 +66,26 @@ public class Pigeon2Swerve extends SwerveIMU
}
/**
- * Set the yaw in degrees.
+ * Set the gyro offset.
*
- * @param yaw Angle in degrees.
+ * @param offset gyro offset as a {@link Rotation3d}.
*/
- @Override
- public void setYaw(double yaw)
+ public void setOffset(Rotation3d offset)
{
- imu.setYaw(yaw);
+ offset = getRotation3d();
}
/**
- * Fetch the yaw/pitch/roll from the IMU, inverts them all if SwerveIMU is inverted.
+ * Fetch the {@link Rotation3d} from the IMU without any zeroing. Robot relative.
*
- * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees.
+ * @return {@link Rotation3d} from the IMU.
*/
@Override
- public void getYawPitchRoll(double[] yprArray)
+ public Rotation3d getRawRotation3d()
{
- imu.getYawPitchRoll(yprArray);
+ double[] wxyz = new double[4];
+ imu.get6dQuaternion(wxyz);
+ return new Rotation3d(new Quaternion(wxyz[0], wxyz[1], wxyz[2], wxyz[3]));
}
/**
@@ -91,9 +96,7 @@ public class Pigeon2Swerve extends SwerveIMU
@Override
public Rotation3d getRotation3d()
{
- double[] wxyz = new double[4];
- imu.get6dQuaternion(wxyz);
- return new Rotation3d(new Quaternion(wxyz[0], wxyz[1], wxyz[2], wxyz[3]));
+ return getRawRotation3d().minus(offset);
}
/**
diff --git a/swervelib/imu/PigeonSwerve.java b/swervelib/imu/PigeonSwerve.java
index 64cd3de..32a7071 100644
--- a/swervelib/imu/PigeonSwerve.java
+++ b/swervelib/imu/PigeonSwerve.java
@@ -17,6 +17,10 @@ public class PigeonSwerve extends SwerveIMU
* Pigeon v1 IMU device.
*/
WPI_PigeonIMU imu;
+ /**
+ * Offset for the Pigeon.
+ */
+ private Rotation3d offset = new Rotation3d();
/**
* Generate the SwerveIMU for pigeon.
@@ -26,6 +30,7 @@ public class PigeonSwerve extends SwerveIMU
public PigeonSwerve(int canid)
{
imu = new WPI_PigeonIMU(canid);
+ offset = new Rotation3d();
SmartDashboard.putData(imu);
}
@@ -48,25 +53,26 @@ public class PigeonSwerve extends SwerveIMU
}
/**
- * Set the yaw in degrees.
+ * Set the gyro offset.
*
- * @param yaw Angle in degrees.
+ * @param offset gyro offset as a {@link Rotation3d}.
*/
- @Override
- public void setYaw(double yaw)
+ public void setOffset(Rotation3d offset)
{
- imu.setYaw(yaw);
+ offset = getRotation3d();
}
/**
- * Fetch the yaw/pitch/roll from the IMU, inverts them all if SwerveIMU is inverted.
+ * Fetch the {@link Rotation3d} from the IMU without any zeroing. Robot relative.
*
- * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees.
+ * @return {@link Rotation3d} from the IMU.
*/
@Override
- public void getYawPitchRoll(double[] yprArray)
+ public Rotation3d getRawRotation3d()
{
- imu.getYawPitchRoll(yprArray);
+ double[] wxyz = new double[4];
+ imu.get6dQuaternion(wxyz);
+ return new Rotation3d(new Quaternion(wxyz[0], wxyz[1], wxyz[2], wxyz[3]));
}
/**
@@ -77,9 +83,7 @@ public class PigeonSwerve extends SwerveIMU
@Override
public Rotation3d getRotation3d()
{
- double[] wxyz = new double[4];
- imu.get6dQuaternion(wxyz);
- return new Rotation3d(new Quaternion(wxyz[0], wxyz[1], wxyz[2], wxyz[3]));
+ return getRawRotation3d().minus(offset);
}
/**
diff --git a/swervelib/imu/SwerveIMU.java b/swervelib/imu/SwerveIMU.java
index 1dd98af..11b39da 100644
--- a/swervelib/imu/SwerveIMU.java
+++ b/swervelib/imu/SwerveIMU.java
@@ -21,18 +21,18 @@ public abstract class SwerveIMU
public abstract void clearStickyFaults();
/**
- * Set the yaw in degrees.
+ * Set the gyro offset.
*
- * @param yaw Yaw angle in degrees.
+ * @param offset gyro offset as a {@link Rotation3d}.
*/
- public abstract void setYaw(double yaw);
+ public abstract void setOffset(Rotation3d offset);
/**
- * Fetch the yaw/pitch/roll from the IMU.
+ * Fetch the {@link Rotation3d} from the IMU without any zeroing. Robot relative.
*
- * @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees.
+ * @return {@link Rotation3d} from the IMU.
*/
- public abstract void getYawPitchRoll(double[] yprArray);
+ public abstract Rotation3d getRawRotation3d();
/**
* Fetch the {@link Rotation3d} from the IMU. Robot relative.