Class FrustumVisualizer

java.lang.Object
com.marslib.vision.FrustumVisualizer

public class FrustumVisualizer extends Object
Frustum Visualizer for AdvantageScope 3D telemetry.

Intercepts the physical limits (FOV) of simulated cameras (e.g., Limelight) and structurally casts their bounding boxes into a WPILib Pose3d array. This array is natively logged using AdvantageKit and renders semi-transparent lines in the simulator showing mathematically exactly where the camera can see.

  • Constructor Summary

    Constructors
    Constructor
    Description
    FrustumVisualizer(double horizontalFovDeg, double verticalFovDeg, double rangeMeters)
    Generate an array of 5 3D poses representing a visual cone/frustum.
  • Method Summary

    Modifier and Type
    Method
    Description
    edu.wpi.first.math.geometry.Pose3d[]
    update(edu.wpi.first.math.geometry.Pose3d cameraPose)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FrustumVisualizer

      public FrustumVisualizer(double horizontalFovDeg, double verticalFovDeg, double rangeMeters)
      Generate an array of 5 3D poses representing a visual cone/frustum.
      Parameters:
      horizontalFovDeg - The horizontal FOV in degrees (e.g. Limelight 3 = 63.3)
      verticalFovDeg - The vertical FOV in degrees (e.g. Limelight 3 = 49.7)
      rangeMeters - How far out to draw the bounding rays in meters.
  • Method Details

    • update

      public edu.wpi.first.math.geometry.Pose3d[] update(edu.wpi.first.math.geometry.Pose3d cameraPose)