SLAMTEC Aurora Public Remote SDK  1.2.0-rtm
rp::standalone::aurora::LIDAR2DMapBuilder Class Reference

The 2D gridmap builder class. More...

#include <slamtec_remote_public.hxx>

Inheritance diagram for rp::standalone::aurora::LIDAR2DMapBuilder:
rp::standalone::aurora::Noncopyable

Public Member Functions

std::tuple< float, float > getSupportedResolutionRange () const
 Get the supported resolution range of the 2D gridmap. More...
 
size_t getMaxGridCellCount () const
 
bool requireRedrawPreviewMap ()
 Require the preview map to be redrawn. More...
 
bool startPreviewMapBackgroundUpdate (const LIDAR2DGridMapGenerationOptions &options)
 Start the preview map background update. More...
 
void stopPreviewMapBackgroundUpdate ()
 Stop the preview map background update.
 
bool isPreviewMapBackgroundUpdateActive () const
 Check if the preview map background update is active. More...
 
void getAndResetPreviewMapDirtyRect (slamtec_aurora_sdk_rect_t &rectOut, bool &mapBigChange)
 Get the dirty rectangle of the preview map and reset the dirty rectangle. More...
 
void getPreviewMapGenerationOptions (LIDAR2DGridMapGenerationOptions &optionsOut) const
 Get the generation options of the preview map. More...
 
void setPreviewMapAutoFloorDetection (bool enable)
 Set the auto floor detection for the preview map. More...
 
bool isPreviewMapAutoFloorDetectionEnabled () const
 Check if the auto floor detection is enabled for the preview map. More...
 
const OccupancyGridMap2DRefgetPreviewMap () const
 Get the preview map to access the map data. More...
 
std::shared_ptr< OccupancyGridMap2DRefgenerateFullMap (const LIDAR2DGridMapGenerationOptions &options, bool waitForDataSync=true, uint64_t timeout_ms=30000)
 Generate the full map. More...
 

Protected Member Functions

 LIDAR2DMapBuilder (slamtec_aurora_sdk_session_handle_t &sdk)
 
- Protected Member Functions inherited from rp::standalone::aurora::Noncopyable
 Noncopyable (const Noncopyable &)=delete
 
Noncopyableoperator= (const Noncopyable &)=delete
 
 Noncopyable (Noncopyable &&)=default
 
Noncopyableoperator= (Noncopyable &&)=default
 

Protected Attributes

OccupancyGridMap2DRef _cachedPreviewMap
 
slamtec_aurora_sdk_session_handle_t _sdk
 

Friends

class RemoteSDK
 

Detailed Description

The 2D gridmap builder class.

This class is used to build a 2D gridmap. 2

Member Function Documentation

◆ generateFullMap()

std::shared_ptr<OccupancyGridMap2DRef> rp::standalone::aurora::LIDAR2DMapBuilder::generateFullMap ( const LIDAR2DGridMapGenerationOptions options,
bool  waitForDataSync = true,
uint64_t  timeout_ms = 30000 
)
inline

Generate the full map.

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.

Parameters
[in]optionsThe generation options of the full map
[in]waitForDataSyncWhether to wait for the data sync to complete
[in]timeout_msThe timeout in milliseconds
Returns
The full map

◆ getAndResetPreviewMapDirtyRect()

void rp::standalone::aurora::LIDAR2DMapBuilder::getAndResetPreviewMapDirtyRect ( slamtec_aurora_sdk_rect_t rectOut,
bool &  mapBigChange 
)
inline

Get the dirty rectangle of the preview map and reset the dirty rectangle.

Parameters
[out]rectOutThe dirty rectangle of the preview map
[out]mapBigChangethe 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.

◆ getMaxGridCellCount()

size_t rp::standalone::aurora::LIDAR2DMapBuilder::getMaxGridCellCount ( ) const
inline
@brief Get the maximum grid cell count of the 2D gridmap
@details 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.

Returns
The maximum grid cell count of the 2D gridmap

◆ getPreviewMap()

const OccupancyGridMap2DRef& rp::standalone::aurora::LIDAR2DMapBuilder::getPreviewMap ( ) const
inline

Get the preview map to access the map data.

Returns
The preview map

◆ getPreviewMapGenerationOptions()

void rp::standalone::aurora::LIDAR2DMapBuilder::getPreviewMapGenerationOptions ( LIDAR2DGridMapGenerationOptions optionsOut) const
inline

Get the generation options of the preview map.

Caller can use this function to get the current generation options of the LIDAR 2D preview map.

If the auto floor detection is enabled, caller can use this function to get the current height range used to generate the preview map.

Parameters
[out]optionsOutThe generation options of the preview map
Returns
The error code

◆ getSupportedResolutionRange()

std::tuple<float, float> rp::standalone::aurora::LIDAR2DMapBuilder::getSupportedResolutionRange ( ) const
inline

Get the supported resolution range of the 2D gridmap.

Returns
The supported resolution range of the 2D gridmap [min, max]

◆ isPreviewMapAutoFloorDetectionEnabled()

bool rp::standalone::aurora::LIDAR2DMapBuilder::isPreviewMapAutoFloorDetectionEnabled ( ) const
inline

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

Returns
True if the auto floor detection is enabled, false otherwise

◆ isPreviewMapBackgroundUpdateActive()

bool rp::standalone::aurora::LIDAR2DMapBuilder::isPreviewMapBackgroundUpdateActive ( ) const
inline

Check if the preview map background update is active.

Returns
True if the preview map background update is active, false otherwise

◆ requireRedrawPreviewMap()

bool rp::standalone::aurora::LIDAR2DMapBuilder::requireRedrawPreviewMap ( )
inline

Require the preview map to be redrawn.

The request will be queued and processed by the background thread.

Returns
True if the preview map is redrawn requested successfully, false otherwise

◆ setPreviewMapAutoFloorDetection()

void rp::standalone::aurora::LIDAR2DMapBuilder::setPreviewMapAutoFloorDetection ( bool  enable)
inline

Set the auto floor detection for the 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.

Parameters
[in]enableWhether to enable the auto floor detection

◆ startPreviewMapBackgroundUpdate()

bool rp::standalone::aurora::LIDAR2DMapBuilder::startPreviewMapBackgroundUpdate ( const LIDAR2DGridMapGenerationOptions options)
inline

Start the preview map background update.

Parameters
[in]optionsThe generation options of the preview map
Returns
True if the preview map background update is started successfully, false otherwise

The documentation for this class was generated from the following file: