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

Added behavior for marking enemy robots #2176

Merged
merged 12 commits into from
Mar 6, 2024
Merged

Added behavior for marking enemy robots #2176

merged 12 commits into from
Mar 6, 2024

Conversation

jvogt23
Copy link
Contributor

@jvogt23 jvogt23 commented Jan 29, 2024

Description

Describe your pull request.
Added a defensive behavior to mark enemy robots by following them around the field and blocking them from receiving the ball. Currently, it assumes that one marker will be created, and it creates the marker after there are 3 Wallers in play. If more markers are used in the future, logic will have to be added that gives each marker a different target.

Associated / Resolved Issue

Resolves # or ClickUp card
#86ayuj73h

Design Documents

Link

Steps to Test

Test Case 1

  1. Step 1 - Start a match
  2. Step 2 - There should be 3 Wallers, and a Marker should be following around the lowest enemy robot.
  3. Step 3 - Move the ball and the enemy robot around, and move enemy robots in and out of our half of the field.

Expected result:???
The waller with the highest ID should now be a Marker, and it will follow around the lowest ID'd robot on the other team that is on our side of the field. The Marker will enter a planning state whenever it is searching for a robot to mark, and it will not move during this time. When it finds a robot to mark, it will immediately target that robot.

Key Files to Review

Group 1: Marker classes

  • File 1 marker.cpp
  • File 2 marker.hpp

Group 2 Defense

  • File 3 defense.cpp
  • File 4 defense.hpp

Review Checklist

  • Docstrings: All methods and classes should have the file appropriate docstrings which follow the guidelines in the "Contributing" page of our docs.
  • Remove extra print statements: Any print statements used for debugging should be removed
  • Tag reviewers: Tag some people for review and ping them on Slack

(Optional) Sub-issues (for drafts)

Note: if you find yourself breaking this PR into many smaller features, it may make sense to break up the PR into logical units based on these features.

  • Step 1
  • Step 2

Copy link
Contributor

@sid-parikh sid-parikh left a comment

Choose a reason for hiding this comment

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

The logic is sound and the demo was impressive! I left a few comments for code quality purposes

soccer/src/soccer/strategy/agent/position/defense.cpp Outdated Show resolved Hide resolved
soccer/src/soccer/strategy/agent/position/defense.hpp Outdated Show resolved Hide resolved
soccer/src/soccer/strategy/agent/position/marker.cpp Outdated Show resolved Hide resolved
soccer/src/soccer/strategy/agent/position/marker.hpp Outdated Show resolved Hide resolved
soccer/src/soccer/strategy/agent/position/marker.cpp Outdated Show resolved Hide resolved
soccer/src/soccer/strategy/agent/position/marker.cpp Outdated Show resolved Hide resolved
soccer/src/soccer/strategy/agent/position/marker.cpp Outdated Show resolved Hide resolved
soccer/src/soccer/strategy/agent/position/marker.hpp Outdated Show resolved Hide resolved
soccer/src/soccer/strategy/agent/position/marker.hpp Outdated Show resolved Hide resolved
Copy link
Contributor

@sid-parikh sid-parikh left a comment

Choose a reason for hiding this comment

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

sorry for not catching this on my first review. i'll help you with merge conflicts on Tuesday

soccer/src/soccer/strategy/agent/position/marker.hpp Outdated Show resolved Hide resolved
@sid-parikh sid-parikh force-pushed the ja_marker_behavior branch from f11c243 to bbc6281 Compare March 6, 2024 01:29
@sid-parikh sid-parikh merged commit e52b026 into ros2 Mar 6, 2024
2 checks passed
@sid-parikh sid-parikh deleted the ja_marker_behavior branch March 6, 2024 06:16
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.

3 participants