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

Position FSM #2173

Merged
merged 9 commits into from
Feb 5, 2024
Merged

Position FSM #2173

merged 9 commits into from
Feb 5, 2024

Conversation

rishiso
Copy link
Contributor

@rishiso rishiso commented Jan 29, 2024

Description

Implements position management automatically based on states of the game. Positions used to be static (3 defense, 2 offense, 1 goalie), but now they change dynamically.

Associated / Resolved Issue

ClickUp card

Steps to Test

Run in sim and move the ball to different halves. The positions of robots should change dynamically.

Key Files to Review

  • robot_factory_postion.cpp

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

@rishiso rishiso changed the title Position fsm Position FSM Jan 29, 2024
// This is where the current_position can be reassigned based on the
// PlayState
// If keeper, make no changes
if (robot_id_ == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

you can't assume 0 is the robot id. you need to get that information from the referee. If i'm not mistaken, there is already a mechanism for AAC to pass this information to its Position. if not, let's figure out how to add it.

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.

hey don't worry about the Goalie fix for now; I worked on that for the Offense PR anyway

@sid-parikh
Copy link
Contributor

your last commit says (not finished) so I'm not hitting merge, but feel free to push it if you're done.

@rishiso rishiso merged commit 2e7cefe into ros2 Feb 5, 2024
2 checks passed
@rishiso rishiso deleted the position-fsm branch February 5, 2024 02:29
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