mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-25 01:41:40 +00:00
[photonlibpy] add mypy to ci (#1570)
Co-authored-by: James Ward <james@thedropbears.org.au>
This commit is contained in:
@@ -128,7 +128,6 @@ class OpenCVHelp:
|
||||
alt: Transform3d | None = None
|
||||
reprojectionError: cv.typing.MatLike | None = None
|
||||
best: Transform3d = Transform3d()
|
||||
alt: Transform3d | None = None
|
||||
|
||||
for tries in range(2):
|
||||
retval, rvecs, tvecs, reprojectionError = cv.solvePnPGeneric(
|
||||
|
||||
@@ -18,6 +18,8 @@ class TargetModel:
|
||||
verts: List[Translation3d] | None = None
|
||||
):
|
||||
|
||||
self.vertices: List[Translation3d] = []
|
||||
|
||||
if (
|
||||
width is not None
|
||||
and height is not None
|
||||
@@ -88,7 +90,7 @@ class TargetModel:
|
||||
|
||||
self.isSpherical = False
|
||||
if len(verts) <= 2:
|
||||
self.vertices: List[Translation3d] = []
|
||||
self.vertices = []
|
||||
self.isPlanar = False
|
||||
else:
|
||||
cornersPlaner = True
|
||||
|
||||
@@ -16,10 +16,10 @@ class VisionEstimation:
|
||||
id = tag.getFiducialId()
|
||||
maybePose = layout.getTagPose(id)
|
||||
if maybePose:
|
||||
tag = AprilTag()
|
||||
tag.ID = id
|
||||
tag.pose = maybePose
|
||||
retVal.append(tag)
|
||||
aprilTag = AprilTag()
|
||||
aprilTag.ID = id
|
||||
aprilTag.pose = maybePose
|
||||
retVal.append(aprilTag)
|
||||
return retVal
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user