Introduction
The Sensor Layouts REST API allows you to manage your Sensor Layout Library. This API offers the same capabilities as the Sensor Layout section of the Sensor Labs desktop application, namely:- Upload a packed sensor layout and add it to the library
- Create a new empty sensor layout
- Update the sensor layout given by its ID with the information in the body
- Download a sensor layout to a file with the specified name
- List all sensor layouts available in the library, or list specific sensor layouts using filters
- Read the sensor layout with the given ID
- Delete the sensor layout from the library
- Delete all the sensor layouts from the library
- Sensors API: TCP 5128
- Sensor Layouts API: TCP 5127
- Sensor Layout Library: TCP 5101
- Sensor Library: TCP 5102
- Sensor Foundry: TCP 5103
- Sensor Editor: TCP 5104
- Sensor Layout Editor: TCP 5105
- on Windows:
sensor-labs-api.ps1 - on Linux:
sensor-labs-api.sh
Resources
The resources that are handled by the endpoints of this API are the sensor layouts in the library. A sensor layout defines the sensor assets to be mounted on your ego vehicle for simulation in AVxcelerate Sensors Simulator. For more details about sensor layouts refer to the Sensor Layout section in AVxcelerate Sensors Simulator User’s Guide.Platform overview
The sensor models created using Sensors REST API are the inputs for the creation and edition of Sensor Layouts using the Sensor Layouts REST API. Once created, a Sensor layout can be downloaded as a packed file (.sencfgx) so that it can be set as a resource for simulation in AVxcelerate Sensors Simulator.
Requests
The easiest way to send API requests is using the Swagger UI interactive documentation, however you can also use Curl or Postman. Here are some request examples. GET request To list all the sensor layouts available in the library (with the default parameters): Curlhttp://localhost:5127/avx-sensorlabs/v1/sensorlayouts
POST request
To create an empty sensor layout:
Curl
http://localhost:5127/avx-sensorlabs/v1/sensorlayouts
In the request body, select Raw > json, then define the name of the sensor layout to create, for example:
http://localhost:5127/avx-sensorlabs/v1/sensorlayouts/b81927e9-d712-41f8-81f1-15d63a541e37
In the request body, select Raw > json, then define all properties of the sensor layout, for example:
http://localhost:5127/avx-sensorlabs/v1/sensorlayouts/5fc0f2f8-bf84-4bfe-8f70-e6b209377b47