Raspberry Pi data collection for the McGrathLab bower-tracking fleet. This is the
tracking-only half of the former CichlidBowerTracking monolith; post-hoc
analysis lives in a separate repo. Both build on cichlid-file-management.
src/cichlid_tracking/
cichlid_tracker.py # CichlidTracker: per-Pi capture + command loop
file_manager.py # FileManager(BowerFileManager): credentials + Pi dirs
cli.py # `cichlid-tracker` entry point
helper_modules/ # log_parser, google_controller (control sheet)
BaseFileManager (cichlid-file-management) cloud I/O, env detection, branch_name
-> BowerFileManager (cichlid-file-management) project + analysis-state dirs
-> FileManager (this repo) credentials + Pi-capture dirs
This package is pip-installable. conda is optional and only for dev machines — the Pi fleet uses pip only.
picamera2 (apt) and pyrealsense2 (built from source) live in the system
Python, so create the virtual environment with access to system packages, then
pip-install:
python3 -m venv --system-site-packages ~/cichlid-env
source ~/cichlid-env/bin/activate
pip install -e ".[pi]" # or: pip install "git+ssh://git@github.com/McGrathLab/cichlid-tracking.git"
venv is Python's built-in environment tool (apt python3-venv) — no conda is
involved. rclone is a separate binary, not a pip package: install it via apt
and configure the Dropbox remote (see the Raspberry Pi setup guide).
If you prefer conda on your workstation:
conda env create -f environment.yml
conda activate cichlid-tracking
The hardware extras ([pi]: picamera2, pyrealsense2) are Pi-only and are not
installed on a dev machine. Runtime dependencies are declared once in
pyproject.toml; both paths pull them from there.
Core port complete: command loop, command dispatch, recording (picamera2 →
direct MP4), depth capture (pyrealsense2), background upload, crash reporting,
and log versioning. LogParser and GoogleController are ported (LogParser
lives in cichlid-file-management, shared with post-hoc analysis).
Remaining:
- Hardware shakeout on a real Pi 4 (picamera2 segment lifecycle, MP4 finalization, power-loss behavior on the day-long file)
- Confirm every Pi has a unique
bt-<tankID>hostname