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 the name given in the LL dashboard.doublegetPitch()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 the name given in the LL dashboard.withRotation(double roll, double pitch, double yaw) Sets the rotation of the limelight in degreeswithTranslation(double forward, double right, double up) Sets the camera position relative to the robot center, 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 camera position relative to the robot center, 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 the limelight. Positive is rotated right.pitch- (degrees) pitch of the limelight. Positive is tilted up.yaw- (degrees) yaw of the limelight. Positive is rotated left.- Returns:
- the LimelightConfig object
-
getName
Must match the name given in the LL dashboard. -
setName
Must match the name given in the 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()
-