diff --git a/README.md b/README.md index 2dcfbb3..f3302be 100755 --- a/README.md +++ b/README.md @@ -4,11 +4,10 @@ It's intended to simplify development for [Fleet] and The Autonomy developers. The system can be used by docker compose stored at the git root of this repository. -There are multiple containers +There are multiple containers: - VerneMQ MQTT broker (bringauto/vernemq) -- Virtual Vehicle Utility - Mission module client implementation (it connects to Module Gateway and simulates a Mission - module's autonomy device) +- Virtual Vehicle - Mission module client implementation (it connects to Module Gateway and simulates a Mission module's autonomy device) - Virtual PLC - IO module client - Module Gateway - cpp implementation of Module Gateway with Mission, IO and example module support - External server - server implementation with Mission, IO and example module support @@ -16,7 +15,23 @@ There are multiple containers - Integration layer - a bridge between the HTTP API and the Fleet Management API - Fleet Management API - an API that handles creating orders for cars and displaying their state - Virtual Fleet Management - application simulating Fleet Management. It creates orders for cars. -- PostgreSQL database - storage of the HTTP API api keys and the messages sent via the API +- PostgreSQL database - storage of the HTTP API keys and the messages sent via the API +- Mission Module Display Tool - a simple web server to display the positions of vehicles on a map + +## Container Repositories + +Below are the links to the repositories of the containers. Most of the containers are public on GitHub, but some are private. + +- [VerneMQ docker repository](https://github.com/bringauto/vernemq-docker) +- [VerneMQ repository](https://github.com/bringauto/vernemq) +- [Virtual Vehicle repository](https://github.com/bringauto/virtual-vehicle) +- [Virtual PLC repository](https://gitlab.bringauto.com/bring-auto/hardware/firmware/virtual-plc-arduino-opta) +- [Module Gateway repository](https://github.com/bringauto/module-gateway) +- [External Server repository](https://github.com/bringauto/external-server) +- [HTTP API repository](https://github.com/bringauto/fleet-protocol-http-api) +- [Fleet Management API repository](https://github.com/bringauto/fleet-management-http-client-go) +- [Virtual Fleet Management repository](https://github.com/bringauto/virtual-fleet-management) +- [Mission Module Display Tool repository](https://github.com/bringauto/mission-module-display-tool) ## Fleet Protocol @@ -46,18 +61,29 @@ To use Fleet Protocol v1, use the latest v1 release on [GitHub](https://github.c Docker compose file has multiple profiles so the developer can disable/enable parts of the system he needs -- all - start all containers including MQTT, virtual vehicle, daemon, and virtual fleet -- without-module-gateway - do not start Module Gateway -- without-external-server - do not start External Server -- without-devices - do not start internal clients -- without-fleet-management - do not start Virtual Fleet Management -- core - start only internal clients and Module Gateway -- virtual-vehicle-utility - start only Virtual Vehicle Utility -- virtual-plc - start only Virtual PLC -- mqtt - start only MQTT vernemq broker -- module-gateway - start only Module Gateway -- http-api - start fleet protocol HTTP API server and the related PostgreSQL database -- for-virtual-fleet - start fleet protocol HTTP API server, the related PostgreSQL database, fleet management integration layer, virtual fleet management, fleet management HTTP API server and mission module display tool +### Docker compose profiles + +#### Profiles that start logical groups of containers + +- **all** - start all containers +- **for-virtual-fleet** - start the fleet protocol HTTP API server, the related PostgreSQL database, the fleet management integration layer, virtual fleet management, the fleet management HTTP API server and the mission module display tool +- **core** - start only internal clients and Module Gateway +- **http-api** - start fleet protocol HTTP API server and the related PostgreSQL database + +#### Profiles that start all containers except the ones specified + +- **without-module-gateway** - do not start Module Gateway +- **without-external-server** - do not start External Server +- **without-devices** - do not start internal clients +- **without-fleet-management** - do not start Virtual Fleet Management + +#### Profiles that start only one container + +- **virtual-vehicle** - start only the Virtual Vehicle +- **virtual-plc** - start only the Virtual PLC +- **mqtt** - start only the MQTT vernemq broker +- **module-gateway** - start only the Module Gateway +- **external-server** - start only the External Server Now you can run `docker compose --profile up` where `profile` is the name of the profile above. diff --git a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle/scenario.json b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle/scenario.json index 15cbf13..89b563f 100644 --- a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle/scenario.json +++ b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle/scenario.json @@ -8,12 +8,15 @@ "stops": [ { "name": "Svatopluka Čecha A" + }, + { + "name": "Těšínská" } ], "route": "Moravské náměstí 2" }, { - "delay_seconds": 80, + "delay_seconds": 220, "name": "mission2", "stops": [ { @@ -32,7 +35,7 @@ "route": "Roundabout long" }, { - "delay_seconds": 240, + "delay_seconds": 260, "name": "mission3", "stops": [ { diff --git a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_1/scenario1.json b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_1/scenario1.json index 7581aa7..89b563f 100644 --- a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_1/scenario1.json +++ b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_1/scenario1.json @@ -8,12 +8,15 @@ "stops": [ { "name": "Svatopluka Čecha A" + }, + { + "name": "Těšínská" } ], "route": "Moravské náměstí 2" }, { - "delay_seconds": 10, + "delay_seconds": 220, "name": "mission2", "stops": [ { @@ -32,7 +35,7 @@ "route": "Roundabout long" }, { - "delay_seconds": 20, + "delay_seconds": 260, "name": "mission3", "stops": [ { diff --git a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_2/scenario1.json b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_2/scenario1.json index 0dbecca..b2daa9c 100644 --- a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_2/scenario1.json +++ b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_2/scenario1.json @@ -3,17 +3,20 @@ "starting_station": "Těšínská", "missions": [ { - "delay_seconds": 10, + "delay_seconds": 0, "name": "mission1", "stops": [ { "name": "Svatopluka Čecha A" + }, + { + "name": "Těšínská" } ], "route": "Moravské náměstí 2" }, { - "delay_seconds": 30, + "delay_seconds": 220, "name": "mission2", "stops": [ { diff --git a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_3/scenario1.json b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_3/scenario1.json index c3675a1..9ad3a5a 100644 --- a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_3/scenario1.json +++ b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_3/scenario1.json @@ -3,17 +3,20 @@ "starting_station": "Těšínská", "missions": [ { - "delay_seconds": 10, + "delay_seconds": 0, "name": "mission1", "stops": [ { "name": "Svatopluka Čecha A" + }, + { + "name": "Těšínská" } ], "route": "Moravské náměstí 2" }, { - "delay_seconds": 20, + "delay_seconds": 260, "name": "mission3", "stops": [ { diff --git a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_4/scenario1.json b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_4/scenario1.json index d17ccc0..530e3a0 100644 --- a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_4/scenario1.json +++ b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_4/scenario1.json @@ -3,7 +3,7 @@ "starting_station": "Těšínská", "missions": [ { - "delay_seconds": 20, + "delay_seconds": 0, "name": "mission2", "stops": [ { @@ -22,7 +22,7 @@ "route": "Roundabout long" }, { - "delay_seconds": 10, + "delay_seconds": 260, "name": "mission3", "stops": [ { diff --git a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_5/scenario1.json b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_5/scenario1.json index 5e4fe05..ff4d0b8 100644 --- a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_5/scenario1.json +++ b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_5/scenario1.json @@ -3,11 +3,14 @@ "starting_station": "Těšínská", "missions": [ { - "delay_seconds": 10, + "delay_seconds": 0, "name": "mission1", "stops": [ { "name": "Svatopluka Čecha A" + }, + { + "name": "Těšínská" } ], "route": "Moravské náměstí 2" diff --git a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_6/scenario1.json b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_6/scenario1.json index c18255e..65fe50a 100644 --- a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_6/scenario1.json +++ b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_6/scenario1.json @@ -3,7 +3,7 @@ "starting_station": "Těšínská", "missions": [ { - "delay_seconds": 10, + "delay_seconds": 0, "name": "mission3", "stops": [ { diff --git a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_7/scenario1.json b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_7/scenario1.json index d6c37b3..34ae6ab 100644 --- a/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_7/scenario1.json +++ b/configuration/virtual-fleet-management/scenarios/default/virtual_vehicle_7/scenario1.json @@ -3,7 +3,7 @@ "starting_station": "Těšínská", "missions": [ { - "delay_seconds": 10, + "delay_seconds": 0, "name": "mission2", "stops": [ { diff --git a/configuration/virtual-vehicle-utility/config.json b/configuration/virtual-vehicle-utility/config.json index dae24a6..c70c162 100644 --- a/configuration/virtual-vehicle-utility/config.json +++ b/configuration/virtual-vehicle-utility/config.json @@ -18,7 +18,7 @@ "simulation-settings": { "speed-override": true, "speed-override-mps": 5, - "wait-at-stop-s": 30 + "wait-at-stop-s": 10 } }, "fleet-settings": { diff --git a/docker-compose.yml b/docker-compose.yml index 96fe6f5..9282b7d 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ version: '3' services: - virtual-vehicle-utility: - image: bringauto/virtual-vehicle-utility:v3.1.4 - profiles: ["all", "without-module-gateway", "without-external-server", "core", "virtual-vehicle-utility", "without-fleet-management"] + virtual-vehicle: + image: bringauto/virtual-vehicle:v3.1.6 + profiles: ["all", "without-module-gateway", "without-external-server", "core", "virtual-vehicle", "without-fleet-management"] volumes: - ./docker_volumes/virtual-vehicle-utility:/virtual-vehicle-utility/log - ./configuration/virtual-vehicle-utility:/virtual-vehicle-utility/config @@ -54,7 +54,7 @@ services: external-server: image: bringauto/external-server:v1.1.9 - profiles: ["all", "without-devices", "without-module-gateway", "without-fleet-management"] + profiles: ["all", "without-devices", "without-module-gateway", "without-fleet-management", "external_server"] volumes: - ./docker_volumes/external-server:/home/bringauto/log - ./configuration/external-server:/home/bringauto/config/ @@ -67,7 +67,7 @@ services: http-api: image: bringauto/fleet-protocol-http-api:v2.4.2 - profiles: ["all", "without-devices", "without-module-gateway", "http-api", "without-fleet-management", "for-virtual-fleet"] + profiles: ["all", "without-devices", "without-module-gateway", "without-external-server", "http-api", "without-fleet-management", "for-virtual-fleet"] ports: - 8080:8080 restart: "no" @@ -85,7 +85,7 @@ services: integration-layer: image: bringauto/fleet-management-integration-layer:v2.0.2 - profiles: ["all", "without-devices", "without-module-gateway", "without-fleet-management", "for-virtual-fleet"] + profiles: ["all", "without-devices", "without-module-gateway", "without-external-server", "without-fleet-management", "for-virtual-fleet"] restart: "no" networks: - bring-emulator @@ -97,7 +97,7 @@ services: management-api: image: bringauto/fleet-management-http-api:v3.1.6 - profiles: ["all", "without-devices", "without-module-gateway", "management-api", "without-fleet-management", "for-virtual-fleet"] + profiles: ["all", "without-devices", "without-module-gateway", "without-external-server", "management-api", "without-fleet-management", "for-virtual-fleet"] ports: - 8081:8081 restart: "no" @@ -115,7 +115,7 @@ services: virtual-fleet-management: image: bringauto/virtual-fleet-management:v3.0.1 - profiles: ["all", "without-devices", "without-module-gateway", "for-virtual-fleet"] + profiles: ["all", "without-devices", "without-module-gateway", "without-external-server", "for-virtual-fleet"] restart: "no" depends_on: management-api: @@ -133,7 +133,7 @@ services: postgresql-database: image: postgres:16 - profiles: ["all", "without-devices", "without-module-gateway", "http-api", "management-api", "without-fleet-management", "for-virtual-fleet"] + profiles: ["all", "without-devices", "without-module-gateway", "without-external-server", "http-api", "management-api", "without-fleet-management", "for-virtual-fleet"] environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: 1234 @@ -149,7 +149,7 @@ services: mission_module_display_tool: image: bringauto/mission-module-display-tool:v1.0.0 - profiles: ["all", "without-devices", "without-module-gateway", "without-fleet-management", "for-virtual-fleet"] + profiles: ["all", "without-devices", "without-module-gateway", "without-external-server", "without-fleet-management", "for-virtual-fleet", ] restart: "no" ports: - 5000:5000