PTZ-Camera-Controller
PTZ-Camera-Controller copied to clipboard
The instructions are wrong
Attempting to install opencv via the readme instructions leads to virtualenv errors telling you to install globally with sudo apt install. I installed the package globally, otherwise I would have to deal with virtualenv problems with libcam installation. AFter running python3 FocuserExample.py with a preview window open, I get errors with waitingForFree, isBusy. Something about a timeout or the device is busy. Please clean up your documentation and make the hardware useable.
Either the B0399B0283 camera doesn't support Zoom and Arducam is false advertising on their site that it does as a PTZ camera, or the software here is completely broken:
| python3 FocuserExample.py | |
|---|---|
| Traceback (most recent call last): | |
| File "/home/drone-project/articulated_robotics/PTZ-Camera-Controller/FocuserExample.py", line 213, in |
|
| [0:30:48.590574799] [2526] INFO Camera camera.cpp:1183 configuring streams: (0) 640x360-RGB888 (1) 1280x720-SRGGB10_CSI2P | |
| [0:30:48.592425834] [2530] INFO RPI vc4.cpp:616 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 1280x720-SRGGB10_1X10 - Selected unicam format: 1280x720-pRAA | |
| main() | |
| File "/home/drone-project/articulated_robotics/PTZ-Camera-Controller/FocuserExample.py", line 205, in main | |
| curses.wrapper(draw_menu, camera, 1) | |
| File "/usr/lib/python3.11/curses/init.py", line 94, in wrapper | |
| return func(stdscr, *args, **kwds) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| File "/home/drone-project/articulated_robotics/PTZ-Camera-Controller/FocuserExample.py", line 191, in draw_menu | |
| RenderMiddleText(stdscr,k,focuser) | |
| File "/home/drone-project/articulated_robotics/PTZ-Camera-Controller/FocuserExample.py", line 72, in RenderMiddleText | |
| focus_value = "Focus : {}".format(focuser.get(Focuser.OPT_FOCUS))[:width-1] | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| File "/home/drone-project/articulated_robotics/PTZ-Camera-Controller/Focuser.py", line 94, in get | |
| self.waitingForFree() | |
| File "/home/drone-project/articulated_robotics/PTZ-Camera-Controller/Focuser.py", line 79, in waitingForFree | |
| while self.isBusy() and count < (5 / 0.01): | |
| ^^^^^^^^^^^^^ | |
| File "/home/drone-project/articulated_robotics/PTZ-Camera-Controller/Focuser.py", line 74, in isBusy | |
| return self.read(self.CHIP_I2C_ADDR,self.BUSY_REG_ADDR) != 0 | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| File "/home/drone-project/articulated_robotics/PTZ-Camera-Controller/Focuser.py", line 19, in read | |
| value = self.bus.read_word_data(chip_addr,reg_addr) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| OSError: [Errno 5] Input/output error |