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

[photon-lib] Sim multitag result #973

Merged
merged 7 commits into from
Oct 26, 2023
Merged

Conversation

amquake
Copy link
Member

@amquake amquake commented Oct 21, 2023

Updates simulation to include the pipeline multitag result.

@amquake amquake requested a review from a team as a code owner October 21, 2023 00:38
*
* @return The last set layout
*/
public AprilTagFieldLayout getAprilTagFieldLayout() {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is kinda weird... I'm not sure of a better way to do this since we need the ATFL to calculate the multitag result. This does not check what layout the coprocessor has, just the last one set from user code. All coprocessors on a NT instance share the same tag layout (and updating the layout through one camera should mean the others also can get that updated layout), but this uses a static field and technically assumes all coprocessors are on the same NT instance.

It could exist in PhotonCameraSim instead, but that would require code duplication specifically for sim when setting a tag layout over NT.

The field could also be accessed directly and the getter method removed, but that would require PhotonCameraSim to be in the same package as PhotonCamera.

@mcm001
Copy link
Contributor

mcm001 commented Oct 21, 2023

So funny story, the apriltag_field_layout topic is never actually subscribed to in the backend and is currently broken

@amquake
Copy link
Member Author

amquake commented Oct 22, 2023

So, should we hide it for now and just assume default field?

@mcm001
Copy link
Contributor

mcm001 commented Oct 22, 2023

I think so, yeah? Barring someone going and implementing it

@amquake amquake added this to the 2024 Beta milestone Oct 25, 2023
@amquake amquake merged commit d61225e into PhotonVision:master Oct 26, 2023
22 checks passed
@amquake amquake deleted the sim-multitag branch October 26, 2023 01:35
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