The 2D gridmap builder class. More...
#include <slamtec_remote_public.hxx>
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 OccupancyGridMap2DRef & | getPreviewMap () const |
Get the preview map to access the map data. More... | |
std::shared_ptr< OccupancyGridMap2DRef > | generateFullMap (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) | |
![]() | |
Noncopyable (const Noncopyable &)=delete | |
Noncopyable & | operator= (const Noncopyable &)=delete |
Noncopyable (Noncopyable &&)=default | |
Noncopyable & | operator= (Noncopyable &&)=default |
Protected Attributes | |
OccupancyGridMap2DRef | _cachedPreviewMap |
slamtec_aurora_sdk_session_handle_t | _sdk |
Friends | |
class | RemoteSDK |
The 2D gridmap builder class.
This class is used to build a 2D gridmap. 2
|
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.
[in] | options | The generation options of the full map |
[in] | waitForDataSync | Whether to wait for the data sync to complete |
[in] | timeout_ms | The timeout in milliseconds |
|
inline |
Get the dirty rectangle of the preview map and reset the dirty rectangle.
[out] | rectOut | The dirty rectangle of the preview map |
[out] | mapBigChange | 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. |
|
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.
|
inline |
Get the preview map to access the map data.
|
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.
[out] | optionsOut | The generation options of the preview map |
|
inline |
Get the supported resolution range of the 2D gridmap.
|
inline |
Check if the auto floor detection is enabled for the preview map.
|
inline |
Check if the preview map background update is active.
|
inline |
Require the preview map to be redrawn.
The request will be queued and processed by the background thread.
|
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.
[in] | enable | Whether to enable the auto floor detection |
|
inline |
Start the preview map background update.
[in] | options | The generation options of the preview map |