Package frc.spectrumLib.vision
Class Limelight.LimelightConfig
java.lang.Object
frc.spectrumLib.vision.Limelight.LimelightConfig
- Enclosing class:
- Limelight
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 Summary
ConstructorsConstructorDescriptionLimelightConfig(String name) Creates a configuration for the named Limelight camera. -
Method Summary
Modifier and TypeMethodDescriptiondoubleForward offset of the camera from the robot center in meters (positive = toward front).getName()Must match to the name given in LL dashboarddoublegetPitch()doublegetRight()doublegetRoll()Orientation of the camera in degrees (roll/pitch/yaw relative to robot frame).doublegetUp()doublegetYaw()booleanWhether this camera is physically connected to the robot.booleanWhether pose measurements from this camera are currently being fused into the estimator.setAttached(boolean attached) Whether this camera is physically connected to the robot.setIntegrating(boolean isIntegrating) Whether pose measurements from this camera are currently being fused into the estimator.Must match to the name given in LL dashboardwithRotation(double roll, double pitch, double yaw) Sets the rotation of the limelight in degreeswithTranslation(double forward, double right, double up) Sets the position of the robot in meters
-
Constructor Details
-
LimelightConfig
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
Sets the position of the robot in meters- Parameters:
forward- (meters) forward from center of robotright- (meters) right from center of robotup- (meters) up from center of robot- Returns:
- the LimelightConfig object
-
withRotation
Sets the rotation of the limelight in degrees- Parameters:
roll- (degrees) roll of limelight || positive is rotated rightpitch- (degrees) pitch of limelight || positive is camera tilted upyaw- (yaw) yaw of limelight || positive is rotated left- Returns:
- the LimelightConfig object
-
getName
Must match to the name given in LL dashboard -
setName
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
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
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()
-