hermes_vision wraps OpenCV YuNet (Haar fallback) as a plain module plus a node that publishes /vision/faces as vision_msgs/Detection2DArray. It replaces the standalone detect_faces.py. pi/robot-env.sh puts the Raspberry Pi libcamera fork ahead of ROS's own copy, the venv's OpenCV 4.10 ahead of the apt one, and fixes the ROS domain and subnet-only discovery. camera_ros 0.7.0 now runs against the fork and publishes raw and compressed images. The stock wm8960-soundcard overlay fails on Ubuntu 24.04 with "No MCLK configured": it hangs the clock on the sound card's codec link, but the codec driver reads mclk from its own node. hermes-wm8960.dts adds it there, and capture opens at 8-48 kHz. The microphones still read digital zeros; see CONTEXT.md for what has been ruled out. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFN8nRRCiDiMN7ChBpHJhs
22 lines
1.0 KiB
Bash
Executable File
22 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# BrainCraft HAT audio (HANDOFF package 1): our WM8960 overlay (pi/overlays/hermes-wm8960.dts: the
|
|
# stock wm8960-soundcard plus the clock on the codec node, which Ubuntu's driver needs), with the
|
|
# Pi's own headphone audio off (it shares PWM hardware with the servos). Run as root. Re-runnable.
|
|
# Needs a reboot afterwards.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
command -v dtc >/dev/null || apt-get -y install device-tree-compiler
|
|
dtc -@ -I dts -O dtb -o /boot/firmware/overlays/hermes-wm8960.dtbo overlays/hermes-wm8960.dts
|
|
|
|
cfg=/boot/firmware/config.txt
|
|
[ -e "$cfg.bak-audio" ] || cp "$cfg" "$cfg.bak-audio"
|
|
sed -i 's/^dtparam=audio=on$/dtparam=audio=off/' "$cfg"
|
|
sed -i '/^dtoverlay=wm8960-soundcard$/d' "$cfg"
|
|
if ! grep -qx 'dtoverlay=hermes-wm8960' "$cfg"; then
|
|
# dtparam lines must come before the first dtoverlay, so put this right after vc4-kms-v3d
|
|
sed -i '0,/^dtoverlay=vc4-kms-v3d$/s//dtoverlay=vc4-kms-v3d\ndtoverlay=hermes-wm8960/' "$cfg"
|
|
fi
|
|
grep -nE '^dtparam=audio|^dtoverlay=(hermes-)?wm8960' "$cfg"
|
|
echo "done; reboot to apply"
|