PhotonPipelineResult

class photonvision.PhotonPipelineResult(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

Represents a pipeline result from a PhotonCamera.

Overloaded function.

  1. __init__(self: photonvision._photonvision.PhotonPipelineResult) -> None

Constructs an empty pipeline result.

  1. __init__(self: photonvision._photonvision.PhotonPipelineResult, latency: seconds, targets: List[photonvision._photonvision.PhotonTrackedTarget]) -> None

Constructs a pipeline result.

Parameters
  • latency – The latency in the pipeline.

  • targets – The list of targets identified by the pipeline.

getBestTarget() photonvision._photonvision.PhotonTrackedTarget

Returns the best target in this pipeline result. If there are no targets, this method will return an empty target with all values set to zero. The best target is determined by the target sort mode in the PhotonVision UI.

Returns

The best target of the pipeline result.

getLatency() seconds

Returns the latency in the pipeline.

Returns

The latency in the pipeline.

getTargets() List[photonvision._photonvision.PhotonTrackedTarget]

Returns a reference to the vector of targets.

Returns

A reference to the vector of targets.

hasTargets() bool

Returns whether the pipeline has targets.

Returns

Whether the pipeline has targets.