Getting Started
Python Modules
The game is written in Python and requires a number of Python packages which can be installed via the pip
command in a terminal of your choosing:
- numpy
- paho-mqtt
- adafruit_pca9685
- board
- websocket-client
- OpenCV (v3.4.13): Python Binding is required. Follow this guide on how to build OpenCV Python binding for Raspberry Pi
- picamera: should be installed via
pip install picamera[array]
to be utilized with OpenCV. - blinker
- PyCmdMessenger
- bluepy
Raspberry Pi
Raspberry Pi OS must be configured in order for the used interfaces to work correctly. To do this, open a terminal and enter:
sudo raspi-config
Next use the arrow keys to navigate to Interfacing Options and hit Enter. Here, the following two interfaces must be enabled:
- I2C
- Camera
Usage
- If using a virtual Python environment, make sure to switch to that beforehand. Useful commands are:
source ~/.profile
workon your_environment
- To run in debug mode, use the following command:
python police-chase.py
- To run in a headless mode, use the following command:
python police-chase.py headless