Raspanion should support all versions of the compute module (CM) 4 and 5, although CM5's are not yet tested.
The Raspanion has a micro HDMI output and a USB hub onboard such that if you'd like to avoid headless setup (no monitor, using VNC) that's no problem. VNC is recommended though for convenience.
It also has an SD card slot so you you can choose to either rely on SD cards or pick a model with Flash eMMC. Follow the video guide here to Flash eMMC. For the step where he connects a jumper, instead simply hold the joystick to the right (side with female usb ports) while powering on.
UPDATE: These directions and the GITHUB code base have been updated from Bullseye to Bookworm OS for Raspberry Pi (necessary to support the Hailo-8).
If available use a multimeter to check for shorts between 3.3V, 5 V, 26V, and GND prior to powering on for the first time. It would also be wise if available to first power on with an adjustable power supply rather than a battery.
Step 1: SSH into Your Raspberry Pi
Open a terminal on your computer.
Connect to your Raspberry Pi via SSH:
Example:
ssh 192.168.0.33
Step 2: Edit the Configuration File
Open the config.txt file:
sudo nano /boot/firmware/config.txt
Find the line:
dtoverlay=vc4-kms-v3d
Modify it to:
dtoverlay=vc4-kms-v3d,composite
Save and exit the file:
Press Ctrl+X, then Y, and hit Enter.
Step 3: Switch to X11 (from Wayland)
Run the Raspberry Pi configuration tool:
sudo raspi-config
Navigate to:
Advanced Options
Select Wayland
Choose X11.
Step 4: Reboot Your Raspberry Pi
Restart the Raspberry Pi to apply changes:
sudo reboot
Step 5: Enable VNC
After rebooting, run the configuration tool again:
sudo raspi-config
Navigate to:
Interface Options
Select VNC
Choose Enable.
Step 6: Verify Your Setup
You should now be able to both:
Access the Raspberry Pi’s desktop via VNC.
See the desktop through analog FPV goggles if connected to the composite video out pad on the Raspanion with a VTX attached.
This is what you should see in FPV goggles. Notice the overlays from Ardupilot. You'll see the same thing over VNC on a local computer minus the Ardupilot overlay.
Edit the Configuration File
Open the config.txt file:
sudo nano /boot/firmware/config.txt
Add the following lines:
# Enable I2C interfaces for additional peripherals
dtparam=i2c_arm=on
dtoverlay=i2c4,pins_6_7 # I2C on GPIO pins 6 and 7
dtoverlay=i2c5,pins_10_11 # I2C on GPIO pins 10 and 11
# Set up overlays for ArduCam and IMX519 camera modules
dtoverlay=arducam-pivariety
dtoverlay=imx519
dtoverlay=imx519,cam0
# Set up serial port(s). Bluetooth uses uart0.
enable_uart=1
dtoverlay=disable-bt
dtoverlay=uart0
dtoverlay=uart3
dtoverlay=uart4
dtparam=pciex1_gen=3
Reboot
Follow the instructions on the Hailo-Rpi5-examples github
Start here.
Even though it says this is for Pi5, I have confirmed by testing and by talking to Hailo that the same instructions work on a CM4 running Bookworm with a Raspanion.
Depending on which examples you are trying to run there appears to be a bug that requires finding the code where the camera is initialized and changing the lores (low resolution) format from RGB888 to YUV420. This may not be necessary, but it is the following screenshots may help you find the location of the files that need to be changed.
Follow the instructions on the Hailo-Rpi5-examples github
Requirements for this should be satisfied satisfied from setting up the hailo. This command should display what your camera sees.
libcamera-hello
Step 1: Clone the Raspanion Repository
Open a terminal.
Navigate to the repos folder (or create it if it doesn’t exist) by running:
mkdir -p ~/Repos && cd ~/Repos
Clone the Raspanion repository by running:
git clone https://github.com/Raspanion/Raspanion
Step 2: Configure Serial Port for the Lidar
Open the Raspberry Pi configuration tool by running:
sudo raspi-config
Navigate to Interface Options → Serial Port.
Follow the prompts:
Select No when asked if the login shell should be accessible over serial.
Select Yes to enable the hardware serial port.
Exit the configuration tool and reboot the Raspberry Pi by running:
sudo reboot
Step 3: Check functionality of onboard and connected components; Lidar, Magnetometer, Accelerometer, OLED Display, Joystick, and Servo(s)
Run each of the testing scripts:
python BUTTONS_test.py
Confirm you are able to control the drone using CM4/Raspanion.
Navigate to the Raspanion folder and create and start a virtual environment
python3 -m venv ~/my_mavlink_env
source ~/my_mavlink_env/bin/activate
pip3 install pymavlink
pip install pyserial
SAFETY WARNING: MOTORS WILL SPIN, REMOVE PROPS!!!
When you run the following command the props should rev up assuming UART 4 is properly connected (460800 baud) to a drone running Ardupilot. It should also routinely print state information about the drone.
python basicMavlink.py
Confirm you are able to run basic face tracking. This section is a work in progress but with some luck/skill you may be able to simply run the following command.
pip install pigpio
Repeat the RGB888 to YUV420 change from the Hailo testing step but for hailo_yolov5_personface.json
Navigate to the Raspanion/JV_ground_tests folder
python face_tracking.py
Confirm you are able to run basic monocular depth sensing. This section is also a work in progress but with some luck/skill you may be able to simply run the following command.
Navigate to the Raspanion/JV_ground_tests folder/depth_realtime
./build.sh
./build/realtime_depth_example