We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c87e784 commit 11bd4b0Copy full SHA for 11bd4b0
components/vision.py
@@ -137,7 +137,7 @@ def relative_bearing_to_best_cluster(self) -> Rotation2d:
137
relative_bearings = [tag.relative_bearing for tag in tags]
138
relative_bearings.sort(key=Rotation2d.radians)
139
for offset in range(len(relative_bearings) - 1, 0, -1):
140
- bearing_pairs = zip(relative_bearings, relative_bearings[offset:-1])
+ bearing_pairs = zip(relative_bearings, relative_bearings[offset:])
141
for pair in bearing_pairs:
142
if abs((pair[0] - pair[1]).radians()) < self.CAMERA_FOV:
143
return (pair[1] - pair[0]) * 0.5 + pair[0]
0 commit comments