-
Notifications
You must be signed in to change notification settings - Fork 8
hitl emulator integration test #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| print("GPS: No data") | ||
|
|
||
| # Test camera feed every 3 seconds | ||
| if int(current_time) % 3 == 0 and current_time > 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The camera test should be assuming no access to the emulators, try creating a video stream using cv2 and checking if it's receiving video.
honzikschenk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes; looks good so far!
modules/mavlink/flight_controller.py
Outdated
| try: | ||
| loc = self.drone.location | ||
| except Exception: # pylint: disable=broad-except | ||
| print("HITL get_location error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generalize this error message (ie. say something like "Error with requesting location" or "get_location could not complete request"). flight_controller is used on our general airside system
modules/mavlink/flight_controller.py
Outdated
| def get_location(self) -> "tuple[bool, tuple[float, float, float] | None]": | ||
| """Return (lat, lon, alt) if available via the drone, otherwise (False, None).""" | ||
| try: | ||
| loc = self.drone.location |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on how your test goes, you might have to replace this with receiving the "GLOBAL_POSITION_INT" mavlink message
Honzik may have been right, hopefully get to test this before finals
added a method in flight controller for gps data
reads camera emulator's current frame to check if camera feed is active