fredericve / openmower-gui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenMower GUI

A GUI for the OpenMower project.

Demo

https://youtu.be/x45rdy4czQ0

Installation

mowgli-docker

If you are using mowgli-docker, you can skip this part as it's now included in the docker-compose file.

OpenMowerOS

OpenMowerOS uses podman and containers are managed by systemd.

Create a gui.service file in /etc/systemd/system/ with the following content:

[Unit]
Description=Podman container - gui.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target NetworkManager.service
StartLimitInterval=120
StartLimitBurst=10

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Type=forking
Restart=always
RestartSec=15s
TimeoutStartSec=1h
TimeoutStopSec=120s

ExecStartPre=/bin/rm -f %t/container-gui.pid %t/container-gui.ctr-id

ExecStart=/usr/bin/podman run --conmon-pidfile %t/container-gui.pid --cidfile %t/container-gui.ctr-id --cgroups=no-conmon \
  --replace --detach --tty --privileged \
  --name openmower-gui \
  --network=host \
  --env MOWER_CONFIG_FILE=/config/mower_config.sh \
  --env DOCKER_HOST=unix:///run/podman/podman.sock \
  --env ROS_MASTER_URI=http://localhost:11311 \
  --volume /dev:/dev \
  --volume /run/podman/podman.sock:/run/podman/podman.sock \
  --volume /boot/openmower/mower_config.txt:/config/mower_config.sh \
  --label io.containers.autoupdate=registry \
  ghcr.io/cedbossneo/openmower-gui:master

#ExecStartPost=/usr/bin/podman image prune --all --force

ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-gui.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore --force --cidfile %t/container-gui.ctr-id
PIDFile=%t/container-gui.pid

[Install]
WantedBy=multi-user.target default.target

Then enable and start the service:

sudo systemctl enable gui.service
sudo systemctl start gui.service

Docker-compose

Adjust the docker-compose file to your needs and run:

docker-compose up -d

Usage

Once the container is running, you can access the GUI by opening a browser and going to http://<ip of the machine running the container>:4006

About


Languages

Language:TypeScript 66.5%Language:Go 25.8%Language:C 4.0%Language:Shell 1.4%Language:Python 1.2%Language:Dockerfile 0.6%Language:JavaScript 0.3%Language:HTML 0.3%