Document low-resource vision simulation with Photonvision#2359
Document low-resource vision simulation with Photonvision#2359Ruthie-FRC wants to merge 6 commits intoPhotonVision:mainfrom
Conversation
Added section on low-resource vision simulation with Photonvision, including configuration details and use cases for low-spec machines.
Removed default camera simulation code for performance.
|
do I need to go and apply linting? |
https://github.com/PhotonVision/photonvision/actions/runs/21883416684/job/63172029981?pr=2359 |
I know I need to... give me one second (I have a personal grudge against linting) |
|
ok I think I linted it propperly |
|
@samfreund idk why the build host is failing on linux |
|
|
||
| **Use Case** | ||
|
|
||
| This configuration is ideal for Chromebooks or low-spec machines where rendering the simulated camera images causes lag, but you still need vision data for testing. |
There was a problem hiding this comment.
Photonvision supports chromebooks? Definitely not Chrome OS
There was a problem hiding this comment.
robots running photon vision, when using wpilib: simulate robot code
|
|
||
| **Use Case** | ||
|
|
||
| This configuration is ideal for Chromebooks or low-spec machines where rendering the simulated camera images causes lag, but you still need vision data for testing. |
There was a problem hiding this comment.
"Need" is extremely strong here. I'd recommend "desire" - there's several other alternatives in low-resource environments.
| - Raw stream - The unprocessed camera view | ||
| - Processed stream - The camera view with vision processing overlays | ||
|
|
||
| These streams are nice if you want to actually view the simulated images, but they can be computationally expensive on low-power laptops like Chromebooks, causing lag and reduced simulation performance. |
| - Raw stream - The unprocessed camera view | ||
| - Processed stream - The camera view with vision processing overlays | ||
|
|
||
| These streams are nice if you want to actually view the simulated images, but they can be computationally expensive on low-power laptops like Chromebooks, causing lag and reduced simulation performance. |
There was a problem hiding this comment.
I'd avoid saying simulation performance, it's too unspecific. What might be limited is the ability to keep simulation in real-time, not necessarily the fidelity?
There was a problem hiding this comment.
the main issue is that there are loop overrun errors due to lack of computation process, which floods the logs with errors and renders them near impossible to understand (At least for me)
|
|
||
| Lightweight Configuration | ||
|
|
||
| The following configuration disables both streams while still allowing tag detection and pose simulation to work. It's not perfect, but it's much better performance-wise than the default configuration. |
There was a problem hiding this comment.
Same comment, "performance" is non-specific and not useful to new students trying to figure out what's going on.
|
|
||
| .. code-block:: java | ||
|
|
||
| // lightweight config version |
There was a problem hiding this comment.
Why is the code all commented? In general, best practice is to tie to real examples with remote literal includes.
All three languages should have code blocks too - at least a "comming soon" note
There was a problem hiding this comment.
leftover form when there was the standard version above it. and I can work on the code blocks in the other languages.
|
Hey Ruthie - I left a pile of comments. I wrote those comments as I would for any documentation writer, poking at some specific choices in wording and inconsistency with other parts of the documents. Much aligned with the classic memes, it's easier to dig into details on small PR's than big refactors :) As I read the whole PR, I think there's at least a chance it was the output of an LLM, with limited input to the prompt. As a general rule, we've disallowed such content to be merged directly - not that individuals shouldn't be using such tools to aid development, but because the output still needs thorough review. For example, this new doc section is the only mention of "chromebooks" throughout our documentation, which is highly surprising. It's also possible you wrote this all yourself, but didn't have full context to the PhotonVision project. Regardless of whether the content is LLM output or your own creative work, stuff like this will have to be fixed up. Let us know how best to move forward. If you have interest to continue developing out this section, it might be worthwhile to talk about your end goals with adding this and interactively flesh out the path forward. Alternatively, if you want to directly address the comments and move forward as-is, that is a possibility. |
Hi! None of this actually was written by LLM. I struggle with wording of things sometimes though, so all errors are my own when it comes to documentation. however, I have tested this code on my own, and myself and my team have used it with success for the current REBUILT season. I wrote this because myself, and many others on my team, do not have easy or consistent access to computers other than Chromebooks, on which we run GitHub codespaces set up with wpilib vs code. There are a lot of problems we have run into during our several years of this setup, one of which is the fact that we tend to get a lot of loop overrun errors clogging up our logs when we run simulate robot code. seeing as this is a photonvision specific fix, and that there is no documentation for trying to run wpilib sim with photonvision on a Chromebook and how to remedy this issue, I figured it would be helpful to the many other students I know who both work on Chromebooks and run photon vision on their robots. Apologies for any confusion. I will work on fixing the things you brought up immediately. |
Clarified the description of the configuration use case for low-spec machines.
|
Ok. So some context to add as input:
This is an uncommon setup. As far as sim performance goes, I believe the critical thing here is that you're using codespaces . The chromebook portion is irrelevant, it just happens to be the device used to access the codespace online (unless you're certain the browser is executing part of the simulation? I'd be surprised by that though). Otherwise, looks like you're tackling the other comments. Appreciate it, thank you so much for jumping in to contribute, and being extremely receptive of feedback! These cycles are very normal on large, jointly managed, long running codebases (read: any large company or research institution :) ). I'm thrilled you're here and making updates, and (hopefully) learning a tiny bit more about sw dev in the big wide world! |
Sorry for the late reply! Ive noticed that when i run a codespace on the only other computer i have access to, a latitude 5590, i do not have nearly as many loopoverrun errors, so i belive that it is partially the Chromebook partially the codespace usage. |
|
@gerth2 is it ok now? sorry for the late follow up, the season got frantic |
Description
What changed? Why? (the code + comments should speak for itself on the "how")
Added section on low-resource vision simulation with Photonvision, including configuration details and use cases for low-spec machines. Closes #2358