LVPS Rest Service
This rest service enables robots using the LVPS system to download maps, vision models, and assignments. It also allows the Bot Captain App to have visibility of all robots within LVPS and assign tasks. The source code for this rest service is available here. The service uses a Postgres database. The database contains all maps, models, logs, and other data needed by LVPS.
The LVPS Pilot system, which runs on robots, needs intermittent access to this service. When the pilot starts up, it checks this service for assignments. If there any, the pilot checks its local cache to determine if it already has the maps and models needed to complete the assignment. If necessary, the artifacts will be downloaded so the pilot can complete its assignments. In order to keep a log of positions and views (for later viewing via the Bot Captain app), the pilot will be constantly logging position and images to this service.
Within my reference implementation, I am running this service on a Raspberry Pi CM4 that is also running the pilot software. If you look closely at the finished images of , you will notice it has a white Wifi router mounted to it. That router is its own network, to which any LVPS-powered robots can connect, and then become part of the LVPS network. So that Pi CM4 on MecCar is running the pilot software, postgres, and the rest service. Ideally, the LVPS service would more likely be running on its own hardware, but for me it's more convenient have one of the robots doing double-duty.
The Api
Security
There is no security layer within the service at this point. I am currently just relying on the fact that you'd have to be within distance and need the WiFi password of the LVPS network in order to gain access to the service. I may change this later on, as it wouldn't be difficult, but it's just not a priority right now.