PhotonTrackedTarget

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

Bases: pybind11_builtins.pybind11_object

Represents a tracked target within a pipeline.

Overloaded function.

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

Constructs an empty target.

  1. __init__(self: photonvision._photonvision.PhotonTrackedTarget, yaw: float, pitch: float, area: float, skew: float, pose: wpimath.geometry._geometry.Transform2d, corners: List[Tuple[float, float]]) -> None

Constructs a target.

Parameters
  • yaw – The yaw of the target.

  • pitch – The pitch of the target.

  • area – The area of the target.

  • skew – The skew of the target.

  • pose – The camera-relative pose of the target. @Param corners The corners of the bounding rectangle.

getArea() float

Returns the target area (0-100).

Returns

The target area.

getCameraRelativePose() wpimath.geometry._geometry.Transform2d

Returns the pose of the target relative to the robot.

Returns

The pose of the target relative to the robot.

getCorners() List[Tuple[float, float]]

Returns the corners of the minimum area rectangle bounding this target.

getPitch() float

Returns the target pitch (positive-up)

Returns

The target pitch.

getSkew() float

Returns the target skew (counter-clockwise positive).

Returns

The target skew.

getYaw() float

Returns the target yaw (positive-left).

Returns

The target yaw.