-
Notifications
You must be signed in to change notification settings - Fork 194
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
Bootcamp - Davis Liu #109
base: main
Are you sure you want to change the base?
Bootcamp - Davis Liu #109
Conversation
if report.status == drone_status.DroneStatus.HALTED: # if command done | ||
if self.command_index < len(self.commands): # next command | ||
print(f"frame({self.counter}) cmd({self.command_index}) pos({report.position})") | ||
command = self.commands[self.command_index] | ||
self.command_index += 1 | ||
elif not self.has_sent_landing_command: # start landing | ||
command = commands.Command.create_land_command() | ||
self.has_sent_landing_command = True | ||
|
||
self.counter += 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.
note that we have a acceptance_radius attribute
due to drone position being analog, this is often required when checking if we have reached a location. it is important to double check after the drone has halted that the drone is indeed at the location specified in the command
@@ -69,6 +79,34 @@ def run( | |||
# ============ | |||
|
|||
# Do something based on the report and the state of this class... | |||
pos_x = report.position.location_x | |||
pos_y = report.position.location_y | |||
if report.status == drone_status.DroneStatus.HALTED: # if command done |
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.
apply the double check with location here as well
if not result: | ||
return [], image_annotated # data is invalid |
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.
nice job returning the whole dataset as wrong, this is common practice done
No description provided.