|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Python: USBCamera does not work?
Hi! We ran into a problem when trying to set up a USBCamera with RobotPy and Python. This code gives us an error:
Code:
self.usb_camera=wpilib._impl.USBCamera() wpilib._impl.CameraServer.setAutomaticCapture(self.usb_camera) |
|
#2
|
||||
|
||||
|
Re: Python: USBCamera does not work?
I had the same problem and it took quite a while to figure out.
Code:
try:
self.camera = wpilib.USBCamera()
self.camera.startCapture()
self.camServ = wpilib.CameraServer()
self.camServ.startAutomaticCapture(self.camera)
except:
self.camera = None
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|