CameraServer

class wpilib.CameraServer[source]

Bases: object

Provides a way to launch an out of process cscore-based camera service instance, for streaming or for image processing.

Note

This does not correspond directly to the wpilib CameraServer object; that can be found as cscore.CameraServer. However, you should not use cscore directly from your robot code, see the documentation for details

classmethod is_alive()[source]
Return type

bool

Returns

True if the CameraServer is still alive

classmethod launch(vision_py=None)[source]

Launches the CameraServer process in autocapture mode or using a user-specified python script

Parameters

vision_py (Optional[str]) – If specified, this is the relative path to a filename with a function in it

Example usage:

wpilib.CameraServer.launch("vision.py:main")

Warning

You must have robotpy-cscore installed, or this function will fail without returning an error (you will see an error in the console).

Return type

None