Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Bootcamp - Davis Liu #109

wants to merge 4 commits into from

Conversation

davisliu2006
Copy link

No description provided.

Comment on lines +81 to +90
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

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

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

Comment on lines +125 to +126
if not result:
return [], image_annotated # data is invalid

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants