mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-27 02:01:40 +00:00
[photonlib-py] Begin implementing PhotonPoseEstimator in Python (#1178)
* [photonlib-py] Initial impl of PhotonPoseEstimator --------- Co-authored-by: Matt <matthew.morley.ca@gmail.com>
This commit is contained in:
26
photon-lib/py/photonlibpy/estimatedRobotPose.py
Normal file
26
photon-lib/py/photonlibpy/estimatedRobotPose.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from wpimath.geometry import Pose3d
|
||||
|
||||
from .photonTrackedTarget import PhotonTrackedTarget
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .photonPoseEstimator import PoseStrategy
|
||||
|
||||
|
||||
@dataclass
|
||||
class EstimatedRobotPose:
|
||||
"""An estimated pose based on pipeline result"""
|
||||
|
||||
estimatedPose: Pose3d
|
||||
"""The estimated pose"""
|
||||
|
||||
timestampSeconds: float
|
||||
"""The estimated time the frame used to derive the robot pose was taken"""
|
||||
|
||||
targetsUsed: [PhotonTrackedTarget]
|
||||
"""A list of the targets used to compute this pose"""
|
||||
|
||||
strategy: "PoseStrategy"
|
||||
"""The strategy actually used to produce this pose"""
|
||||
Reference in New Issue
Block a user