-
Notifications
You must be signed in to change notification settings - Fork 99
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
Align with ball before attempting to dribble #3234
Align with ball before attempting to dribble #3234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I've noticed this issue a lot so hopefully this helps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work! What do you think about writing a pytest instead of the simulated c++ test?
@itsarune Since we dont already have a pytest setup for dribble tactic, I was thinking that porting the tests would be more suited for a separate ticket/PR. And frankly, I'm not sure if I have the bandwidth for it right now either. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🇳🇱
Description
Currently,
DribbleFSM
attempts to drive into the ball to get possession, which sometimes results in the robot bumping the ball away if it's not fully aligned with it. For example:dribble_ball_behind_robot_before.mp4
This PR updates the logic by setting the destination slightly away from the ball so the robot does not bump into the ball, until the robot is aligned. Alignment is determined by drawing a long rectangle out of the robot in the direction it's facing, with the width of the dribbler (shown in purple). Here's the updated behaviour of the same scenario:
dribble_ball_behind_robot_after.mp4
Some of the robot constants were also updated to match Mech's latest CAD design.
Testing Done
Added a new simulated test (shown in the video above)
Resolved Issues
Resolves #3113
Length Justification and Key Files to Review
Review Checklist
It is the reviewers responsibility to also make sure every item here has been covered
.h
file) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/software/geom
. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.TODO
(or similar) statements should either be completed or associated with a github issue