Class Limelight.LimelightConfig

java.lang.Object
frc.spectrumLib.vision.Limelight.LimelightConfig
Enclosing class:
Limelight

public static class Limelight.LimelightConfig extends Object
Configuration for a single Limelight camera, including its network-table name and physical mounting position on the robot.

The Lombok @Accessors(chain = true) annotation allows fluent setter calls: config.setName("limelight").setAttached(true).

  • Constructor Details

    • LimelightConfig

      public LimelightConfig(String name)
      Creates a configuration for the named Limelight camera.
      Parameters:
      name - the network-table name assigned to the camera in the LL dashboard
  • Method Details

    • withTranslation

      public Limelight.LimelightConfig withTranslation(double forward, double right, double up)
      Sets the position of the robot in meters
      Parameters:
      forward - (meters) forward from center of robot
      right - (meters) right from center of robot
      up - (meters) up from center of robot
      Returns:
      the LimelightConfig object
    • withRotation

      public Limelight.LimelightConfig withRotation(double roll, double pitch, double yaw)
      Sets the rotation of the limelight in degrees
      Parameters:
      roll - (degrees) roll of limelight || positive is rotated right
      pitch - (degrees) pitch of limelight || positive is camera tilted up
      yaw - (yaw) yaw of limelight || positive is rotated left
      Returns:
      the LimelightConfig object
    • getName

      public String getName()
      Must match to the name given in LL dashboard
    • setName

      public Limelight.LimelightConfig setName(String name)
      Must match to the name given in LL dashboard
      Returns:
      this.
    • isAttached

      public boolean isAttached()
      Whether this camera is physically connected to the robot.
    • setAttached

      public Limelight.LimelightConfig setAttached(boolean attached)
      Whether this camera is physically connected to the robot.
      Returns:
      this.
    • isIntegrating

      public boolean isIntegrating()
      Whether pose measurements from this camera are currently being fused into the estimator.
    • setIntegrating

      public Limelight.LimelightConfig setIntegrating(boolean isIntegrating)
      Whether pose measurements from this camera are currently being fused into the estimator.
      Returns:
      this.
    • getForward

      public double getForward()
      Forward offset of the camera from the robot center in meters (positive = toward front).
    • getRight

      public double getRight()
    • getUp

      public double getUp()
    • getRoll

      public double getRoll()
      Orientation of the camera in degrees (roll/pitch/yaw relative to robot frame).
    • getPitch

      public double getPitch()
    • getYaw

      public double getYaw()