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

Initial Submission - Manjot #100

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

Initial Submission - Manjot #100

wants to merge 2 commits into from

Conversation

mdola19
Copy link

@mdola19 mdola19 commented Sep 19, 2024

No description provided.

Copy link
Member

@maxlou05 maxlou05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

Comment on lines +76 to +80
if not self.waypoint_reached:
# Moves towards the waypoint
x_dist = self.waypoint.location_x - report.position.location_x
y_dist = self.waypoint.location_y - report.position.location_y
command = commands.Command.create_set_relative_destination_command(x_dist, y_dist)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this works for the simulation, in real life your drone won't be this precise. Please use the acceptnace_radius to account for minor errors in positioning.

Comment on lines +72 to +78
if not self.waypoint_reached:
# Moves towards the waypoint
x_dist = self.waypoint.location_x - report.position.location_x
y_dist = self.waypoint.location_y - report.position.location_y
command = commands.Command.create_set_relative_destination_command(x_dist, y_dist)

self.waypoint_reached = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, please use accpetance_radius

Comment on lines +84 to +87
closest_pad = min(
landing_pad_locations, key=lambda pad: self.get_distance(report.position, pad)
)
print(f"Closest Landpad: {closest_pad.location_x}, {closest_pad.location_y}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be moved to the section where you first reach the waypoint. Right now, it recalculates your landing pad continuously (whenever it stops), which is unnecessary.

# This func returns a tuple, with whether the operation was a sucess (bool) & the bounding box itself
successful, box = bounding_box.BoundingBox.create(bounds=boxes_cpu[i])

if successful:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally, in statistics, we discard the entire data point (the entire image) if one part of it (the bounding box) is invalid.
(You do not need to change anything here, just something to think about)

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