Browse Source

adding check for empty image

pull/49/head
Hello Robot Inc 3 years ago
committed by Binit Shah
parent
commit
876c0d4994
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      stretch_funmap/src/stretch_funmap/navigation_planning.py

+ 3
- 1
stretch_funmap/src/stretch_funmap/navigation_planning.py View File

@ -580,7 +580,9 @@ def draw_robot_footprint_rectangle(x_pix, y_pix, ang_rad, m_per_pix, image, verb
poly_points = np.array(corners)
poly_points = np.round(poly_points).astype(np.int32)
cv2.fillConvexPoly(image, poly_points, value)
if image is not None:
cv2.fillConvexPoly(image, poly_points, value)
def halve_image(image):
h, w = image.shape

Loading…
Cancel
Save