Skip to content

Document low-resource vision simulation with Photonvision#2359

Open
Ruthie-FRC wants to merge 6 commits intoPhotonVision:mainfrom
Ruthie-FRC:patch-1
Open

Document low-resource vision simulation with Photonvision#2359
Ruthie-FRC wants to merge 6 commits intoPhotonVision:mainfrom
Ruthie-FRC:patch-1

Conversation

@Ruthie-FRC
Copy link

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

Added section on low-resource vision simulation with Photonvision, including configuration details and use cases for low-spec machines.
@Ruthie-FRC Ruthie-FRC requested a review from a team as a code owner February 10, 2026 21:36
@github-actions github-actions bot added the documentation Anything relating to https://docs.photonvision.org label Feb 10, 2026
Removed default camera simulation code for performance.
@Ruthie-FRC
Copy link
Author

do I need to go and apply linting?

@samfreund
Copy link
Member

@Ruthie-FRC
Copy link
Author

Ruthie-FRC commented Feb 10, 2026

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)

@Ruthie-FRC
Copy link
Author

ok I think I linted it propperly

@Ruthie-FRC Ruthie-FRC requested a review from samfreund February 11, 2026 01:13
@Ruthie-FRC
Copy link
Author

@samfreund idk why the build host is failing on linux

samfreund
samfreund previously approved these changes Feb 11, 2026
@Ruthie-FRC Ruthie-FRC requested a review from samfreund February 14, 2026 01:18

**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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Photonvision supports chromebooks? Definitely not Chrome OS

Copy link
Author

Choose a reason for hiding this comment

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

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

"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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same Chromebook comment

- 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Author

Choose a reason for hiding this comment

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

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

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
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Author

Choose a reason for hiding this comment

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

leftover form when there was the standard version above it. and I can work on the code blocks in the other languages.

@gerth2
Copy link
Contributor

gerth2 commented Feb 15, 2026

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.

@Ruthie-FRC
Copy link
Author

Ruthie-FRC commented Feb 15, 2026

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.

@Ruthie-FRC Ruthie-FRC requested a review from gerth2 February 15, 2026 15:56
Clarified the description of the configuration use case for low-spec machines.
@gerth2
Copy link
Contributor

gerth2 commented Feb 16, 2026

Ok. So some context to add as input:

GitHub codespaces set up with wpilib vs code

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!

@Ruthie-FRC
Copy link
Author

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).

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.

@Ruthie-FRC
Copy link
Author

@gerth2 is it ok now? sorry for the late follow up, the season got frantic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Anything relating to https://docs.photonvision.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Low resource friendlier vision simulation code snippet

3 participants