Skip to content

Fix mirrored ball kick velocity on inverted fullsystem tab#3813

Open
annieisawesome2 wants to merge 3 commits into
UBC-Thunderbots:masterfrom
annieisawesome2:yellow-ball-kick-velocity-fix
Open

Fix mirrored ball kick velocity on inverted fullsystem tab#3813
annieisawesome2 wants to merge 3 commits into
UBC-Thunderbots:masterfrom
annieisawesome2:yellow-ball-kick-velocity-fix

Conversation

@annieisawesome2

@annieisawesome2 annieisawesome2 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes mirrored ball kick behaviour on the yellow fullsystem.

When placing the ball with Shift+click and Shift+drag, the Blue and Yellow tabs can use different coordinate frames depending on friendly_colour_yellow and referee.blue_team_on_positive_half. On the inverted tab, the move preview line pointed toward the mouse (opposite of the intended slingshot direction).

Changes made:
Converted simulator-space velocity to display-space for rendering.
Use it when drawing the kick preview line so drag-back to shoot-forward matches blue fullsystem.

On release, negate velocity into a local ball_velocity before sending to the simulator (instead of mutating self.ball_velocity_vector), so preview and simulator send stay consistent

Testing Done

Try the shift click on both blue and yellow fullsystems.

Screen.Recording.2026-07-04.at.7.37.26.AM.mov

Resolved Issues

#3761

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 commented Jul 4, 2026

Copy link
Copy Markdown
Member

@annieisawesome2 could you update this PR with the fixes we talked about in-person when you have time?

@annieisawesome2

Copy link
Copy Markdown
Contributor Author

@annieisawesome2 could you update this PR with the fixes we talked about in-person when you have time?

Updated! Sorry for the delay.

@nycrat nycrat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good work! Just make sure to pull from master for a bugfix that is causing ci to fail

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