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

Colin Wang's Pull Request #148

Closed
wants to merge 9 commits into from
Closed

Colin Wang's Pull Request #148

wants to merge 9 commits into from

Conversation

passman300
Copy link

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 77
distance_x = curr_position.x - self.waypoint.x
distance_y = curr_position.y - self.waypoint.y
Copy link
Member

Choose a reason for hiding this comment

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

It should be the other way around, target-self


else:
command = commands.Command.create_set_relative_destination_command(
self.waypoint.location_x, self.waypoint.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 is a relative distance command, so your own position would matter

start_location.location_y - final_location.location_y
) ** 2

def within_accepepted_radius(
Copy link
Member

Choose a reason for hiding this comment

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

Typo in function name

for i in range(boxes_cpu.shape[0]):
result, box = bounding_box.BoundingBox.create(boxes_cpu[i])
if result:
bounding_boxes.append(box)
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 would discard the entire data point (the whole image) if part of it is bad (a bounding box). (You do not need to change anything here, just something to think about)


else:
command = commands.Command.create_set_relative_destination_command(
self.waypoint.location_x, self.waypoint.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 is a relative distance command, your own position matters

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

command = commands.Command.create_land_command()

# find the next closest landing pad
elif self.within_accepepted_radius(report.position, self.waypoint):
Copy link
Member

Choose a reason for hiding this comment

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

What happens if the drone got stuck while moving from waypoint to landing pad? Currently its undefined behaviour (defaults to going to waypoint)

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.

Approved

@maxlou05 maxlou05 closed this Jan 29, 2025
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