SLAMTEC Aurora Public Remote SDK  1.2.0-rtm
LIDAR 2D Map Operations

Functions for accessing LIDAR 2D Map data. More...

Functions

slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_get_supported_grid_resultion_range (slamtec_aurora_sdk_session_handle_t handle, float *min_resolution, float *max_resolution)
 Get the supported grid resolution range of the LIDAR 2D map. More...
 
slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_get_supported_max_grid_cell_count (slamtec_aurora_sdk_session_handle_t handle, size_t *max_cell_count)
 Get the supported maximum grid cell count of the LIDAR 2D map. More...
 
slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_require_redraw (slamtec_aurora_sdk_session_handle_t handle)
 Require the LIDAR 2D preview map to be redrawn. More...
 
slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_start_background_update (slamtec_aurora_sdk_session_handle_t handle, const slamtec_aurora_sdk_2d_gridmap_generation_options_t *build_options)
 Start the background map generation for the LIDAR 2D preview map. More...
 
void AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_stop_background_update (slamtec_aurora_sdk_session_handle_t handle)
 Stop the background map generation for the LIDAR 2D preview map. More...
 
int AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_is_background_updating (slamtec_aurora_sdk_session_handle_t handle)
 Check if the background map generation for the LIDAR 2D preview map is running. More...
 
slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_get_and_reset_update_dirty_rect (slamtec_aurora_sdk_session_handle_t handle, slamtec_aurora_sdk_rect_t *dirty_rect_out, int *map_big_change)
 Get the dirty rect of the LIDAR 2D preview map and reset the dirty rect. More...
 
slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_set_auto_floor_detection (slamtec_aurora_sdk_session_handle_t handle, int enable)
 Set the auto floor detection for the LIDAR 2D preview map. More...
 
int AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_is_auto_floor_detection (slamtec_aurora_sdk_session_handle_t handle)
 Check if the auto floor detection is enabled for the LIDAR 2D preview map. More...
 
const slamtec_aurora_sdk_occupancy_grid_2d_handle_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_get_gridmap_handle (slamtec_aurora_sdk_session_handle_t handle)
 Get the handle of the LIDAR 2D preview map. More...
 
slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_generate_fullmap (slamtec_aurora_sdk_session_handle_t handle, slamtec_aurora_sdk_occupancy_grid_2d_handle_t *generated_gridmap_handle_out, const slamtec_aurora_sdk_2d_gridmap_generation_options_t *build_options, int wait_for_data_sync, uint64_t timeout_ms)
 Generate the full map on demand. More...
 
void AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_gridmap_release (slamtec_aurora_sdk_occupancy_grid_2d_handle_t gridmap_handle)
 Release the LIDAR 2D map. More...
 
slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_gridmap_get_resolution (const slamtec_aurora_sdk_occupancy_grid_2d_handle_t gridmap_handle, float *resolution_out)
 Get the resolution of the LIDAR 2D map. More...
 
slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_gridmap_get_dimension (const slamtec_aurora_sdk_occupancy_grid_2d_handle_t gridmap_handle, slamtec_aurora_sdk_2dmap_dimension_t *dimension_out, int get_max_capcity)
 Get the current dimension of the LIDAR 2D map. More...
 
slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_gridmap_read_cell_data (const slamtec_aurora_sdk_occupancy_grid_2d_handle_t gridmap_handle, const slamtec_aurora_sdk_rect_t *fetch_rect, slamtec_aurora_sdk_2d_gridmap_fetch_info_t *info_out, uint8_t *cell_buffer, size_t cell_buffer_size, int l2p_mapping)
 Read the cell data of the LIDAR 2D map. More...
 

Detailed Description

Functions for accessing LIDAR 2D Map data.

Function Documentation

◆ slamtec_aurora_sdk_lidar2dmap_generate_fullmap()

slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_generate_fullmap ( slamtec_aurora_sdk_session_handle_t  handle,
slamtec_aurora_sdk_occupancy_grid_2d_handle_t generated_gridmap_handle_out,
const slamtec_aurora_sdk_2d_gridmap_generation_options_t build_options,
int  wait_for_data_sync,
uint64_t  timeout_ms 
)

Generate the full map on demand.

Caller can use this function to generate the full map on demand and return the handle of the generated map.

The caller thread will be blocked until the map is generated or the timeout occurs.

The caller should release the map handle by calling slamtec_aurora_sdk_lidar2dmap_gridmap_release when the map is no longer needed. 2

Parameters
handle- the session handle
generated_gridmap_handle_out- the handle of the generated full map will be stored in this pointer
build_options- the generation options
wait_for_data_sync- if non-zero, the function will wait for the map data to be synced before generating the map
timeout_ms- the timeout in milliseconds
Returns
the error code

◆ slamtec_aurora_sdk_lidar2dmap_get_supported_grid_resultion_range()

slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_get_supported_grid_resultion_range ( slamtec_aurora_sdk_session_handle_t  handle,
float *  min_resolution,
float *  max_resolution 
)

Get the supported grid resolution range of the LIDAR 2D map.

Caller can use this function to get the supported grid resolution range. The resolution is the size of the grid cell in meters.

The map resultion can be specified in the generation options. If the resolution is not in the supported range, the map will not be generated. 2

Parameters
handle- the session handle
min_resolution- the minimum resolution will be stored in this pointer
max_resolution- the maximum resolution will be stored in this pointer
Returns
the error code

◆ slamtec_aurora_sdk_lidar2dmap_get_supported_max_grid_cell_count()

slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_get_supported_max_grid_cell_count ( slamtec_aurora_sdk_session_handle_t  handle,
size_t *  max_cell_count 
)

Get the supported maximum grid cell count of the LIDAR 2D map.

Caller can use this function to get the supported maximum grid cell count. Each cell is stored as a byte.

For example, for a map with 100 meters width and 100 meters height, if the resolution is 0.1 meter, the maximum cell count will be (100/0.1) * (100/0.1) = 1,000,000 .

If the cell count is larger than the supported maximum, the map will not be generated. 2

Parameters
handle- the session handle
max_cell_count- the maximum cell count will be stored in this pointer
Returns
the error code

◆ slamtec_aurora_sdk_lidar2dmap_gridmap_get_dimension()

slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_gridmap_get_dimension ( const slamtec_aurora_sdk_occupancy_grid_2d_handle_t  gridmap_handle,
slamtec_aurora_sdk_2dmap_dimension_t dimension_out,
int  get_max_capcity 
)

Get the current dimension of the LIDAR 2D map.

Caller can use this function to get the current dimension of a LIDAR 2D map object. 2

Parameters
gridmap_handle- the handle of the LIDAR 2D map
dimension_out- the dimension will be stored in this pointer. The dimension is in logical size unit, i.e. in meters.
get_max_capcity- if non-zero, the function will return the maximum capacity of the map instead of the current dimension.
Returns
the error code

◆ slamtec_aurora_sdk_lidar2dmap_gridmap_get_resolution()

slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_gridmap_get_resolution ( const slamtec_aurora_sdk_occupancy_grid_2d_handle_t  gridmap_handle,
float *  resolution_out 
)

Get the resolution of the LIDAR 2D map.

Caller can use this function to get the resolution of a LIDAR 2D map object . 2

Parameters
gridmap_handle- the handle of the LIDAR 2D map
resolution_out- the resolution will be stored in this pointer
Returns
the error code

◆ slamtec_aurora_sdk_lidar2dmap_gridmap_read_cell_data()

slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_gridmap_read_cell_data ( const slamtec_aurora_sdk_occupancy_grid_2d_handle_t  gridmap_handle,
const slamtec_aurora_sdk_rect_t fetch_rect,
slamtec_aurora_sdk_2d_gridmap_fetch_info_t info_out,
uint8_t *  cell_buffer,
size_t  cell_buffer_size,
int  l2p_mapping 
)

Read the cell data of the LIDAR 2D map.

Caller can use this function to read the cell data of a LIDAR 2D map object.

The caller is required to provide a buffer to store the cell data.

The buffer size must be at least as large as the number of cells in the rect otherwise the function will return SLAMTEC_AURORA_SDK_ERRORCODE_INVALID_ARGUMENT.

There is an exception that if either the cell_buffer is set to NULL or the cell_buffer_size is set to 0, the function will return SLAMTEC_AURORA_SDK_ERRORCODE_OK and the info_out will be filled with the fetch info.

In order to get the number of cells in the rect, caller can use the info_out->cell_width and info_out->cell_height fields to calculate the number of cells.

The retrieved map data may have different origin point (x,y) compared to the one specified in the fetch_rect. The caller can use the info_out to check the real point value. 2

Parameters
gridmap_handle- the handle of the LIDAR 2D map
fetch_rect- the rect in logic uints to be fetched
info_out- the fetch info will be stored in this pointer
cell_buffer- the buffer to store the cell data
cell_buffer_size- the buffer size
l2p_mapping- if non-zero, the function will perform log-odd to linear (0-255) mapping to each cell value. For visualization purpose, this is very useful.
Returns
the error code

◆ slamtec_aurora_sdk_lidar2dmap_gridmap_release()

void AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_gridmap_release ( slamtec_aurora_sdk_occupancy_grid_2d_handle_t  gridmap_handle)

Release the LIDAR 2D map.

Caller can use this function to release a generated LIDAR 2D map object. 2

Parameters
gridmap_handle- the handle of the LIDAR 2D map

◆ slamtec_aurora_sdk_lidar2dmap_previewmap_get_and_reset_update_dirty_rect()

slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_get_and_reset_update_dirty_rect ( slamtec_aurora_sdk_session_handle_t  handle,
slamtec_aurora_sdk_rect_t dirty_rect_out,
int *  map_big_change 
)

Get the dirty rect of the LIDAR 2D preview map and reset the dirty rect.

Caller can use this function to get the dirty rect of the LIDAR 2D preview map and reset the dirty rect.

The dirty rect is the area that has been updated by the background map generation thread. 2

Parameters
handle- the session handle
dirty_rect_out- the dirty rect will be stored in this pointer
map_big_change- the map big change flag will be stored in this pointer. If there is a big change, the map will be redrawn and this flag will be set to true. It commonly happens when there is a loop closure or a new map has been loaded.
Returns
the error code

◆ slamtec_aurora_sdk_lidar2dmap_previewmap_get_gridmap_handle()

const slamtec_aurora_sdk_occupancy_grid_2d_handle_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_get_gridmap_handle ( slamtec_aurora_sdk_session_handle_t  handle)

Get the handle of the LIDAR 2D preview map.

Caller can use this function to get the handle of the LIDAR 2D preview map.

The handle can be used to access the preview map data.

The handle cannot be released by the caller. 2

Parameters
handle- the session handle
Returns
the handle of the LIDAR 2D preview map

◆ slamtec_aurora_sdk_lidar2dmap_previewmap_is_auto_floor_detection()

int AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_is_auto_floor_detection ( slamtec_aurora_sdk_session_handle_t  handle)

Check if the auto floor detection is enabled for the LIDAR 2D preview map.

Caller can use this function to check if the auto floor detection is enabled for the LIDAR 2D preview map. 2

Parameters
handle- the session handle
Returns
non-zero means enabled

◆ slamtec_aurora_sdk_lidar2dmap_previewmap_is_background_updating()

int AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_is_background_updating ( slamtec_aurora_sdk_session_handle_t  handle)

Check if the background map generation for the LIDAR 2D preview map is running.

Caller can use this function to check if the background map generation for the LIDAR 2D preview map is running. 2

Parameters
handle- the session handle
Returns
non-zero means running

◆ slamtec_aurora_sdk_lidar2dmap_previewmap_require_redraw()

slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_require_redraw ( slamtec_aurora_sdk_session_handle_t  handle)

Require the LIDAR 2D preview map to be redrawn.

Caller can use this function to require the LIDAR 2D preview map to be redrawn.

The preview map is the map that been generated on the fly during the mapping process by the background thread.

It is very useful for the caller to visualize the map in real time. 2

Parameters
handle- the session handle
Returns
the error code

◆ slamtec_aurora_sdk_lidar2dmap_previewmap_set_auto_floor_detection()

slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_set_auto_floor_detection ( slamtec_aurora_sdk_session_handle_t  handle,
int  enable 
)

Set the auto floor detection for the LIDAR 2D preview map.

Caller can use this function to set the auto floor detection for the LIDAR 2D preview map.

If the auto floor detection is enabled, the detector will update the height range used to generate the preview map.

The height range is based on the current floor description.

Auto floor detection is useful for multiple floor scenarios. 2

Parameters
handle- the session handle
enable- if true, the auto floor detection will be enabled
Returns
the error code

◆ slamtec_aurora_sdk_lidar2dmap_previewmap_start_background_update()

slamtec_aurora_sdk_errorcode_t AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_start_background_update ( slamtec_aurora_sdk_session_handle_t  handle,
const slamtec_aurora_sdk_2d_gridmap_generation_options_t build_options 
)

Start the background map generation for the LIDAR 2D preview map.

Caller can use this function to start the background map generation for the LIDAR 2D preview map. Otherwise, the preview map will not be updated.

The preview map is the map that been generated on the fly during the mapping process by the background thread.

It is very useful for the caller to visualize the map in real time. 2

Parameters
handle- the session handle
build_options- the generation options
Returns
the error code

◆ slamtec_aurora_sdk_lidar2dmap_previewmap_stop_background_update()

void AURORA_SDK_API slamtec_aurora_sdk_lidar2dmap_previewmap_stop_background_update ( slamtec_aurora_sdk_session_handle_t  handle)

Stop the background map generation for the LIDAR 2D preview map.

Caller can use this function to stop the background map generation for the LIDAR 2D preview map. 2

Parameters
handle- the session handle