Record Class VisionConfig

java.lang.Object
java.lang.Record
com.marslib.vision.VisionConfig

public record VisionConfig(Supplier<Double> maxZHeight, double fieldLengthMeters, double fieldWidthMeters, Supplier<Double> fieldMarginMeters, Supplier<Double> maxTiltDeg, Supplier<Double> maxAngularAccelDegPerSec2, Supplier<Double> maxAmbiguity, Supplier<Double> tagStdBase, Supplier<Double> multiTagStdMultiplier, Supplier<Double> angularStdMultiplier, Supplier<Double> linearVelocityStdMultiplier, Supplier<Double> angularVelocityStdMultiplier, Supplier<Double> slamStdDev, Supplier<Double> slamAngularStdDev, double loopPeriodSecs) extends Record
Configuration record for the MARSVision subsystem.

This object encapsulates all filtering, rejection, and estimation parameters, allowing the vision logic to remain generic across different robots and field layouts.

  • Constructor Details

    • VisionConfig

      public VisionConfig(Supplier<Double> maxZHeight, double fieldLengthMeters, double fieldWidthMeters, Supplier<Double> fieldMarginMeters, Supplier<Double> maxTiltDeg, Supplier<Double> maxAngularAccelDegPerSec2, Supplier<Double> maxAmbiguity, Supplier<Double> tagStdBase, Supplier<Double> multiTagStdMultiplier, Supplier<Double> angularStdMultiplier, Supplier<Double> linearVelocityStdMultiplier, Supplier<Double> angularVelocityStdMultiplier, Supplier<Double> slamStdDev, Supplier<Double> slamAngularStdDev, double loopPeriodSecs)
      Creates an instance of a VisionConfig record class.
      Parameters:
      maxZHeight - the value for the maxZHeight record component
      fieldLengthMeters - the value for the fieldLengthMeters record component
      fieldWidthMeters - the value for the fieldWidthMeters record component
      fieldMarginMeters - the value for the fieldMarginMeters record component
      maxTiltDeg - the value for the maxTiltDeg record component
      maxAngularAccelDegPerSec2 - the value for the maxAngularAccelDegPerSec2 record component
      maxAmbiguity - the value for the maxAmbiguity record component
      tagStdBase - the value for the tagStdBase record component
      multiTagStdMultiplier - the value for the multiTagStdMultiplier record component
      angularStdMultiplier - the value for the angularStdMultiplier record component
      linearVelocityStdMultiplier - the value for the linearVelocityStdMultiplier record component
      angularVelocityStdMultiplier - the value for the angularVelocityStdMultiplier record component
      slamStdDev - the value for the slamStdDev record component
      slamAngularStdDev - the value for the slamAngularStdDev record component
      loopPeriodSecs - the value for the loopPeriodSecs record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maxZHeight

      public Supplier<Double> maxZHeight()
      Returns the value of the maxZHeight record component.
      Returns:
      the value of the maxZHeight record component
    • fieldLengthMeters

      public double fieldLengthMeters()
      Returns the value of the fieldLengthMeters record component.
      Returns:
      the value of the fieldLengthMeters record component
    • fieldWidthMeters

      public double fieldWidthMeters()
      Returns the value of the fieldWidthMeters record component.
      Returns:
      the value of the fieldWidthMeters record component
    • fieldMarginMeters

      public Supplier<Double> fieldMarginMeters()
      Returns the value of the fieldMarginMeters record component.
      Returns:
      the value of the fieldMarginMeters record component
    • maxTiltDeg

      public Supplier<Double> maxTiltDeg()
      Returns the value of the maxTiltDeg record component.
      Returns:
      the value of the maxTiltDeg record component
    • maxAngularAccelDegPerSec2

      public Supplier<Double> maxAngularAccelDegPerSec2()
      Returns the value of the maxAngularAccelDegPerSec2 record component.
      Returns:
      the value of the maxAngularAccelDegPerSec2 record component
    • maxAmbiguity

      public Supplier<Double> maxAmbiguity()
      Returns the value of the maxAmbiguity record component.
      Returns:
      the value of the maxAmbiguity record component
    • tagStdBase

      public Supplier<Double> tagStdBase()
      Returns the value of the tagStdBase record component.
      Returns:
      the value of the tagStdBase record component
    • multiTagStdMultiplier

      public Supplier<Double> multiTagStdMultiplier()
      Returns the value of the multiTagStdMultiplier record component.
      Returns:
      the value of the multiTagStdMultiplier record component
    • angularStdMultiplier

      public Supplier<Double> angularStdMultiplier()
      Returns the value of the angularStdMultiplier record component.
      Returns:
      the value of the angularStdMultiplier record component
    • linearVelocityStdMultiplier

      public Supplier<Double> linearVelocityStdMultiplier()
      Returns the value of the linearVelocityStdMultiplier record component.
      Returns:
      the value of the linearVelocityStdMultiplier record component
    • angularVelocityStdMultiplier

      public Supplier<Double> angularVelocityStdMultiplier()
      Returns the value of the angularVelocityStdMultiplier record component.
      Returns:
      the value of the angularVelocityStdMultiplier record component
    • slamStdDev

      public Supplier<Double> slamStdDev()
      Returns the value of the slamStdDev record component.
      Returns:
      the value of the slamStdDev record component
    • slamAngularStdDev

      public Supplier<Double> slamAngularStdDev()
      Returns the value of the slamAngularStdDev record component.
      Returns:
      the value of the slamAngularStdDev record component
    • loopPeriodSecs

      public double loopPeriodSecs()
      Returns the value of the loopPeriodSecs record component.
      Returns:
      the value of the loopPeriodSecs record component