Raspberry Pi 5 + Prophesee GenX320

From RidgeRun Developer Wiki

Follow Us On Twitter LinkedIn Email Share this page


Raspberry Pi 5 + Prophesee GenX320

The starter kit features Prophesee’s GenX320 event-based vision sensor. It is designed to connect to the Raspberry Pi 5 via the camera connector using a MIPI interface.

The kit comprises the Prophesee GenX320 sensor and a compact, mounted event-based camera module with a MIPI CSI-2 interface that connects directly to Raspberry Pi 5. Each kit ships with a mini tripod.

Two GenX320 packaging options are available:

  • M12 mount, FOV 76° lens
  • M6 mount, FOV 104° lens
GenX320 M12 (76°) and M6 (104°) lens setups on Raspberry Pi 5 [1]

Although the optics and packaging differ between the two models, the installation instructions are identical for both variants.

Hardware Setup

Required Hardware

Only for first boot

  • Display
  • Micro-HDMI-to-HDMI cable
  • Keyboard
  • Mouse

Setup

When connecting the starter kit to the Raspberry Pi camera connector, ensure the flex cable is correctly oriented as shown in the image below, and do not power on the system yet.

GenX320 to Raspberry Pi 5 connection via MIPI flex cable [2]

The system should remain powered off until the operating system image has been configured.

Software Installation

There are two methods to install the required software:

  • Method 1: Installation using the custom Linux image provided by Prophesee
  • Method 2: Installation from source code

Step 1: Install and Launch Raspberry Pi Imager

Download the Raspberry Pi Imager to your computer.

To install it on Raspberry Pi OS, open a terminal and run:

sudo apt install rpi-imager

Once installed, launch the application.

Step 2: Write the Image to a microSD Card

  1. In the Device tab, select Raspberry Pi 5 from the list.
  2. In the OS tab, choose one of the following options:
    • Method 1: Download Prophesee’s custom Linux image (based on Raspberry Pi OS Bookworm, including pre-installed sensor drivers and OpenEB). Select Use Custom and choose the downloaded image.
    • Method 2: Select the standard Raspberry Pi OS (64-bit) image (Debian-based with Raspberry Pi Desktop).
  3. Insert the microSD card into your computer using an SD card reader.
  4. In the Storage tab, select the microSD card.
  5. Click Next.

You will be prompted to confirm the deletion of all existing data on the card. Accept to proceed. The image writing process may take several minutes.

Once completed:

  • Remove the microSD card from the reader
  • Insert it into the Raspberry Pi
  • Power on the device

Step 3: First Boot Configuration

On first boot, complete the initial setup:

  • Set your country, language, time zone, and keyboard layout
  • Create a username and password
  • Connect to a Wi-Fi network
  • Choose your preferred browser (Firefox or Chromium)

Important: Do not update the operating system or software during this step. Skip any update prompts.

Installation from Source Code

The following steps apply only if you installed the software from source code.

Clone and Install the Sensor Driver

Start your Raspberry Pi and open a terminal.

Clone the RPi sensor driver repository and navigate into it:

git clone https://github.com/prophesee-ai/rpi-sensor-drivers
cd rpi-sensor-drivers

Install the software by following the instructions provided in the repository's README file. This process includes installing OpenEB with a required patch.

Note: The instructions are designed for Raspberry Pi OS Bookworm. If you are using Raspberry Pi OS Trixie, make sure to install the following dependency:

sudo apt install libcanberra-gtk3-module

After installation, reload the system libraries:

sudo ldconfig
Configure Environment Variables

To ensure proper operation, configure the required environment variables.

You can set them temporarily in the current session or make them persistent by adding them to your ~/.bashrc file.

To make them persistent:

1. Open the bash configuration file:

nano ~/.bashrc

2. Add the following lines at the end of the file:

# Prophesee / OpenEB environment variables
export PSEE_VAR_V4L2_BSIZE=1
export V4L2_HEAP=vidbuf_cached

3. Save the file and exit the editor.

4. Apply the changes to the current session without rebooting:

source ~/.bashrc

Running Basic Examples

Data Streaming

First, prepare your system to load the sensor driver and configure the required formats.

Load the Sensor Driver

Load the device tree overlay for both camera slots (you may also add this to your boot configuration for persistence):

sudo dtoverlay genx320
sudo dtoverlay genx320,cam0

Configure V4L Parameters

Set up additional parameters for V4L:

  • Method 1:
./rp5_setup_v4l.sh
  • Method 2:
./rpi-sensor-drivers/rp5_setup_v4l.sh

Run OpenEB Applications

Once the setup is complete, you are ready to run OpenEB applications, tools, and compile sample programs.

For example, you can launch the Metavision Viewer to visualize, record, and replay event-based data:

metavision_viewer

For more advanced use cases, Prophesee provides a set of sample applications and demos within the Metavision SDK that demonstrate how to acquire, process, and visualize event-based data.

Instructions on how to compile and run the C++ code samples are available in the official documentation.

Data Recording and Replay

You can display the full list of available command-line options with:

metavision_viewer -h

To record data:

metavision_viewer -o <filename>

For example:

metavision_viewer -o test.raw

Press the space bar to start recording, and press it again to stop.

To replay recorded data:

metavision_viewer -i <filename>

Development with Metavision SDK

To start developing applications with the Metavision SDK, refer to the following API guides:

To work with the Python API and run Python code samples, you will need to install Python along with additional libraries.