Skip to content

Conversation

@StarrryNight
Copy link
Contributor

@StarrryNight StarrryNight commented Dec 25, 2025

Super small change fixing issue #3543, which is a sub issue of #3104 . Simply shrunk the navigable area by the radius of the robot, so robot won't go outside of the playing field when path finding near the edge.

Testing Done

Resolved Issues

Length Justification and Key Files to Review

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

nycrat
nycrat previously approved these changes Dec 25, 2025
Copy link
Member

@nycrat nycrat left a comment

Choose a reason for hiding this comment

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

looks good

Copy link
Contributor

@adrianchan787 adrianchan787 left a comment

Choose a reason for hiding this comment

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

yeah looks great, only thing is i can't tell from a cursory glance where/if cmath is used? but yeah otherwise looks great.

adrianchan787
adrianchan787 previously approved these changes Dec 25, 2025
williamckha
williamckha previously approved these changes Jan 6, 2026
Copy link
Member

@williamckha williamckha left a comment

Choose a reason for hiding this comment

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

Looks good, but I'm curious if this change broke ball placement since those tests aren't passing (we might need to move very close to the field boundary if the ball is up against the field walls). Once #3545 is merged, update your branch and try running all sim tests again

Comment on lines 68 to 76

Rectangle field_boundary = world.field().fieldBoundary();
Point neg_x_neg_y_corner(
field_boundary.negXNegYCorner().x() + ROBOT_MAX_RADIUS_METERS,
field_boundary.negXNegYCorner().y() + ROBOT_MAX_RADIUS_METERS);
Point pos_x_pos_y_corner(
field_boundary.posXPosYCorner().x() - ROBOT_MAX_RADIUS_METERS,
field_boundary.posXPosYCorner().y() - ROBOT_MAX_RADIUS_METERS);
Rectangle navigable_area = Rectangle(neg_x_neg_y_corner, pos_x_pos_y_corner);
Copy link
Member

Choose a reason for hiding this comment

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

A comment here would be nice explaining why we are shrinking field boundary by the robot radius

Added comment to clarify field boundary adjustment for robot movement.
Copy link
Member

@nycrat nycrat left a comment

Choose a reason for hiding this comment

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

Looks good, just remember to merge from master so that the tests pass.

Also I know Adrian mentioned cmath being imported for seemingly no reason, you could remove that if you want but also our c++ and python code has so many unnecessary imports thats something we might want to clean up later

@StarrryNight
Copy link
Contributor Author

I agree and we should alter the import * as well because its messing with my lsp

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.

4 participants