Introduction
The Sensors REST API allows you to manage your Sensor Library. This API offers the same capabilities as the Sensor Modeler section of the Sensor Labs desktop application, namely:- Upload multiple packed sensors and add them to the library
- Create a new sensor with default values for each of its properties
- Update the definition of a sensor:
- with the information in the body
- by deleting an external file
- by uploading an external file
- Download the sensor to a file with the specified name
- Download all the sensors in a zip file
- Download the external file
- List all sensors available in the library, or list specific sensors using filters
- Read the definition of a sensor
- Delete a sensor from the library
- Delete all the sensors from the library
- Protect a sensor, or one of its sections, with a password (not available for LiDAR sensors)
- Unprotect a section, or one of its sections, using its password
- Physics-Based Camera
- Physics-Based LiDAR
- Physics-Based Radar
- Thermal Camera
- 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 endpoints of this API allow you to handle the following resources:- sensor models (cameras, fisheye cameras, LiDARs, radars and thermal cameras)
- external files, for example:
- for radars: .fdd, .txt for chirp or pulse sequence
- for cameras: .specturm, .OPTdistortion, .txt (fragment shader)
- for LiDARs: .ies, .intensity or .xmp file (pattern table for beam spatial shape), .txt (firing sequence file)
- for thermal cameras: .specturm, .psf for Point Spread Function, or .txt. for Relative NETD
Platform overview
Creating sensor models is one of the steps needed to prepare a sensor simulation in AVxcelerate Sensors Simulator. 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.
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 sensors available in the library: Curlhttp://localhost:5128/avx-sensorlabs/v8/sensors?sortByType=true&sortByName=true
POST request
To create a rotating LiDAR sensor with a name and a default value for each of its properties:
Curl
http://localhost:5128/avx-sensorlabs/v8/sensors
In the request body, select Raw > json, then define the type and name of the sensor to create, for example:
http://localhost:5128/avx-sensorlabs/v8/46fffdb1-04ae-4abc-a503-006320ae2932/protect
In the request body, select form-data then define the section and the password, for example:
DELETE request
To delete a sensor from the library:
Curl
http://localhost:5128/avx-sensorlabs/v8/sensors/4e4627da-1e93-480d-8d4e-8787b4fbe595