Record Class OdometryGuard.Settings
java.lang.Object
java.lang.Record
frc.spectrumLib.localization.OdometryGuard.Settings
- Record Components:
maxSpeed- fastest believable wheel travel, m/s (about 1.5x top speed)maxTurnRate- fastest believable gyro rotation, rad/smoduleLocations- module positions from the robot centre, kinematics order
- Enclosing class:
OdometryGuard
public static record OdometryGuard.Settings(double maxSpeed, double maxTurnRate, Translation2d[] moduleLocations)
extends Record
Limits and geometry.
-
Constructor Summary
ConstructorsConstructorDescriptionSettings(double maxSpeed, double maxTurnRate, Translation2d[] moduleLocations) Creates an instance of aSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublemaxSpeed()Returns the value of themaxSpeedrecord component.doubleReturns the value of themaxTurnRaterecord component.Returns the value of themoduleLocationsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Settings
Creates an instance of aSettingsrecord class.- Parameters:
maxSpeed- the value for themaxSpeedrecord componentmaxTurnRate- the value for themaxTurnRaterecord componentmoduleLocations- the value for themoduleLocationsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
maxSpeed
-
maxTurnRate
public double maxTurnRate()Returns the value of themaxTurnRaterecord component.- Returns:
- the value of the
maxTurnRaterecord component
-
moduleLocations
Returns the value of themoduleLocationsrecord component.- Returns:
- the value of the
moduleLocationsrecord component
-