View: 228|Reply: 2

PiCar Pro - Camera issue while running webServer.py

[Copy link]

1

Threads

2

Posts

7

Credits

Newbie

Rank: 1

Credits
7
Post time 2021-3-22 02:03:15 | Show all posts |Read mode
Hi,

Post installation when I tested pi-cam with Adeept robot HAT and Raspberry Pi 4 (running webServer.py) it worked perfectly fine.
But
When I plugged all servos, motors, ultrasonic and tracking components and re-run webServer.py, I am getting below error with camera.

Can you please help!

Error:
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
Unable to stop the stream: Device or resource busy
VIDEOIO ERROR: V4L: can't open camera by index 0


Terminal Log:
---------------------------------------------------------------------------------------------------------------------------------------------------------------
pi:~ $ sudo python3 Robot/adeept_picarpro/server/webServer.py
......................pause..........................
mpu6050 connected, PT MODE ON
......................pause..........................
Starting camera thread.
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
Unable to stop the stream: Device or resource busy
VIDEOIO ERROR: V4L: can't open camera by index 0
Exception in thread Thread-3:

Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/Robot/adeept_picarpro/server/base_camera.py", line 94, in _thread
    for frame in frames_iterator:
  File "/home/pi/Robot/adeept_picarpro/server/camera_opencv.py", line 423, in frames
    raise RuntimeError('Could not start camera.')
RuntimeError: Could not start camera.


Reply

Use magic Report

1

Threads

11

Posts

37

Credits

Newbie

Rank: 1

Credits
37
Post time 2021-5-7 10:24:27 From the mobile phone | Show all posts
Could not start camera: there is no connection between pi and camera, so script stops. You might have either damaged the camera ribbon while rebuilding the board, or the cable sits loose in a connector (either on you board or on camera module) these ribbons are very fragile
Reply

Use magic Report

0

Threads

1

Posts

4

Credits

Newbie

Rank: 1

Credits
4
Post time 2021-6-2 00:25:41 | Show all posts
Was this issue resolved?
Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules