Pārlūkot izejas kodu

update spray_pesticide.py

haminhtien99 5 mēneši atpakaļ
vecāks
revīzija
38c06be45f
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      distance_estimation/spray_pesticide.py

+ 2 - 2
distance_estimation/spray_pesticide.py

@@ -87,7 +87,7 @@ while True:
 
             # Kiểm tra đủ điều kiện
             in_center = is_in_center(cx, cy, new_width, new_height)
-            within_angle = is_roll_valid(roll) and abs(pitch) < ALLOWED_ANGLE_DEG and abs(yaw) < ALLOWED_ANGLE_DEG
+            within_angle = is_roll_valid(roll)
             within_xyz = (
                 ALLOWED_XYZ_RANGE["x"][0] <= x <= ALLOWED_XYZ_RANGE["x"][1] and
                 ALLOWED_XYZ_RANGE["y"][0] <= y <= ALLOWED_XYZ_RANGE["y"][1] and
@@ -115,7 +115,7 @@ while True:
             # --- Visualization ---
             status = marker_states[marker_id]["state"]
             color = {"NOT_SPRAYED": (0, 0, 255), "SPRAYING": (0, 255, 255), "SPRAYED": (0, 255, 0)}[status]
-            
+
             if visualization:
                 cv2.polylines(frame, [corners], True, color, 2)
                 cv2.drawFrameAxes(frame, cam_mat, dist_coef, rVec[i], tVec[i], 4, 4)