wpilibsuite / frc-docs

Official FRC Documentation powered by Read the Docs
https://docs.wpilib.org
Other
145 stars 256 forks source link

Using Multiple Cameras Python Documentation is Incomplete #2624

Closed jonathandao0 closed 2 months ago

jonathandao0 commented 3 months ago

I was a CSA helping a team at an event this weekend and had a team request for help getting two Microsoft Lifecam HD3000 USB camera streams up on a roboRIO using Python. I managed to get it working after about an hour, but found that this cannot be done with the current steps as written on frc-docs and would be difficult for most people to figure out without prior knowledge of robotpy.

A few things I noted:

virtuald commented 3 months ago

The correct way to install cscore on the roborio is to add it to your pyproject.toml (as mentioned in the docs @ https://docs.wpilib.org/en/stable/docs/software/python/pyproject_toml.html).

However, you're right that it probably should be mentioned in the docs somewhere more explicitly. Eventually I want the QuickVision example and other examples to have pyproject.toml files in them so you can just download and go, but... life.

virtuald commented 3 months ago

The Python Using Multiple Cameras documentation calls for creating a vision.py file that is then called from the robot code using wpilib.CameraServer.launch("vision.py:main")

So the documentation says "robot.py contents", file content, followed by "vision.py contents", file content... since it wasn't clear to you that the two files lived in the same directory, how would you change the wording to communicate that?

virtuald commented 3 months ago

Please review https://github.com/wpilibsuite/frc-docs/pull/2625 and see if that addresses your concerns.

jonathandao0 commented 3 months ago

Looks good to me. Thanks for the quick response!