Hello - Just built my PiDog and everything works great… except… the camera. I believe my camera is not being recognized. I’m not sure how to troubleshoot or resolve the issue.
From this other similar post here is my info:
1.Raspberry Pi camera is properly connected and oriented correctly?
I believe so. Pictures attached below
2.What version of the operating system are you currently using?
Debian GNU/Linux 12 (bookworm)
3.Please run libcamera-hello to test if the camera is working
This is what I get:
~/pidog/examples $ sudo libcamera-hello
[0:39:57.420566437] [2624] INFO Camera camera_manager.cpp:325 libcamera v0.3.2+99-1230f78d
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Made X/EGL preview window
ERROR: *** no cameras available ***
4.When you run the example code, if there are any errors, please provide a complete screenshot of the error for us to analyze and resolve the issue.
~/pidog/examples $ sudo python3 7_face_track.py
vilib 0.3.12 launching ...
picamera2 0.3.24
config_file: /home/brian/.config/pidog/pidog.conf
robot_hat init ... done
imu_sh3001 init ... done
rgb_strip init ... done
dual_touch init ... done
sound_direction init ... done
sound_effect init ... pinctrl set 20 op dh
done
ultrasonic init ... done
Imgshow start ...
Web display on:
Exception in thread vilib:
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.11/dist-packages/vilib/vilib.py", line 235, in camera
picam2 = Picamera2()
^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/picamera2/picamera2.py", line 257, in __init__
camera_num = self.global_camera_info()[camera_num]['Num']
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
IndexError: list index out of range
http://10.76.1.168:9000/mjpg
Starting web streaming ...
* Serving Flask app 'vilib.vilib'
* Debug mode: off
start
Stopping and returning to the initial position ... 0, 0
Quit
Pics: