Vehicle Lidar Calibration API
Last updated
Last updated
The API requires the client to upload the PCD, and configuration for vehicle lidar setup in a zip file (.zip extension) in the format defined below. The contents of the zip file are called a dataset.
The client makes an Upload and calibrate API call, which uploads their files and runs the calibration algorithm on the lidar files for the given configuration.
The calibration process is completed without errors if the Upload and calibrate API call response contains dataset_id, extrinsic_parameters, and error_stats.
The client can call the Get Extrinsic Parameters API using the dataset_id obtained from the Upload and calibrate API. This API responds with dataset_id, extrinsic_parameters, and error_stats.
We require lidar frames for a given calibration.
Place the Lidar data captured from the LiDAR in a folder.
config.json contains configuration details of the calibration (intrinsic parameters, calibration name, etc.)
Note: Folder structure is optional. Users can place all files in the main directory and zip it.
The folder and lidar file names shown here are for demonstration purposes. Users should avoid using spaces in the folder and the lidar filename.
The name of the JSON file should be config.json
(case sensitive)
Key | Type | Description |
---|---|---|
calibration_name | string | Name of the calibration |
calibration_type | string | Non-editable field.*Value should be lidar_vehicle_calibration |
calibration_group_id | string | This is an optional key. Provide valid calibration_group_id to add the dataset to calibration group. |
multi_target | boolean | true: if multiple targets are used false: if single target is used |
lidar_name | string | It is the name given by the client to the lidar. The client can modify it as willed. |
is_targetless_3d_lidar | boolean | true: for targetless calibration false: for target-based calibration |
slam_algorithm_to_use | string | This parameter is needed when is_targetless_3d_lidar is true. Accepted values are 1. LOAM 2. ICP |
laser_channels | integer | Laser channels of the lidar used. Accepted values are 16, 32, 64 and 128 |
targets | Object | It is a dictionary of dictionary with each dictionary having target properties. Accepted keys are 1. left 2. right 3. front 4. rear |
length | double | length of the board of the target in meters |
width | double | width of the board of the target in meters |
tilted | Boolean | true: if the board is tilted false: if the board is not tilted |
data | Object | It stores the data related to files of the lidar |
files | Object | It is an Object, where each key is a string which is "file" in case of multi-target and "left", "right", "front" or "rear" containing the path to the file. |
wheelbase | double | The length from the mid of the rear wheel to the mid of the front wheel on the same side |
track | double | The length from the right mid of the wheel in front of vehicle to left mid of the wheel in front of the vehicle or The length from the right mid of the wheel in rear of vehicle to left mid of the wheel in rear of the vehicle |
vehicle_configuration | Object | Object which has all the measurements 1. vehicle_shape 2. wheelbase 3. track 4. front_wheel_overhang 5. rear_wheel_overhang |
vehicle_shape | string | rectangle or trapezoid based on the shape of the vehicle |
breadth | double | breadth of the board of the target in meters |
front_wheel_overhang | double | Overhang from the middle of the front wheels to the front end part of the vehicle in meters |
rear_wheel_overhang | double | Overhang from the middle of the rear wheels to the rear end part of the vehicle in meters |
is_targetless_3d_lidar | boolean | true if the calibration is targetless false for target-based calibration |
is_2d_lidar | boolean | true if the calibration is 2d- lidar false if the calibration is 3d-lidar |
auto_detect_lidar_board | boolean | true for auto detecting the board in the point cloud false otherwise In most cases when using api it is true other than if bounding box is provided |
use_bounding_box_on_board_detection_failure | boolean | true if bounding box should be used when detection fails |
bounding_box | Object of Objects | This is an object of objects with key corresponding to the target whose details are provided. Need to be provided if we want to use bounding box forboard detection The keys which gives the bounding box for a target 1. xmin 2. xmax 3. ymin 4. ymax 5. zmin 6. zmax The key refers to the corners of minimum and maximum values in all axis to create the bounding box within which the target is identified. These values are in the lidar frame. |
all_lidar_data | Object | Object with all the lidar data and board configration |
lidar_type | string | directional or 360 if there are 4 boards and 3 boards respectively |
laser_channels | Integer | Number of channels the lidar has. |
lidar_fov_direction | string | If the lidar is directional then this defines which direction with respect to the vehicle is the lidar present. Supports
|
front_board_distance
| double | Distance from front direction of the car to the board |
left_board_distance | double | Distance from left direction of the car to the board |
right_board_distance | double | Distance from right direction of the car to the board |
rear_board_distance | double | Distance from rear direction of the car to the board |
target_distance | double | Approximate distance between the lidar and the centroid of the board to differentiate the boards in case more than one are of similar size. needed only of the sizes are same in multiple boards
|
is_lidar_tilted | Boolean | If the lidar is tilted autodetection happends else if the lidar ground heigh is given then ground is detected at that much distance from ground |
lidar_ground_height | number | distance from ground to the lidar when lidar is parallel to ground |
Before invoking the APIs, the client must obtain the clientId and auth token from Deepen AI. If you are a calibration admin, you can create different Access Tokens using the UI and use those instead. clientId is part of the path parameters in most API calls, and the auth token should be prefixed with “Bearer “ and passed to the ‘Authorization’ header in all API requests. How to get Access Tokens can be found on the following link: Access token for APIs
This POST API call sends a zip file to the server and runs the calibration algorithm. As the response, it returns dataset_id, extrinsic_parameters, and error_stats (error_stats won't be available for targetless calibration) to the user.
https://tools.calibrate.deepen.ai/api/v2/external/clients/{clientId}/calibration_dataset
Parameter name | Parameter type | Description |
---|---|---|
clientId | string | ClientId obtained from Deepen AI |
Key | Value | Description |
---|---|---|
file | .zip file | Zip file containing config and pcd in a suitable format |
Key | Description |
---|---|
dataset_id | A unique value to identify the dataset. dataset_id can be used to retrieve the extrinsic parameters. |
calibration_algorithm_version | The version of the algorithm used to calculate extrinsic parameters. This value can be used to map extrinsic parameters to a specific algorithm version. |
extrinsic_parameters | roll, pitch, and yaw are given in degrees and px, py, and pz are given in meters. |
error_stats | plane_distance_error is the mean of the distance between the plane LiDAR points to the respective planes. |
This GET api call returns dataset_id, extrinsic_parameters, and error_stats.
https://tools.calibrate.deepen.ai/api/v2/external/datasets/{datasetId}/extrinsic_parameters
Parameter name | Parameter type | Description |
---|---|---|
datasetId | string | datasetId obtained from the response of Upload file and calibrate API. |
Key | Description |
---|---|
dataset_id | A unique value to identify the dataset. dataset_id can be used to retrieve the extrinsic parameters. |
calibration_algorithm_version | The version of the algorithm used to calculate extrinsic parameters. This value can be used to map extrinsic parameters to a specific algorithm version. |
extrinsic_parameters | roll, pitch, and yaw are given in degrees and px, py, and pz are given in meters. |
error_stats | plane_distance_error is the mean of the distance between the plane LiDAR points to the respective planes. |
The setup should prevent false detections. For example, other plane surfaces of similar shape may be identified as a board, which might give false solutions. You can always check the boards identified on the web application.