Enum Class CameraModel
- All Implemented Interfaces:
Serializable, Comparable<CameraModel>, Constable
VisionCameraConfig.withCameraModel(CameraModel).
Each model simulates its vendor's horizontal and vertical field of view. Smart cameras
(Limelight, Luma) run at the AprilTag frame rate their vendor publishes. USB cameras run at their
full-resolution capture rate; the coprocessor may track AprilTags slower, so lower it with VisionCameraConfig.withCameraProperties(SimCameraProperties) if yours does. Vendors don't publish fixed latencies,
so every model uses an estimate; Limelights report their real latency at runtime.
Sources: the Limelight quick-start pages and hardware comparison at https://docs.limelightvision.io/docs/docs-limelight/getting-started/, the Luma P1 docs at https://docs.luma.vision/p1/ and Luma P2 page at https://luma.vision/products/luma-p2, The Thrifty Bot's docs at https://docs.thethriftybot.com/thriftycam and https://docs.thethriftybot.com/thriftiest-cam, Arducam's B0332 quick start guide, AndyMark's am-5170 page and ELP's ELP-USB8MP02G-L180 listing.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionArducam OV9281 USB camera (B0332), the common PhotonVision camera: 1280x800 at 100 fps, 70° horizontal field of view.AndyMark ELP Fisheye Lens Camera (am-5170, ELP-USB8MP02G-L180): Sony IMX179 color rolling shutter with a 180° fisheye lens, simulated at 1280x960 and 20 fps (ELP's rate for that mode; 3264x2448 runs at 15 fps).Limelight 2: OV5647, 62.5° by 48.9°, AprilTags at about 6 fps at 1280x960.Limelight 2+: OV5647, 62.5° by 48.9°, AprilTags at about 7 fps at 1280x960.Limelight 3: OV5647, 62.5° by 48.9°, AprilTags at about 20 fps at 1280x960.Limelight 3A (USB): OV5647, 54.5° by 42°, AprilTags at about 20 fps at 1280x960.Limelight 3G: OV9281 global shutter, 82° by 56.2°, AprilTags at about 20 fps at full resolution.Limelight 4: OV9281 global shutter, 82° by 56.2°, AprilTags at about 40 fps at 1280x800.Luma P1: OV9281 global shutter running PhotonVision, 80° by 56°, AprilTags at about 60 fps at 1280x800 (decimate 2).Luma P2: the same camera and performance as the Luma P1.Thriftiest Cam: OV9281 global shutter, 1280x800 at 120 fps, 82° by 56°.ThriftyCam with its stock 80° lens: OmniVision OG02B1B global shutter, 1600x1304 at 70 fps (firmware 5.10 or newer). -
Method Summary
Modifier and TypeMethodDescriptiondoubleAverage latency simulated.doublegetFps()Frames per second simulated.intImage height simulated.doubleHorizontal field of view.org.photonvision.simulation.SimCameraPropertiesPhotonVision camera properties for this model: a distortion-free lens with the published horizontal and vertical field of view, small pixel noise, and the estimated latency.doubleVertical field of view.intImage width simulated.static CameraModelReturns the enum constant of this class with the specified name.static CameraModel[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LIMELIGHT_2
Limelight 2: OV5647, 62.5° by 48.9°, AprilTags at about 6 fps at 1280x960. -
LIMELIGHT_2_PLUS
Limelight 2+: OV5647, 62.5° by 48.9°, AprilTags at about 7 fps at 1280x960. -
LIMELIGHT_3
Limelight 3: OV5647, 62.5° by 48.9°, AprilTags at about 20 fps at 1280x960. -
LIMELIGHT_3A
Limelight 3A (USB): OV5647, 54.5° by 42°, AprilTags at about 20 fps at 1280x960. -
LIMELIGHT_3G
Limelight 3G: OV9281 global shutter, 82° by 56.2°, AprilTags at about 20 fps at full resolution. Limelight lists the AprilTag rate at 1280x960, which the 1280x800 sensor can't produce, so this simulates 1280x800. -
LIMELIGHT_4
Limelight 4: OV9281 global shutter, 82° by 56.2°, AprilTags at about 40 fps at 1280x800. -
LUMA_P1
Luma P1: OV9281 global shutter running PhotonVision, 80° by 56°, AprilTags at about 60 fps at 1280x800 (decimate 2). -
LUMA_P2
Luma P2: the same camera and performance as the Luma P1. -
THRIFTYCAM
ThriftyCam with its stock 80° lens: OmniVision OG02B1B global shutter, 1600x1304 at 70 fps (firmware 5.10 or newer). The lens is specified as 71° by 48° on a different image size; on this sensor its 4.1 mm focal length and 3 µm pixels give 60.7° by 51°, which this simulates. -
THRIFTIEST_CAM
Thriftiest Cam: OV9281 global shutter, 1280x800 at 120 fps, 82° by 56°. -
ARDUCAM_OV9281
Arducam OV9281 USB camera (B0332), the common PhotonVision camera: 1280x800 at 100 fps, 70° horizontal field of view. Arducam's manual says 120 fps and resellers say 100, so this uses 100. Arducam doesn't give the vertical field of view, so it comes from the 16:10 sensor: 47.3°. -
ELP_FISHEYE
AndyMark ELP Fisheye Lens Camera (am-5170, ELP-USB8MP02G-L180): Sony IMX179 color rolling shutter with a 180° fisheye lens, simulated at 1280x960 and 20 fps (ELP's rate for that mode; 3264x2448 runs at 15 fps).PhotonVision simulates a pinhole lens, which can't see 180°. This model keeps the real lens's magnification at the center of the image instead: a fisheye with 180° across 1280 pixels has a focal length of about 407 pixels, and a pinhole lens with that focal length sees 115° by 99.4°. Tags near the center look the size they would on the real camera; tags at the edges of the real camera's view aren't simulated. Calibrate the real camera before trusting its poses.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getWidthPixels
public int getWidthPixels()Image width simulated.- Returns:
- Width in pixels.
-
getHeightPixels
public int getHeightPixels()Image height simulated.- Returns:
- Height in pixels.
-
getHorizontalFovDegrees
public double getHorizontalFovDegrees()Horizontal field of view.- Returns:
- Degrees.
-
getVerticalFovDegrees
public double getVerticalFovDegrees()Vertical field of view.- Returns:
- Degrees.
-
getFps
public double getFps()Frames per second simulated.- Returns:
- Frame rate.
-
getAverageLatencyMillis
public double getAverageLatencyMillis()Average latency simulated. An estimate: vendors don't publish one.- Returns:
- Latency in milliseconds.
-
getSimCameraProperties
public org.photonvision.simulation.SimCameraProperties getSimCameraProperties()PhotonVision camera properties for this model: a distortion-free lens with the published horizontal and vertical field of view, small pixel noise, and the estimated latency.- Returns:
- New camera properties.
-