ui: move INF_POINT to constant (#36470)

move INF_POINT to constant
pull/36477/head
Dean Lee 2 weeks ago committed by GitHub
parent fa373af9b5
commit 2beb0ffad1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      selfdrive/ui/onroad/augmented_road_view.py

@ -27,6 +27,7 @@ BORDER_COLORS = {
WIDE_CAM_MAX_SPEED = 10.0 # m/s (22 mph)
ROAD_CAM_MIN_SPEED = 15.0 # m/s (34 mph)
INF_POINT = np.array([1000.0, 0.0, 0.0])
class AugmentedRoadView(CameraView):
@ -176,9 +177,8 @@ class AugmentedRoadView(CameraView):
zoom = 2.0 if is_wide_camera else 1.1
# Calculate transforms for vanishing point
inf_point = np.array([1000.0, 0.0, 0.0])
calib_transform = intrinsic @ calibration
kep = calib_transform @ inf_point
kep = calib_transform @ INF_POINT
# Calculate center points and dimensions
x, y = self._content_rect.x, self._content_rect.y

Loading…
Cancel
Save