Raspberry Pi Based Robot: OS Install

At time of writing (July 2023), the current Rapsberry Pi OS is Bullseye. This is instructions on how to install the necessary OS and 3rd party packages to run the Team PiDrogen robot system on that operating system. Thankfully, the installation of OpenCV with Python bindings is now achieved with a single command.

These instructions were checked in July 2023 with a fresh install of Raspberry Pi OS Bullseye (64-bit).

  1. Use Raspberry Pi Imager. Select the required OS, configure the WiFi, hostname, locale options and enable SSH before writing the SD card.
  2. Boot the RPi, then SSH in.
  3. Use sudo raspi-config.
    Under Interface Options enable Legacy Camera support.
    Under Interface Options enable the serial port, disable the login shell, enable the serial hardware.
    Under Advanced Options use Expand File System.
    Reboot to enable changes.
  4. Run sudo apt update
  5. Run sudo apt install python3-opencv. This can be tested with:
    python -c “import cv2; print(cv2.__version__)”
    This yields OpenCV version 4.5.1 at time of writing.