- Start the docker container:
docker compose up -d
# or through Docker Desktop- Start our own python "bridge":
- From inside the dir
bridge/- Create python virtual environment (First time only)
python3 -m venv venv
- Activate virtual environment
- Linux/Mac
source venv/bin/activate - Windows
./venv/Scripts/Activate.ps1
- Linux/Mac
- Install python packages
pip install -r requirements.txt
- Start python program
python3 main.py
- Create python virtual environment (First time only)
- Start mazerun program:
- On a separate window start the mazerun executable with this flags. Once inside the dir where the program is, do:
- Windows
.\mazerun.exe 25 --flagMessage 1 --delay 2 --broker broker.hivemq.com --portbroker 1883 - Mac
- Once inside the dir where the program is:
??? something similar to windows ???
- Once inside the dir where the program is:
- Windows
In the future you may want to change up the flags read more here.
- Extra: visualize databases:
- If you want to check the mongo DB try installing MongoDB Compass
Mysql is not ready yet, but when time comes there will be a docker container for it, so no need to install phpMyAdmin or others
This repo does not contain the executables for mazerun but they can be found here:
-
Python Server (mazerun.exe)
-
Monitor Graphs
It is recommended to follow the following directory structure.
/server and /analytics directories will and should not be tracked by git
mazerun/
├─ README.md
├─ config.yaml
├─ docker-compose.yml
│
├─ server/ # Recommended: place for main exec
│ ├─ \_internals/
│ └─ mazerun.exe
│
├─ analytics/ # Recommended: place for graph execs
│ ├─ \_internals/
│ ├─ monitmaze.exe
│ ├─ monitsound.exe
│ ├─ monittemp.exe
│ └─ marsupilami_icon.png
│
└─ bridge/* # Python programs to move data
-
Make sure all this are running at the same time:
- docker containers
- use
docker psand check if containers are up
- use
- bridge/main.py
- mazerun.exe (with the correct flags)
- docker containers
-
Errors somewhere in
bridge/**?- Make sure you do
./venv/bin/activate.ps1on Windows orsource venv/bin/activate/on Linux/Mac, this activates the python virtual environment - Once in the python virtual environment, make sure you do
pip install -r requirements.txt, this install all required packages - Check if bridge/config.yaml contains same info as your mazerun flags and docker-compose.yaml
- Make sure you do
-
Network / MQTT
- Internet must work
- Try switching the broker (check online for other brokers)
- Explaining Flags for mazerun.exe:
- 25 -> number of our group
- flagMessage is used to selected what you want to see:
- 1 -> sound, temp, movements, actuators
- 2 -> movements
- 3 -> sound
- 4 -> temp
- 5 -> actuators
- delay -> time between movements
- broker -> broker used for communication
- portbroker -> broker port used
Example:
25 --flagMessage 1 --delay 2 --broker broker.hivemq.com --portbroker 1883
