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

Intake/Scoring Collisions #1035

Merged
merged 47 commits into from
Jul 26, 2024
Merged

Intake/Scoring Collisions #1035

merged 47 commits into from
Jul 26, 2024

Conversation

a-crowell
Copy link
Collaborator

@a-crowell a-crowell commented Jul 19, 2024

Description

Using collision detection for intaking and scoring.

Objectives

  • Intakes on contact and Q (easily changed once Named robot controls #1034 is merged in)
  • Scoring zone configuration applies to sensor and mesh: alliance, points, position/scale/rotation, and parentNode
  • Settings > Render Scoring Zones
  • Score keeping
  • Persistent points
  • Basic Score UI

Note

  • Destroying gamepieces will be looked back into once we can bring more gamepieces onto the field, so not this PR.

Watch For

  • Double counted points (not persistent zone). I have seen this every once in a while, but haven't been able to reproduce it yet.
  • Changing the render scoring zone preference and refreshing page/adding zones/etc
  • Zones with changed scale not rotating properly

JIRA Issue

@a-crowell a-crowell self-assigned this Jul 19, 2024
Copy link
Collaborator

@LucaHaverty LucaHaverty left a comment

Choose a reason for hiding this comment

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

Amazing work, this is coming along well! Just a couple things I noticed:

  • When you move a scoring zone then click 'accept', the rendered zones position does not update until you close the 'scoring zones' panel. This isn't a big issue, but can make it seem like moving the zone didn't work. Also, do you think you could make the rendered scoring zone disappear right away when you delete a zone?
  • The persistent point option doesn't quite work for me. What happens is the points stay counted even after the gamepiece exits the zone, but when any new gamepiece is picked up, points are then subtracted. With persistent points toggled off, everything works as expected.
  • I'm pretty sure this is a mistake from my PR, but the button to select a zone parent node says "select pickup node" because it was copied from the intake panel.
    image

How hard would it be to add a toggle in settings to not show the score UI? It might be nice to have it out of the way for screenshots and such. This could definitely wait until after the MVP though.

Another things that would be nice is adding the scoring zone colors to the zone config gizmo, but again, this can wait.

Overall great work, I'm really impressed!

@HunterBarclay
Copy link
Member

@a-crowell Can you update this branch to the new Input schemes?

@LucaHaverty LucaHaverty self-requested a review July 25, 2024 18:47
Copy link
Collaborator

@LucaHaverty LucaHaverty left a comment

Choose a reason for hiding this comment

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

Amazing work!!! This is very impressive 😄

Copy link
Collaborator

@LucaHaverty LucaHaverty left a comment

Choose a reason for hiding this comment

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

Sorry.......just one quick build error to fix :(((

src/ui/panels/configuring/scoring/ZoneConfigPanel.tsx:116:21 - error TS6133: 'setDestroy' is declared but its value is never read.

116     const [destroy, setDestroy] = useState<boolean>(SelectedZone.zone.destroyGamepiece)

Also run npm run build and npm run format after you fix this to make sure there are no more sneaky errors

@a-crowell a-crowell requested a review from LucaHaverty July 25, 2024 23:44
Copy link
Collaborator

Choose a reason for hiding this comment

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

On lines 164-166 can you make it so that when a zone is deleted then the zone itself is also actually deleted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Zones are all deleted and repopulated after updating field preferences, so unless you are seeing a bug with it staying on the field that I am not seeing, this does delete the zone.

@Dhruv-0-Arora Dhruv-0-Arora self-requested a review July 26, 2024 18:37
Copy link
Collaborator

@Dhruv-0-Arora Dhruv-0-Arora left a comment

Choose a reason for hiding this comment

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

immaculate

@HunterBarclay HunterBarclay merged commit f467f95 into dev Jul 26, 2024
13 checks passed
@HunterBarclay HunterBarclay deleted the crowela/1731/scoring-physics branch July 26, 2024 21:44
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.

4 participants