This tool is used to display the positions of the cars on the map using the fleet protocol HTTP API.
git clone https://github.com/bringauto/mission-module-display-tool.git
cd mission-module-display-tool
mkdir logs
pip install -r requirements.txt--config=<string>- path to the JSON configuration file. If not set, the default path./config/config.jsonis used.
api-url- URL of the fleet protocol HTTP API.api-key- API key for the fleet protocol HTTP API.port- port on which the web server will run.
Starting the tool with the default configuration:
python3 display-tool.pyStarting the tool with a custom configuration:
python3 display-tool.py --config=./config/config.jsonIt will start web server on http://localhost:5000/ and display the map with the cars.
docker build -t mission-module-display-tool .Replace <network> with the name of the container network where the HTTP API is running.
docker run -p 5000:5000 --network=<network> mission-module-display-tool --config=config/config-docker.jsonIf option --config is not set, the default configuration file config/config-docker.json is used.
Example for use with bringauto/etna
To use the mission-module-display-tool with the bringauto/etna project, you can run the following commands:
docker build -t mission-module-display-tool .docker run -p 5000:5000 --network=bring-emulator mission-module-display-tool --config=config/config-docker.jsonIn this example, the network is set to bring-emulator, which is the network name used by the bringauto/etna project docker compose file.