Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backend: Resolve incompatibilities between the Python backend and the Raspberry Pi 5 #323

Open
1 of 2 tasks
Tracked by #322
ethanjli opened this issue Dec 31, 2023 · 3 comments
Open
1 of 2 tasks
Tracked by #322
Assignees

Comments

@ethanjli
Copy link
Member

ethanjli commented Dec 31, 2023

Motivation

Currently, the Python hardware controller is unable to run on the Raspberry Pi 5 - it depends on the rpi-gpio package, which does not work on the Raspberry Pi 5 (see https://adafruit-playground.com/u/MakerMelissa/pages/comparing-libgpiod-and-gpiozero-speeds-on-the-raspberry-pi-5 for details). Additionally, the Python segmenter depends on scikit-image and opencv-contrib-python-headless, which do not have any available piwheel (i.e. armv7l) builds on bookworm.

Goals

  • Make the Python hardware controller able to run on the Raspberry Pi 5, ideally with the 64-bit version of the Raspberry Pi OS
  • Make the Python segmenter able to run on the Raspberry Pi 5, ideally with the 64-bit version of the Raspberry Pi OS
  • If possible, maintain compatibility with the last 32-bit version of Raspberry Pi OS 11 (bullseye), which was the base for PlanktoScope software v2023.9.0

Steps

Unresolved Questions

Implementation History

@ethanjli ethanjli added this to the Backlog milestone Dec 31, 2023
@ethanjli ethanjli changed the title backend/controller: Resolve incompatibilities between the Python backend and the Raspberry Pi 5 backend: Resolve incompatibilities between the Python backend and the Raspberry Pi 5 Dec 31, 2023
@ethanjli
Copy link
Member Author

ethanjli commented Feb 1, 2024

It might be possible to containerize the Python hardware controller using https://github.com/dtcooper/raspberrypi-os-docker as a base image, but I'm not sure whether this would specifically solve the rpi-gpio problem since the difference between the Pi 4 and the Pi 5 is a different memory mapping for GPIO.

@ethanjli
Copy link
Member Author

ethanjli commented Mar 28, 2024

RPi5-compatible alternatives to rpi-gpio include:

@ethanjli
Copy link
Member Author

ethanjli commented Apr 4, 2024

@Oumayma-hy As we rewrite the Python hardware controller, let's try to do it in a way that reduces the amount of additional work needed to make it compatible with the Raspberry Pi 5, i.e. by only using Python packages which other people have found to work on the Raspberry Pi 5. Probably 80% of this is just a matter of switching from the rpi-gpio library to the gpiod library (if that library is fine) or else the gpiozero library (if gpiod really does not meet our needs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Plan needed
Development

No branches or pull requests

3 participants