To set up the camera processor for the first time, proceed with the following.
pip install -r requirements.txt
python -m venv venvvenv\scripts\activate.batpip install -r requirements.txtagain
To set up the camera processor for the first time, proceed with the following.
pip install -r requirements.txt
python3 -m venv {chosen name of venv}source {chosen name of venv}/bin/activatepip install -r requirements.txtagain
- Ensure you're in the virtual environment
- Ensure you have docker installed and running on your machine
docker compose up --build- Ensure that the simulation is running
- Open a new terminal and navigate to hivemind directory. Enter hivemind venv.
- In the hivemind venv
python3 main.py(Mac) OR py main.py(Windows)- In camera processor venv
python3 cam_processor.py {camera number, starts at 0} -d(Mac) OR py cam_processor.py {camera number, starts at 0} -d(Windows)- Examples:
python3 cam_processor.py 0 -d,py cam_processor.py 0 -d - Note: The command may be
pythonrather thanpy
- Examples:
- Ensure that the simulation is running
- Ensure Camera Processor is running (See above)
- Ensure you're in a seperate hivemind virtual environment
python3 hivemind.py(Mac) ORpy hivemind.py(Windows)- Note: The command may be
pythonrather thanpy
- Note: The command may be
- POST
/world/init: one-time request from Unity. Responds with cop and camera IDs?
{
'map': ??,
'cops': {},
'cameras': {}
}- POST
/camera/<camera_id>: request processing camera image with YOLO.
{
'position': [f, f, f],
'rotation': [f, f, f, f],
'fov': f,
'image': str
}- POST
/world/robber_report: report initial robber sigthing.
{
'location': ??,
'timestamp': f,
'prefab_id': ??
}- GET
/world/dispatch/<cop_id>: receive dispatch directions.