Skip to content

Comments

Fix CameraServer on the roboRIO Python example cutting out robotInit from snippet.#3253

Merged
sciencewhiz merged 1 commit intowpilibsuite:mainfrom
chrissmith107:CameraServerDocFix
Feb 16, 2026
Merged

Fix CameraServer on the roboRIO Python example cutting out robotInit from snippet.#3253
sciencewhiz merged 1 commit intowpilibsuite:mainfrom
chrissmith107:CameraServerDocFix

Conversation

@chrissmith107
Copy link
Contributor

The Advanced Camera Server Program example in Python cuts out the last couple lines from the linked robot.py example, so it isn't complete. This just expands the snippet to include those two missing lines so the example is correct.

Before

import wpilib


class MyRobot(wpilib.TimedRobot):
    """
    This is a demo program showing the use of OpenCV to do vision processing. The image is acquired
    from the USB camera, then a rectangle is put on the image and sent to the dashboard. OpenCV has
    many methods for different types of processing.
    """

After

import wpilib


class MyRobot(wpilib.TimedRobot):
    """
    This is a demo program showing the use of OpenCV to do vision processing. The image is acquired
    from the USB camera, then a rectangle is put on the image and sent to the dashboard. OpenCV has
    many methods for different types of processing.
    """

    def robotInit(self):
        wpilib.CameraServer.launch("vision.py:main")

@sciencewhiz sciencewhiz merged commit e01df3e into wpilibsuite:main Feb 16, 2026
11 checks passed
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