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

[photonlib] Simulation Visualization Update #895

Merged
merged 30 commits into from
Sep 19, 2023

Conversation

amquake
Copy link
Member

@amquake amquake commented Aug 15, 2023

Summary:

  • Allows visualizing non-tag simulation targets
    • (Non-convex 3d models are made convex)
  • Adds field wireframe visualization
  • Visualization tweaks
  • Sim API organization/tweaks
2023-08-11.02-11-56_H.264_wireframe.mp4

(^ Pincushion distortion is demonstrated, but note that barrel distortion does not play well. The visualization is fairly toy-ish and not made with that in mind.)

2023-08-14.16-05-07_H.264_wireframe_smile.mp4

:]


Note:
Implementing the wireframe visualization uncovered some Java performance issues (wpilibsuite/allwpilib#5525, wpilibsuite/allwpilib#5524) which have a stopgap fix in this PR. This will need to be reverted after the wpilib fixes are merged into photon. Field wireframe is currently disabled by default.

The current loop time spent visualizing is quite long (~2 ms on my desktop including wireframe) and there are frequent GC spikes scaling with the number of targets visible. I'm struggling to get my profiler running correctly to diagnose this but it should be looked at as well after the next wpilib merge.

@amquake amquake requested a review from a team as a code owner August 15, 2023 02:19
@srimanachanta
Copy link
Member

Can we use the wpilib dev versions to use those PRs cause they were merged

@mcm001
Copy link
Contributor

mcm001 commented Sep 19, 2023

Send it

@mcm001 mcm001 merged commit 7f28364 into PhotonVision:master Sep 19, 2023
20 checks passed
@mdurrani808 mdurrani808 added this to the 2024 Beta milestone Sep 27, 2023
@amquake amquake deleted the sim-draw-targets branch October 9, 2023 01:46
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