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

Annie/enemy goa #3409

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

Annie/enemy goa #3409

wants to merge 4 commits into from

Conversation

annieisawesome2
Copy link
Contributor

@annieisawesome2 annieisawesome2 commented Nov 23, 2024

Please fill out the following before requesting review on this PR

Description

Added a new helper method within robot_navigation_obstacle_factory in which both FRIENDLY_GOAL and ENEMY_GOAL uses for motion constraints. Method added within interface: createGoalObstacles. The method creates a set of obstacles for a specified goal (either friendly goal or enemy goal).

Testing Done

Added two tests where starting point is initially in friendly or enemy net and ball is brought out of the net. Ran ball_placement_play_test with build successful.

Resolved Issues

resolves #3356

Length Justification and Key Files to Review

Review Checklist

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

  • [ x] 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.
  • [x ] Remove all commented out code
  • [ x] Remove extra print statements: for example, those just used for testing
  • [ x] Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

@itsarune itsarune requested review from mkhlb, a team, Lmh-java and wmostrenko and removed request for a team November 29, 2024 05:06
Comment on lines +154 to +155
obstacles.push_back(std::make_shared<GeomObstacle<Stadium>>(Stadium(
Segment(goal.negXPosYCorner(), goal.negXNegYCorner()), goal_obstacle_radius)));
Copy link
Contributor

Choose a reason for hiding this comment

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

unfortunately, this specific obstacle doesn't work in both situations. In the friendly net, the back wall is from negXPosYCorner to negXNegYCorner but for the enemy net, the back wall is from posXPosYCorner to posXNegYCorner. It might be better to pass in the coordinates of the back wall directly to this function and create this line segment. The other obstacles seems fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will fix that, thank you!

@@ -27,6 +28,7 @@ def get_validation_status(self, world) -> ValidationStatus:
):
return ValidationStatus.PASSING

self.ball_position = world.ball.current_state.global_position
Copy link
Contributor

Choose a reason for hiding this comment

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

can you move this to line 25?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I'll do that!

Copy link
Contributor

@itsarune itsarune left a comment

Choose a reason for hiding this comment

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

looking good, just some minor stuff

@@ -155,6 +175,7 @@ RobotNavigationObstacleFactory::createObstaclesFromMotionConstraints(
return obstacles;
}


Copy link
Contributor

Choose a reason for hiding this comment

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

Super small change but maybe remove this extra line to stay consistent with spacing throughout the rest of the file.

@@ -107,29 +107,24 @@ RobotNavigationObstacleFactory::createObstaclesFromMotionConstraint(
createFromShape(Circle(world.ball().position(), 0.5)));
}
break;

Copy link
Contributor

Choose a reason for hiding this comment

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

Super small change but maybe remove this extra line to stay consistent with spacing throughout the rest of the file.

Copy link
Contributor

@wmostrenko wmostrenko left a comment

Choose a reason for hiding this comment

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

Just some small formatting things. Overall looks great!!

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.

Add ENEMY_GOAL obstacle during ball placement
3 participants