From d4f853bd198fc20262bcf11f3a1b6a62fbdcebcf Mon Sep 17 00:00:00 2001 From: James Ward Date: Wed, 13 Nov 2024 21:33:58 +1100 Subject: [PATCH] Rename variable to avoid mypy confusion --- .../py/photonlibpy/simulation/visionSystemSim.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/photon-lib/py/photonlibpy/simulation/visionSystemSim.py b/photon-lib/py/photonlibpy/simulation/visionSystemSim.py index 0c5903d621..70ffd6609b 100644 --- a/photon-lib/py/photonlibpy/simulation/visionSystemSim.py +++ b/photon-lib/py/photonlibpy/simulation/visionSystemSim.py @@ -20,9 +20,9 @@ def __init__(self, visionSystemName: str): self.bufferLength: seconds = 1.5 self.camSimMap: typing.Dict[str, PhotonCameraSim] = {} - self.camTrfMap: typing.Dict[PhotonCameraSim, TimeInterpolatablePose3dBuffer] = ( - {} - ) + self.camTrfMap: typing.Dict[ + PhotonCameraSim, TimeInterpolatablePose3dBuffer + ] = {} self.robotPoseBuffer: TimeInterpolatablePose3dBuffer = ( TimeInterpolatablePose3dBuffer(self.bufferLength) ) @@ -228,8 +228,8 @@ def update(self, robotPose: Pose2d | Pose3d) -> None: camResult = camSim.process(latency, lateCameraPose, allTargets) camSim.submitProcessedFrame(camResult, timestampNt) - for target in camResult.getTargets(): - trf = target.getBestCameraToTarget() + for tgt in camResult.getTargets(): + trf = tgt.getBestCameraToTarget() if trf == Transform3d(): continue