Feature/exit state#241
Conversation
ewad3
left a comment
There was a problem hiding this comment.
Everything looks good. We just will need to keep an eye on the landing.
| abs(x) <= reference_x * config.POINT_PERCENT_ACCURACY | ||
| and abs(y) <= reference_y * config.POINT_PERCENT_ACCURACY | ||
| ): | ||
| if abs(x) <= reference_x * 0.15 and abs(y) <= reference_y * 0.15: |
There was a problem hiding this comment.
I understand what you are doing here, but on the physical drone having to high of point accuracy causes the drone to "miss" its target and fly back and forth like it did at the flight test while trying to land.
pieperm
left a comment
There was a problem hiding this comment.
I'm a bit hesitant to make changes to run.py before a flight test since it is so crucial. I think it might be a good idea to keep this on its own branch up through the flight test (similarly to how the unit test refactor will be kept on its own branch). We can run a test with this by switching to the branch during the flight test, and then if everything runs smoothly, we can merge it afterwards. What do you think about this approach?
| flight_process: Process = init_flight(flight_args) | ||
| flight_process.start() | ||
| except KeyboardInterrupt: | ||
| except KeyboardInterrupt or AttributeError: |
There was a problem hiding this comment.
I'm not sure if this is the right syntax for catching multiple errors. See https://stackoverflow.com/questions/6470428/catch-multiple-exceptions-in-one-line-except-block
Let me know if I'm wrong about this.
| comm_obj.set_state("land") | ||
| flight_process: Process = init_flight(flight_args) | ||
| flight_process.start() | ||
| except TimeoutError or flight.DroneNotFoundError: |
|
I can wait to merge the pull request, the points Michael made are valid. I'm not too concerned with merging the request, I'd just like to make sure everything looks decent |
pieperm
left a comment
There was a problem hiding this comment.
Looks ready to test at the flight test! If all goes well, we can merge it after
…to feature/exit_state � Conflicts: � run.py
Addition of try-except block to handle Ctrl-C exit of flight and any errors that occur. Also added logging statements to keep track of errors.