Skip to content

Commit

Permalink
removed assertions and changed main loop exit condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ashum68 committed Jun 12, 2024
1 parent 7055c3b commit 3a78f8d
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,20 @@ def main() -> int:
flight_interface_data: drone_odometry_local.DroneOdometryLocal = (
flight_interface_to_main_queue.queue.get_nowait()
)
assert (
str(type(flight_interface_data))
== "<class 'modules.drone_odometry_local.DroneOdometryLocal'>"
)
assert flight_interface_data.local_position is not None
assert flight_interface_data.drone_orientation is not None

if flight_interface_data is not None:
print(flight_interface_data)

detection_data: lidar_detection.LidarDetection = (
detection_to_main_queue.queue.get_nowait()
)
assert str(type(detection_data)) == "<class 'modules.lidar_detection.LidarDetection'>"
assert detection_data is not None
except queue.Empty:
break

controller.request_exit()
if detection_data is not None:
print(detection_data)

except KeyboardInterrupt:
controller.request_exit()
break

flight_interface_to_main_queue.fill_and_drain_queue()
detection_to_main_queue.fill_and_drain_queue()
Expand Down

0 comments on commit 3a78f8d

Please sign in to comment.