Skip to content
This repository was archived by the owner on Sep 21, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants