Package limelight.sim
Class LimelightSimSettings
java.lang.Object
limelight.sim.LimelightSimSettings
Configurable properties describing a simulated
Limelight camera, used by LimelightSim.
The defaults approximate a Limelight 3 running the AprilTag pipeline at 1280x960 and require no configuration to
get a usable simulation running. Construct one with new LimelightSimSettings() and tweak only the fields
that matter for your camera with the withXXX methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LimelightSimSettingsperfect()CreateLimelightSimSettingswith all noise and latency zeroed out, useful for deterministic testing.withAngleNoise(double stdDevDegrees) Set the noise applied to tx/ty/txnc/tync readings.withCaptureLatency(double avgMs) Set the simulated capture latency ("cl").withFOV(double horizontalDegrees, double verticalDegrees) Set the simulated camera's field of view.withMaxDetectionRange(double rangeMeters) Set the maximum distance a tag may be detected from.withMaxTagIncidenceAngle(double degrees) Set the maximum angle of incidence a tag may be viewed at before it is considered too edge-on to detect.withPipelineLatency(double avgMs, double stdDevMs) Set the simulated pipeline processing latency ("tl").withPipelineType(String type) Set the pipeline type string reported by "getpipetype".withPoseNoise(double translationStdDevMeters, double rotationStdDevDegrees) Set the noise applied to botpose translation and rotation readings, for a single tag seen at 1 meter.withRandomSeed(long seed) Set the seed used for the deterministic noise source.withResolution(double widthPixels, double heightPixels) Set the simulated sensor resolution.withTagSize(double sizeMeters) Set the physical size of the AprilTags being detected.
-
Constructor Details
-
LimelightSimSettings
public LimelightSimSettings()ConstructLimelightSimSettingswith defaults approximating a Limelight 3.
-
-
Method Details
-
withResolution
Set the simulated sensor resolution.- Parameters:
widthPixels- Horizontal resolution in pixels.heightPixels- Vertical resolution in pixels.- Returns:
LimelightSimSettingsfor chaining.
-
withFOV
Set the simulated camera's field of view.- Parameters:
horizontalDegrees- Horizontal field of view in degrees.verticalDegrees- Vertical field of view in degrees.- Returns:
LimelightSimSettingsfor chaining.
-
withTagSize
Set the physical size of the AprilTags being detected.- Parameters:
sizeMeters- Edge-to-edge size of the tag's black square, in meters.- Returns:
LimelightSimSettingsfor chaining.
-
withMaxDetectionRange
Set the maximum distance a tag may be detected from.- Parameters:
rangeMeters- Maximum detection range, in meters.- Returns:
LimelightSimSettingsfor chaining.
-
withMaxTagIncidenceAngle
Set the maximum angle of incidence a tag may be viewed at before it is considered too edge-on to detect.- Parameters:
degrees- Maximum incidence angle, in degrees.- Returns:
LimelightSimSettingsfor chaining.
-
withPipelineLatency
Set the simulated pipeline processing latency ("tl").- Parameters:
avgMs- Average latency, in milliseconds.stdDevMs- Standard deviation of the latency, in milliseconds.- Returns:
LimelightSimSettingsfor chaining.
-
withCaptureLatency
Set the simulated capture latency ("cl").- Parameters:
avgMs- Average capture latency, in milliseconds.- Returns:
LimelightSimSettingsfor chaining.
-
withAngleNoise
Set the noise applied to tx/ty/txnc/tync readings.- Parameters:
stdDevDegrees- Standard deviation of the angular noise, in degrees.- Returns:
LimelightSimSettingsfor chaining.
-
withPoseNoise
public LimelightSimSettings withPoseNoise(double translationStdDevMeters, double rotationStdDevDegrees) Set the noise applied to botpose translation and rotation readings, for a single tag seen at 1 meter.- Parameters:
translationStdDevMeters- Standard deviation of the translation noise, in meters.rotationStdDevDegrees- Standard deviation of the rotation noise, in degrees.- Returns:
LimelightSimSettingsfor chaining.
-
withRandomSeed
Set the seed used for the deterministic noise source.- Parameters:
seed- Random seed.- Returns:
LimelightSimSettingsfor chaining.
-
withPipelineType
Set the pipeline type string reported by "getpipetype".- Parameters:
type- Pipeline type, e.g. "pipe_fiducial".- Returns:
LimelightSimSettingsfor chaining.
-
perfect
CreateLimelightSimSettingswith all noise and latency zeroed out, useful for deterministic testing.- Returns:
LimelightSimSettingswith no noise or latency.
-