Browse Source

Merge pull request #44 from hello-robot/bugfix/funmap_nav_undefined_mask

adding check for empty image
pull/46/head
Binit Shah 3 years ago
committed by GitHub
parent
commit
50def3a9ca
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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.array(corners)
poly_points = np.round(poly_points).astype(np.int32) 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): def halve_image(image):
h, w = image.shape h, w = image.shape

Loading…
Cancel
Save