{"id":44332400,"url":"https://github.com/bringauto/virtual-vehicle","last_synced_at":"2026-02-11T10:09:57.515Z","repository":{"id":232352528,"uuid":"784115248","full_name":"bringauto/virtual-vehicle","owner":"bringauto","description":"Virtual Vehicle for Fleet Protocol","archived":false,"fork":false,"pushed_at":"2025-04-14T11:00:14.000Z","size":806,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T11:44:39.137Z","etag":null,"topics":["fleet-protocol"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bringauto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-09T08:05:59.000Z","updated_at":"2025-04-14T10:59:04.000Z","dependencies_parsed_at":"2024-04-15T13:03:56.434Z","dependency_job_id":null,"html_url":"https://github.com/bringauto/virtual-vehicle","commit_stats":null,"previous_names":["bringauto/virtual-vehicle"],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/bringauto/virtual-vehicle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringauto%2Fvirtual-vehicle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringauto%2Fvirtual-vehicle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringauto%2Fvirtual-vehicle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringauto%2Fvirtual-vehicle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bringauto","download_url":"https://codeload.github.com/bringauto/virtual-vehicle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bringauto%2Fvirtual-vehicle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29331747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fleet-protocol"],"created_at":"2026-02-11T10:09:56.806Z","updated_at":"2026-02-11T10:09:57.504Z","avatar_url":"https://github.com/bringauto.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtual Vehicle\n\nVirtual vehicle simulates a robot movement on a map fulfilling orders from Fleet Management.\n\nIt also serves as a backup autonomy. It sends GPS location from a GPS device to Fleet Management.\nIn this case, it doesn't drive but still can fulfill orders, if it is at the target station.\n\n**Functionality:**\n- GPS location reporting\n- Non-trivial set of cars. Each of them has its own route\n- Each car reacts to orders from Fleet Management\n\n**Use cases:**\n- Backup autonomy\n- Testing of Fleet Management\n- Load testing of Fleet Management\n- Presentation purposes\n\n## Prerequisites\n\n* [cxxopts](https://github.com/jarro2783/cxxopts) \u003e= 3.0.0\n* [protobuf](https://github.com/protocolbuffers/protobuf/tree/main/src) = 3.17.3\n* [balogger](https://github.com/bringauto/ba-logger) \u003e= 1.2.0\n* [statesmurf](https://github.com/Melky-Phoe/StateSmurf) \u003e= 2.0.1\n* [modbuspp](https://github.com/bringauto/modbuspp) \u003e= 0.3.1\n\n* [libosmium](https://github.com/osmcode/libosmium) \u003e= 2.17.3\n\n``` bash\n  sudo apt install libosmium2-dev\n```\n\n* [cmlib](https://github.com/cmakelib/cmakelib), need to export CMLIB_DIR\n\n## Arguments\n\n* `--config=\u003cstring\u003e` path to JSON configuration file\n* `--map=\u003cstring\u003e` full path to .osm file containing map\n* `--default-route=\u003cstring\u003e` - name of the route that will be set as default\n* `--module-gateway-ip=\u003cstring\u003e` IPv4 or hostname of ba daemon\n* `--module-gateway-port=\u003cint\u003e` ba daemon port\n* `-h | --help` print help\n* `--wait-at-stop-s=\u003cint\u003e` how many seconds will the car wait in a stop, default is 10s (simulation)\n* `--period-ms=\u003cint\u003e` maximum time period between two status messages sent to Module Gateway\n* `--speed-override=\u003cint\u003e` override map speed\n* `--fleet-provider-type=\u003cstring\u003e` choose fleet provider, `internal-protocol` to use of Internal Fleet Protocol `no-connection`\n  to use of dummy connection\n* `--vehicle-provider-type=\u003cstring\u003e` choose vehicle provider, `simulation` for use of OSM map `gps` for use of GPS provider\n* `--gps-provider-type=\u003cstring\u003e` choose GPS provider, `rutx09` or `ublox`\n* `--rutx-ip=\u003cint\u003e` IP address to Modbus server on rutx09\n* `--rutx-port=\u003cint\u003e` port of Modbus server on rutx09\n* `--rutx-slave-id=\u003cint\u003e` slave id of Modbus server on rutx09\n* `--stop-radius-m=\u003cint\u003e` distance from a stop that will be determined as arrival at the stop\n* `--in-stop-delay-s=\u003cint\u003e` how many seconds will the car wait in a stop, default is 10s (gps)\n\n## Settings\n\nJSON file is used for setting all parameters of the program. Those settings can be overwritten by command line arguments.\nexamples in `./config/*.json`\n\n## general settings\n\n* `period` - the time period between two status messages sent to Module Gateway, int\n\n## logging\n\n### console\n\n* `level` - console logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)\n* `use` - if logs will be printed to console, bool\n\n### file\n\n* `level` - file logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)\n* `use` - if logs will be printed to files, bool\n* `path` - logs will be saved to provided folder, path can be both relative and absolute, string\n\nNote: at least one logging sink needs to be used\n\n## vehicle settings\n\n* `vehicle-provider-type` - vehicle provider, `simulation` for use of OSM map **or** `gps` for use of GPS provider, string\n* `provider-simulation-settings` - simulation provider settings object\n* `provider-gps-settings` - gps provider settings object\n\n### gps provider settings\n\n* `gps-provider-type` - gps provider, `rutx09`, `ublox`, or `map` (serving for testing purposes), string\n* `stop-radius` - distance from a stop that will be determined as arrival to the stop, int\n* `rutx09-settings` - rutx09 settings object\n* `map-settings` - map settings object\n\n#### rutx09 settings\n\n* `rutx-ip` - IP address to Modbus server on rutx09, string\n* `rutx-port` - port of Modbus server on rutx09, int\n* `rutx-slave-id` - slave id of Modbus server on rutx09, int\n\n#### map settings\n* `map` - full path to .osm file containing map, string\n* `default-route` - the name of the route that will be set as default, string\n\n### simulation provider settings\n\n* `speed-override` - override map speed enable, bool\n* `map-override-mps` - override map speed, int\n* `wait-at-stop` - how many seconds will car wait in stop, int\n* `map` - full path to .osm file containing map, string\n* `default-route` - the name of the route that will be set as default, string\n\n## Fleet settings\n\n* `fleet-provider-type` - fleet provider, `internal-protocol` for use of internal protocol `no-connection` for use of dummy\n  connection, string\n* `provider-internal-protocol-settings` - internal protocol provider settings object - module 1, device type 1 is hardcoded\n\n### internal protocol provider settings\n\n* `module-gateway-ip` - IPv4 or hostname of module gateway, string\n* `module-gateway-port` - ba module gateway port, int\n* `device-role` - device role, string - part of device identification\n* `device-name` - device name, string - part of device identification\n* `device-priority` - device priority, int - part of device identification\n* `reconnect-period-s` - period of reconnection to module gateway, int\n\n## Fleet provider type\n\nVirtual vehicle provides the ability to choose a fleet communication provider with `--fleet-provider-type=\u003cstring\u003e` argument. The\noptions are:\n\n* `internal-protocol` - connection to Module Gateway by Internal Client will be established, requires `--ip=\u003cstring\u003e`\n  and `--port=\u003cint\u003e` arguments to specify module gateway connection\n* `no-connection` - no connection will be established, statuses will be discarded and the default command will be returned,\n  for testing purposes\n\n## Vehicle provider type\n\nVirtual vehicle provides the ability to choose different simulation implementation with `--vehicle-provider-type=\u003cstring\u003e`\nargument. The options are:\n\n* `simulation` - car movement will be simulated and position will be based on the given map file (.osm format). Required\n  parameters: `--map=\u003cstring\u003e`, `--route=\u003cstring\u003e`,\n  optional arguments: `--speed-override=\u003cint\u003e`, `--wait=\u003cint\u003e`\n* `gps` - virtual vehicle will report position based on external GPS source, no mission logic is implemented. Required\n  parameters: `--gps-provider-type=\u003cstring\u003e`\n\n## Gps provider\n\nProvider used for GPS-based position reporting. The options are:\n\n* `rutx09` - position is obtained from RUTX09 router from Teltonika. Required\n  parameters: `--rutx-ip=\u003cstring\u003e`, `--rutx-port=\u003cint\u003e`, `rutx-slave-id=\u003cint\u003e`\n* `ublox` - position is obtained from ublox device, NOT IMPLEMENTED\n* `map` - position is obtained from the map, for testing purposes. It is always driving on the route gained from settings. \n  Required parameters: `--map=\u003cstring\u003e` and `--default-route=\u003cstring\u003e`\n\n## Cmake parameters\n\n* `BRINGAUTO_TESTS` - if set to ON, tests will also be compiled, tests can be run with command ctest after successful build\n  build\n* `BRINGAUTO_PACKAGE` - if set to ON creates a package of vvu\n* `BRINGAUTO_INSTALL` - if set to ON enables make install command\n* `BRINGAUTO_SYSTEM_DEP` - if set to ON cmake will use system dependencies instead of CMlib storage packages\n* `BRINGAUTO_SAMPLES` - if set to ON sample app will be compiled\n* `STATE_SMURF` - enable state smurf compilation\n* `CMLIB_DIR` - specify the path to cmakelib\n\n## Build\n\n``` bash\ngit clone https://github.com/bringauto/virtual-vehicle.git\ngit submodule update --init --recursive\nmkdir _build \u0026\u0026 cd _build\ncmake .. -DCMAKE_BUILD_TYPE=Release\nmake -j 8\n```\n\n## Tests\n\nDocumentation for tests is in [test/README.md](test/README.md)\n\n## Smurf integration tests\n\nSmurf integration tests are used to test Virtual vehicle integration with who Fleet Protocol stack using [Etna](https://github.com/bringauto/etna).\n\nDetails and usage are described in [StateSmurf](test/smurf/README.md) documentation.\n\n## Map creation\n\nFor creating maps we use openstreet map editor. Maps are saved in open street map format (.osm). Each map contains a list\nof nodes (points on the route), a list of ways (parts of routes, connecting points), and a list of routes (composed of ways). One\n.osm file can contain multiple routes and they have to be named. Routes can share points and ways. A point can represent\na stop and if it is a stop, it has to be named.\n\n## Start a new map\n\n* Install java openstreet map editor (\u003chttps://josm.openstreetmap.de/wiki/Cs:WikiStart\u003e)\n* Under Imagery choose map source to visualize map (b\u0026w open street map recommended)\n* Under File create a new layer, name it (right side of the app), layer represents .osm file\n\n## Route creation\n\n* Choose the draw nodes tool (left toolbar) and draw way (list of points connected by a line) by adding points, press ESC when\n  finished, repeat until you have all the ways you need (usually one is enough if you do not want to share ways in multiple\n  routes)\n* With the select/move tool select all ways you want to include in the route and in the relation tab add a relation with the plus button\n* in pop-up add required tags - `type=\u003cway\u003e` and `name=\u003croute name\u003e`\n* in the same pop-up window add ways (selection tab) to route (members tab) and apply role \"way\"\n* repeat if you want multiple routes, routes can share some parts with each other, that is why they consist of ways. If\n  you do not intend to share parts of routes use one way per route\n\n  ![pop up image](documentation/josm_selection.png)\n\n## Stop addition\n\n* select the point you want to make into stop (yellow dot and stop can be defined only on nodes, not on the line between them)\n* in tags/membership tab click the plus button with the selected point and add tag `stop=true` and `name=\u003cstop name\u003e` (name has to\n  be unique)\n* you can also add `speed=\u003ctarget speed in m/s\u003e` as a tag to ANY point, it will set the MAXIMUM speed on that point\n\n## Export map\n\n* Under file save map as `\u003cmap name\u003e.osm` file\n* .osm map example:\n\n``` xml\n\u003c?xml version='1.0' encoding='UTF-8'?\u003e\n\u003cosm version='0.6' generator='JOSM'\u003e\n  \u003cnode id='-101752' action='modify' visible='true' lat='49.17426200443' lon='16.55092476726' /\u003e\n  \u003cnode id='-101754' action='modify' visible='true' lat='49.17320987972' lon='16.55007718921' /\u003e\n  \u003cnode id='-101755' action='modify' visible='true' lat='49.17327300432' lon='16.55111252725' /\u003e\n  \u003cnode id='-101757' action='modify' visible='true' lat='49.17411470831' lon='16.55023812175' /\u003e\n  \u003cnode id='-101758' action='modify' visible='true' lat='49.17438124381' lon='16.54963730693' /\u003e\n  \u003cnode id='-101916' action='modify' visible='true' lat='49.17337821766' lon='16.55093550146' /\u003e\n  \u003cnode id='-101918' action='modify' visible='true' lat='49.17347290948' lon='16.55081748426' /\u003e\n  \u003cnode id='-101920' action='modify' visible='true' lat='49.17363774295' lon='16.55071556032'\u003e\n    \u003ctag k='name' v='zastavka' /\u003e\n    \u003ctag k='stop' v='true' /\u003e\n  \u003c/node\u003e\n  \u003cnode id='-101922' action='modify' visible='true' lat='49.17383063249' lon='16.55066728055' /\u003e\n  \u003cnode id='-101924' action='modify' visible='true' lat='49.17397091532' lon='16.54929398954'\u003e\n    \u003ctag k='speed' v='7' /\u003e\n  \u003c/node\u003e\n  \u003cnode id='-101925' action='modify' visible='true' lat='49.17361670041' lon='16.54920815885' /\u003e\n  \u003cnode id='-101926' action='modify' visible='true' lat='49.17394987292' lon='16.54962658346' /\u003e\n  \u003cnode id='-101927' action='modify' visible='true' lat='49.17355006564' lon='16.54951393068'\u003e\n    \u003ctag k='name' v='stopka' /\u003e\n    \u003ctag k='speed' v='5' /\u003e\n    \u003ctag k='stop' v='true' /\u003e\n  \u003c/node\u003e\n  \u003cnode id='-101928' action='modify' visible='true' lat='49.17361582035' lon='16.54921151664' /\u003e\n  \u003cnode id='-101929' action='modify' visible='true' lat='49.17354962397' lon='16.5495055538' /\u003e\n  \u003cnode id='-101962' action='modify' visible='true' lat='49.17397266578' lon='16.54933623902' /\u003e\n  \u003cnode id='-101963' action='modify' visible='true' lat='49.17397617285' lon='16.54929600589' /\u003e\n  \u003cnode id='-101964' action='modify' visible='true' lat='49.17395469207' lon='16.5496272587' /\u003e\n  \u003cway id='-101782' action='modify' visible='true'\u003e\n    \u003cnd ref='-101752' /\u003e\n    \u003cnd ref='-101922' /\u003e\n    \u003cnd ref='-101754' /\u003e\n    \u003cnd ref='-101755' /\u003e\n    \u003cnd ref='-101916' /\u003e\n    \u003cnd ref='-101918' /\u003e\n    \u003cnd ref='-101920' /\u003e\n    \u003cnd ref='-101757' /\u003e\n    \u003cnd ref='-101758' /\u003e\n    \u003cnd ref='-101752' /\u003e\n  \u003c/way\u003e\n  \u003cway id='-101939' action='modify' visible='true'\u003e\n    \u003cnd ref='-101924' /\u003e\n    \u003cnd ref='-101925' /\u003e\n  \u003c/way\u003e\n  \u003cway id='-101940' action='modify' visible='true'\u003e\n    \u003cnd ref='-101926' /\u003e\n    \u003cnd ref='-101927' /\u003e\n  \u003c/way\u003e\n  \u003cway id='-101941' action='modify' visible='true'\u003e\n    \u003cnd ref='-101928' /\u003e\n    \u003cnd ref='-101929' /\u003e\n  \u003c/way\u003e\n  \u003cway id='-101951' action='modify' visible='true'\u003e\n    \u003cnd ref='-101963' /\u003e\n    \u003cnd ref='-101964' /\u003e\n  \u003c/way\u003e\n  \u003crelation id='-99764' action='modify' visible='true'\u003e\n    \u003cmember type='way' ref='-101782' role='' /\u003e\n    \u003ctag k='name' v='nahoda' /\u003e\n    \u003ctag k='type' v='way' /\u003e\n  \u003c/relation\u003e\n  \u003crelation id='-99775' action='modify' visible='true'\u003e\n    \u003cmember type='way' ref='-101940' role='' /\u003e\n    \u003cmember type='way' ref='-101939' role='' /\u003e\n    \u003cmember type='way' ref='-101941' role='' /\u003e\n    \u003cmember type='way' ref='-101951' role='' /\u003e\n    \u003ctag k='name' v='route 2' /\u003e\n    \u003ctag k='type' v='way' /\u003e\n  \u003c/relation\u003e\n\u003c/osm\u003e\n```\n\n## Build and run docker image\n\nBuild docker image using\n\n``` bash\ngit clone https://github.com/bringauto/virtual-vehicle.git\ngit submodule update --init --recursive\ndocker build --tag virtual-vehicle-utility .\n```\n\nRun docker with parameters\n\n``` bash\ndocker run -ti --rm virtual-vehicle-utility --config=\u003cpath to json file\u003e --map=\u003cpath to map file\u003e --route=\u003croute name\u003e --module-gateway-ip=\u003cmodule gateway ip\u003e --module-gateway-port=\u003cmodule gateway port\u003e --wait-at-stop-s=\u003ctime to wait in stop in sec\u003e\n```\n\nExamples:\n\n``` bash\ndocker run -ti --rm virtual-vehicle-utility --config=/virtual-vehicle-utility/config/example.json\n```\n\n``` bash\ndocker run -ti --rm virtual-vehicle-utility --config=/virtual-vehicle-utility/config/example.json --map=/virtual-vehicle-utility/tests/maps/BorsodChem.osm --route=borsodchem --module-gateway-ip=127.0.0.1 --module-gateway-port=1536 --wait-at-stop-s=10 \n```\n\n\n## Troubleshooting\n\n#### RUTX09 GPS provider sending invalid data\n\nMake sure that the RUTX09 firmware version is \u003e= RUTX_R_00.07.08.3","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbringauto%2Fvirtual-vehicle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbringauto%2Fvirtual-vehicle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbringauto%2Fvirtual-vehicle/lists"}