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

Add referee display layer #3337

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Lmh-java
Copy link
Contributor

@Lmh-java Lmh-java commented Oct 4, 2024

Description

Add a referee info layer to display game state and command.

Testing steps:

  1. turn on "Referee Info" option in the "Layers" dropdown
  2. Expect to see info on the top right corner

Testing Done

  • Thunderscope runs
  • CI

Resolved Issues

resolves #3333
resolves #3289

Demo

Dropdown menu to enable layer image
Game state and command display image
Ball placement visual (ball is not placed correctly) image
Ball placement visual (ball is placed correctly) image

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

@Lmh-java Lmh-java marked this pull request as ready for review October 4, 2024 05:28
@Lmh-java Lmh-java requested review from a team, Mr-Anyone and AadityaSuri and removed request for a team October 4, 2024 05:29
Copy link
Contributor

@williamckha williamckha left a comment

Choose a reason for hiding this comment

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

🔥

Would you also be able to incorporate #3289 into this PR? There's already another PR that never got merged which implements it.

src/software/thunderscope/gl/graphics/gl_label.py Outdated Show resolved Hide resolved
if not referee_proto:
return

referee_msg_dict = MessageToDict(referee_proto)
Copy link
Contributor

Choose a reason for hiding this comment

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

You actually don't need MessageToDict (I'm not sure why we use it in some of our code). You can just access the fields directly e.g. referee_proto.stage

Copy link
Contributor Author

@Lmh-java Lmh-java Oct 5, 2024

Choose a reason for hiding this comment

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

After testing, I think in this case I might want to keep MessageToDict, since directly acessing referee_proto.stage only gives me the index number (instead of the text)

@Lmh-java
Copy link
Contributor Author

Lmh-java commented Oct 5, 2024

🔥

Would you also be able to incorporate #3289 into this PR? There's already another PR that never got merged which implements it.

Yes, sure. 👍

Co-authored-by: William Ha <60044853+williamckha@users.noreply.github.com>
@Lmh-java
Copy link
Contributor Author

Lmh-java commented Oct 5, 2024

Just a little bit clarification here before I get started, is ball placement visulization supposed to be in the same layer with referee info?

In #3289, that's what being said, but in the associated PR, it seems to be added to a different layer.

@williamckha
Copy link
Contributor

Just a little bit clarification here before I get started, is ball placement visulization supposed to be in the same layer with referee info?

In #3289, that's what being said, but in the associated PR, it seems to be added to a different layer.

I would put the ball placement visualization in the Referee Info layer you created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants