Record Class AprilTagPoseEstimator.Params
java.lang.Object
java.lang.Record
frc.robot.subsystems.apriltagvision.AprilTagPoseEstimator.Params
- Record Components:
fieldLengthMeters- field length for bounds checking in metersfieldWidthMeters- field width for bounds checking in metersmaxAmbiguity- maximum dimensionless ambiguity for single-tag observationslinearStdDevBaseline- baseline standard deviation for x/y in meters at 1 meter with 1 tagangularStdDevBaseline- baseline standard deviation for rotation in radians at 1 meter with 1 tagmaxTagDistanceMeters- maximum average tag distance in meters before rejectionmaxPoseDeviationMeters- maximum deviation from odometry in meters before rejectionmaxMultiTagAmbiguity- maximum ambiguity for multi-tag observationsmaxZHeightMeters- maximum absolute Z height in meters for the estimated poseignoredTagIds- tag IDs to ignore during estimationtagSwitchStdDevMultiplier- standard deviation multiplier when tag IDs change between framesinitialPoseAcceptanceCount- number of poses to accept without odometry deviation checking at startup, or 0 to disable
- Enclosing class:
- AprilTagPoseEstimator
public static record AprilTagPoseEstimator.Params(double fieldLengthMeters, double fieldWidthMeters, double maxAmbiguity, double linearStdDevBaseline, double angularStdDevBaseline, double maxTagDistanceMeters, double maxPoseDeviationMeters, double maxMultiTagAmbiguity, double maxZHeightMeters, int[] ignoredTagIds, double tagSwitchStdDevMultiplier, int initialPoseAcceptanceCount)
extends Record
Parameters for pose estimation filtering and uncertainty calculation.
-
Constructor Summary
ConstructorsConstructorDescriptionParams(double fieldLengthMeters, double fieldWidthMeters, double maxAmbiguity, double linearStdDevBaseline, double angularStdDevBaseline, double maxTagDistanceMeters, double maxPoseDeviationMeters, double maxMultiTagAmbiguity, double maxZHeightMeters, int[] ignoredTagIds, double tagSwitchStdDevMultiplier, int initialPoseAcceptanceCount) Creates an instance of aParamsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theangularStdDevBaselinerecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thefieldLengthMetersrecord component.doubleReturns the value of thefieldWidthMetersrecord component.final inthashCode()Returns a hash code value for this object.int[]Returns the value of theignoredTagIdsrecord component.intReturns the value of theinitialPoseAcceptanceCountrecord component.doubleReturns the value of thelinearStdDevBaselinerecord component.doubleReturns the value of themaxAmbiguityrecord component.doubleReturns the value of themaxMultiTagAmbiguityrecord component.doubleReturns the value of themaxPoseDeviationMetersrecord component.doubleReturns the value of themaxTagDistanceMetersrecord component.doubleReturns the value of themaxZHeightMetersrecord component.doubleReturns the value of thetagSwitchStdDevMultiplierrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Params
public Params(double fieldLengthMeters, double fieldWidthMeters, double maxAmbiguity, double linearStdDevBaseline, double angularStdDevBaseline, double maxTagDistanceMeters, double maxPoseDeviationMeters, double maxMultiTagAmbiguity, double maxZHeightMeters, int[] ignoredTagIds, double tagSwitchStdDevMultiplier, int initialPoseAcceptanceCount) Creates an instance of aParamsrecord class.- Parameters:
fieldLengthMeters- the value for thefieldLengthMetersrecord componentfieldWidthMeters- the value for thefieldWidthMetersrecord componentmaxAmbiguity- the value for themaxAmbiguityrecord componentlinearStdDevBaseline- the value for thelinearStdDevBaselinerecord componentangularStdDevBaseline- the value for theangularStdDevBaselinerecord componentmaxTagDistanceMeters- the value for themaxTagDistanceMetersrecord componentmaxPoseDeviationMeters- the value for themaxPoseDeviationMetersrecord componentmaxMultiTagAmbiguity- the value for themaxMultiTagAmbiguityrecord componentmaxZHeightMeters- the value for themaxZHeightMetersrecord componentignoredTagIds- the value for theignoredTagIdsrecord componenttagSwitchStdDevMultiplier- the value for thetagSwitchStdDevMultiplierrecord componentinitialPoseAcceptanceCount- the value for theinitialPoseAcceptanceCountrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
fieldLengthMeters
public double fieldLengthMeters()Returns the value of thefieldLengthMetersrecord component.- Returns:
- the value of the
fieldLengthMetersrecord component
-
fieldWidthMeters
public double fieldWidthMeters()Returns the value of thefieldWidthMetersrecord component.- Returns:
- the value of the
fieldWidthMetersrecord component
-
maxAmbiguity
public double maxAmbiguity()Returns the value of themaxAmbiguityrecord component.- Returns:
- the value of the
maxAmbiguityrecord component
-
linearStdDevBaseline
public double linearStdDevBaseline()Returns the value of thelinearStdDevBaselinerecord component.- Returns:
- the value of the
linearStdDevBaselinerecord component
-
angularStdDevBaseline
public double angularStdDevBaseline()Returns the value of theangularStdDevBaselinerecord component.- Returns:
- the value of the
angularStdDevBaselinerecord component
-
maxTagDistanceMeters
public double maxTagDistanceMeters()Returns the value of themaxTagDistanceMetersrecord component.- Returns:
- the value of the
maxTagDistanceMetersrecord component
-
maxPoseDeviationMeters
public double maxPoseDeviationMeters()Returns the value of themaxPoseDeviationMetersrecord component.- Returns:
- the value of the
maxPoseDeviationMetersrecord component
-
maxMultiTagAmbiguity
public double maxMultiTagAmbiguity()Returns the value of themaxMultiTagAmbiguityrecord component.- Returns:
- the value of the
maxMultiTagAmbiguityrecord component
-
maxZHeightMeters
public double maxZHeightMeters()Returns the value of themaxZHeightMetersrecord component.- Returns:
- the value of the
maxZHeightMetersrecord component
-
ignoredTagIds
public int[] ignoredTagIds()Returns the value of theignoredTagIdsrecord component.- Returns:
- the value of the
ignoredTagIdsrecord component
-
tagSwitchStdDevMultiplier
public double tagSwitchStdDevMultiplier()Returns the value of thetagSwitchStdDevMultiplierrecord component.- Returns:
- the value of the
tagSwitchStdDevMultiplierrecord component
-
initialPoseAcceptanceCount
public int initialPoseAcceptanceCount()Returns the value of theinitialPoseAcceptanceCountrecord component.- Returns:
- the value of the
initialPoseAcceptanceCountrecord component
-