Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion os/forklift/forklift-pallet-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a4ec796
3776e964ba612ea88edb9afc92969c165735afff
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[Unit]
Description=Run the PlanktoScope segmenter
# Wait for Forklift to bring up mosquitto, in case the segmenter needs to start after mosquitto
Wants=forklift-apply.service
After=forklift-apply.service
# Start after Node-RED so that Node-RED can catch all MQTT messages emitted at startup
After=nodered.service

[Service]
Type=simple
Environment=HOME=/home/pi
Environment=SEGMENTER_PIPELINE_SUBTRACT_CONSECUTIVE_MASKS=true
WorkingDirectory=/home/pi/PlanktoScope/segmenter
ExecStart=/home/pi/.local/bin/poetry run python -u main.py
User=pi
Group=pi

[Install]
WantedBy=multi-user.target
9 changes: 8 additions & 1 deletion os/python-hardware-controller/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@ pipx install poetry==2.1.3
pipx ensurepath
PATH="$PATH:/home/pi/.local/bin"

# Set up the hardware controllers
# Set up the hardware controller
sudo -E apt-get install -y --no-install-recommends -o Dpkg::Progress-Fancy=0 \
i2c-tools libopenjp2-7 python3-picamera2
poetry --directory "$HOME/PlanktoScope/controller" install \
--compile
file="/etc/systemd/system/planktoscope-org.controller.service"
sudo cp "$config_files_root$file" "$file"
sudo systemctl enable "planktoscope-org.controller.service"

# Set up the segmenter
poetry --directory "$HOME/PlanktoScope/segmenter" install \
--compile
file="/etc/systemd/system/planktoscope-org.segmenter.service"
sudo cp "$config_files_root$file" "$file"
sudo systemctl enable "planktoscope-org.segmenter.service"
9 changes: 3 additions & 6 deletions segmenter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ Install all dependencies including development tooling:
poetry install --with dev
```

Start controller for development:
Start segmenter for development:

```sh
docker ps
# copy the container id of the segmenter
docker stop <container-id>

sudo systemctl stop planktoscope-org.segmenter.service
poetry run python -u main.py
# make changes and restart
```
Expand All @@ -51,7 +48,7 @@ We recommand using [https://code.visualstudio.com/docs/remote/ssh](https://code.

To use this project, you'll need:

- Python >= 3.9
- Python >= 3.11.2
- Poetry 2.1.3

## Licensing
Expand Down
3 changes: 0 additions & 3 deletions segmenter/apt-packages
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# numpy/scipy dependencies
libatomic1

# opencv dependencies
libopenjp2-7
libavcodec59
Expand Down
Loading