Hello all, So new to ras pi Sudo and all the above. Having an issue with face track ( cd examples) all the dog does is rock his head to one side to the other. and stops. can any one help me out with this issue ? Thanks in advance!
Please contact our after-sales team at service@sunfounder.com.
To help us analyze and resolve the issue efficiently, could you please provide a video showing the problem?
Also, please check if the servo assembly is securely mounted and all screws are properly tightened.
Hello, I think I have a solution for this problem. It’s something to do with the camera also recognizing qr codes. You need to change the following code in /usr/local/lib/python3.11/dist-packages/vilib/vilib.py Between the line 333 and 335 comment out all references to qrcode_prop.
The current vilib code has a bug. It expects both the qr code and the face detection to be running at the same time. To fix this you need change line 335 of vilib.py from a “or” to an “and”. And if you want to run both the qrcode and the facedetect at the same time then inside your 7_face_track.py you need to add Vilib.qrcode_detect_switch(True) at line 15.
ill try it thanks, but your speaking french to me lol. sudo and python are so new to me.
so i did what you asked no luck, thanks. ill show a video. trying to get an audio clip of the sound byte as well. but since i installed the controller app i got no sound ..
cd ~/pidog/examples
sudo python3 1_wake_up.py
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/gpiozero/pins/pi.py”, line 411, in pin
pin = self.pins[info]
~~~~~~~~~^^^^^^
KeyError: PinInfo(number=29, name=‘GPIO5’, names=frozenset({‘5’, ‘WPI21’, ‘GPIO5’, 5, ‘J8:29’, ‘BCM5’, ‘BOARD29’}), pull=‘’, row=15, col=1, interfaces=frozenset({‘gpio’, ‘’, ‘dpi’, ‘spi’, ‘i2c’, ‘uart’}))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/chapo/pidog/examples/1_wake_up.py”, line 7, in
my_dog = Pidog(head_init_angles=[0, 0, -30])
File “/usr/local/lib/python3.13/dist-packages/pidog-1.3.9-py3.13.egg/pidog/pidog.py”, line 131, in init
utils.reset_mcu()
~~~~~~~~~~~~~~~^^
File “/usr/local/lib/python3.13/dist-packages/robot_hat/utils.py”, line 155, in reset_mcu
pin = Pin(“MCURST”)
File “/usr/local/lib/python3.13/dist-packages/robot_hat/pin.py”, line 96, in init
self.setup(mode, pull, active_state)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/dist-packages/robot_hat/pin.py”, line 134, in setup
self.gpio = OutputDevice(self._pin_num)
~~~~~~~~~~~~^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 108, in call
self = super().call(*args, **kwargs)
File “/usr/lib/python3/dist-packages/gpiozero/output_devices.py”, line 74, in init
super().init(pin, pin_factory=pin_factory)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/gpiozero/mixins.py”, line 75, in init
super().init(*args, **kwargs)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 553, in init
pin = self.pin_factory.pin(pin)
File “/usr/lib/python3/dist-packages/gpiozero/pins/pi.py”, line 413, in pin
pin = self.pin_class(self, info)
File “/usr/lib/python3/dist-packages/gpiozero/pins/lgpio.py”, line 126, in init
lgpio.gpio_claim_input(
~~~~~~~~~~~~~~~~~~~~~~^
self.factory._handle, self._number, lgpio.SET_PULL_NONE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/lgpio.py”, line 755, in gpio_claim_input
return _u2i(_lgpio._gpio_claim_input(handle&0xffff, lFlags, gpio))
File “/usr/lib/python3/dist-packages/lgpio.py”, line 458, in _u2i
raise error(error_text(v))
lgpio.error: ‘GPIO busy’
ha I figured this lil guy would keep my mind busy. I wasnt lying lol
so im going to reinstall the original program start fresh i guess LOL cant figure out how to turn off the app
Damn you chat gpt lololol
Maybe you didn’t connect the wires correctly? Or maybe you didn’t install some other components? Also, I can’t seem to find your video. Did you forget to attach it? If the problem continues you should contact the moderator or email me the video, I’ll see what I can do. (maximsun28alt@gmail.com)
Thank you for providing the error log.
The core issue, as seen in the log, is a “GPIO busy” error. This occurred when the system tried to access the MCURST pin (likely GPIO5 / BOARD29) during PiDog’s initialization, but the pin was already occupied by another process.
Here is our recommended troubleshooting procedure:
Step 1: Initial Troubleshooting
Reboot your system. This will clear any temporary processes that might be using the GPIO pin.
After rebooting, run your target script immediately, before starting any other programs that might use the GPIO.
Step 2: Reinstall the System & Libraries (if the issue persists)
If the problem continues, we recommend a fresh start. Please reinstall the operating system and then carefully follow the official tutorial to install all libraries in the specified order.
The installation commands are as follows:
https://docs.sunfounder.com/projects/pidog/en/latest/python/python_start/install_all_modules.html
Install robot-hat module:
cd ~/
git clone -b 2.5.x https://github.com/sunfounder/robot-hat.git --depth 1
cd robot-hat
sudo python3 install.py
Install vilib module:
cd ~/
git clone https://github.com/sunfounder/vilib.git
cd vilib
sudo python3 install.py
Install pidog module:
cd ~/
git clone https://github.com/sunfounder/pidog.git --depth 1
cd pidog
sudo pip3 install . --break
cd ~/robot-hat
sudo bash i2samp.sh
Please note: We have recently updated the code for these libraries. Following the steps above ensures you have the latest versions, which is crucial for compatibility and stability.
yeah I followed the web pages instructions 3 times and facetrack still has an issue, trying to show a video but the vid is way to big. can the OS im using be the culprit. the code and errors were of me and chat gpt trying to get facetrack to work those were the results.. reinstalled the drivers, etc last night same issue.
Position the PiDog’s camera at the same level as your face, then run the 7_face_track.py example.
You need to access the camera video stream in your browser, for example:
http://192.168.18.159:9000/mjpg
Create a sound by clapping your hands or using other methods. The sound direction sensor will detect the sound source, and PiDog’s head will turn toward it. If the camera detects a face in that direction, it will greet you.
If a face is already within the camera’s view and move slowly,PiDog’s camera will track and follow the face’s movement.
Sorry we couldn’t identify any specific issue from the given video.
I will give it another over haul tonight.. Fresh OS .. STAY TUNED!
Hi, I’m not sure if this is the right place for my question, but I’m also having problems with facial recognition. When I start the script, Pidog moves its head searching for the sound, but the camera isn’t transmitting. I’m using Pidog v2 with a Raspberry Pi 4.
Imgshow start …
Web display on:
http://192.168.0.231:9000/mjpg
Starting web streaming …
-
Serving Flask app ‘vilib.vilib’
-
Debug mode: off
Could you please confirm if your camera module is correctly connected?
Please double-check the connections against our wiring diagram.
Once you’ve verified the camera connections, run the example and visit http://192.168.0.231:9000/mjpg in your browser to see if the camera feed displays properly.
Please ensure all your library code is updated to the latest version. We recommend reinstalling all libraries before running the example again.
Hi, the connections were correct; once the libraries were installed, it works perfectly. Thanks.
so I did as you asked FRESH os all mods installed. camera is working fine but still no face track just moves head side to side!
does every ones speak sound like this? im wondering if the issue is with the pi5 after receiving a robot hat 5 which wasn’t properly soldered. hmmm when pidog uses face track does his head move left to right? not neck .. if any one can answer would be super helpful
Could you please send a short video or some pictures of the issue so we can know it better.
If the video memory is large, please upload the recorded video to onedrive, share the video link with us, and give us access permissions.
The video you provided earlier does not clearly show the issue.
You also mentioned receiving a Robot HAT 5 that might have soldering issues?
Please provide clear photos of the Robot HAT 5 for us to review.
We have verified the software code, and it is working correctly. Therefore, the problem you’re encountering is likely unrelated to the software.
Please ensure you have installed all library codes correctly. We used the latest Raspberry Pi OS Trixie (64-bit) for our installation and testing.
ive been emailing sunfounder as well i was under the impression you were getting the longer videos
You mentioned that the GPIO header pins on the Robot HAT might not be soldered properly?
Could you please provide a clear photo for us to check?




