Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
rtabmap::OccupancyGrid Class Reference

#include <OccupancyGrid.h>

Public Member Functions

const std::map< int, Transform > & addedNodes () const
 
void addToCache (int nodeId, const cv::Mat &ground, const cv::Mat &obstacles, const cv::Mat &empty)
 
int cacheSize () const
 
void clear ()
 
void createLocalMap (const Signature &node, cv::Mat &groundCells, cv::Mat &obstacleCells, cv::Mat &emptyCells, cv::Point3f &viewPoint)
 
void createLocalMap (const LaserScan &cloud, const Transform &pose, cv::Mat &groundCells, cv::Mat &obstacleCells, cv::Mat &emptyCells, cv::Point3f &viewPointInOut) const
 
const std::map< int, std::pair< std::pair< cv::Mat, cv::Mat >, cv::Mat > > & getCache () const
 
float getCellSize () const
 
cv::Mat getMap (float &xMin, float &yMin) const
 
const pcl::PointCloud< pcl::PointXYZRGB >::Ptr & getMapEmptyCells () const
 
const pcl::PointCloud< pcl::PointXYZRGB >::Ptr & getMapGround () const
 
const pcl::PointCloud< pcl::PointXYZRGB >::Ptr & getMapObstacles () const
 
unsigned long getMemoryUsed () const
 
float getMinMapSize () const
 
cv::Mat getProbMap (float &xMin, float &yMin) const
 
float getUpdateError () const
 
bool isFullUpdate () const
 
bool isGridFromDepth () const
 
bool isMapFrameProjection () const
 
 OccupancyGrid (const ParametersMap &parameters=ParametersMap())
 
void parseParameters (const ParametersMap &parameters)
 
template<typename PointT >
pcl::PointCloud< PointT >::Ptr segmentCloud (const typename pcl::PointCloud< PointT >::Ptr &cloud, const pcl::IndicesPtr &indices, const Transform &pose, const cv::Point3f &viewPoint, pcl::IndicesPtr &groundIndices, pcl::IndicesPtr &obstaclesIndices, pcl::IndicesPtr *flatObstacles=0) const
 
void setCellSize (float cellSize)
 
void setCloudAssembling (bool enabled)
 
void setMap (const cv::Mat &map, float xMin, float yMin, float cellSize, const std::map< int, Transform > &poses)
 
bool update (const std::map< int, Transform > &poses)
 

Static Public Member Functions

static float logodds (double probability)
 
static double probability (double logodds)
 

Private Attributes

std::map< int, TransformaddedNodes_
 
pcl::PointCloud< pcl::PointXYZRGB >::Ptr assembledEmptyCells_
 
pcl::PointCloud< pcl::PointXYZRGB >::Ptr assembledGround_
 
pcl::PointCloud< pcl::PointXYZRGB >::Ptr assembledObstacles_
 
std::map< int, std::pair< std::pair< cv::Mat, cv::Mat >, cv::Mat > > cache_
 
std::map< int, std::pair< int, int > > cellCount_
 
float cellSize_
 
bool cloudAssembling_
 
unsigned int cloudDecimation_
 
float cloudMaxDepth_
 
float cloudMinDepth_
 
float clusterRadius_
 
bool erode_
 
bool flatObstaclesDetected_
 
float footprintHeight_
 
float footprintLength_
 
float footprintRadius_
 
float footprintWidth_
 
bool fullUpdate_
 
bool grid3D_
 
bool groundIsObstacle_
 
float groundNormalsUp_
 
cv::Mat map_
 
cv::Mat mapInfo_
 
float maxGroundAngle_
 
float maxGroundHeight_
 
float maxObstacleHeight_
 
int minClusterSize_
 
float minGroundHeight_
 
float minMapSize_
 
int noiseFilteringMinNeighbors_
 
float noiseFilteringRadius_
 
int normalKSearch_
 
bool normalsSegmentation_
 
int occupancySensor_
 
float occupancyThr_
 
ParametersMap parameters_
 
bool preVoxelFiltering_
 
float probClampingMax_
 
float probClampingMin_
 
float probHit_
 
float probMiss_
 
bool projMapFrame_
 
bool rayTracing_
 
std::vector< float > roiRatios_
 
bool scan2dUnknownSpaceFilled_
 
int scanDecimation_
 
float updateError_
 
float xMin_
 
float yMin_
 

Detailed Description

Definition at line 40 of file OccupancyGrid.h.

Constructor & Destructor Documentation

◆ OccupancyGrid()

rtabmap::OccupancyGrid::OccupancyGrid ( const ParametersMap parameters = ParametersMap())

Definition at line 43 of file OccupancyGrid.cpp.

Member Function Documentation

◆ addedNodes()

const std::map<int, Transform>& rtabmap::OccupancyGrid::addedNodes ( ) const
inline

Definition at line 65 of file OccupancyGrid.h.

◆ addToCache()

void rtabmap::OccupancyGrid::addToCache ( int  nodeId,
const cv::Mat &  ground,
const cv::Mat &  obstacles,
const cv::Mat &  empty 
)

Definition at line 767 of file OccupancyGrid.cpp.

◆ cacheSize()

int rtabmap::OccupancyGrid::cacheSize ( ) const
inline

Definition at line 66 of file OccupancyGrid.h.

◆ clear()

void rtabmap::OccupancyGrid::clear ( )

Definition at line 679 of file OccupancyGrid.cpp.

◆ createLocalMap() [1/2]

void rtabmap::OccupancyGrid::createLocalMap ( const Signature node,
cv::Mat &  groundCells,
cv::Mat &  obstacleCells,
cv::Mat &  emptyCells,
cv::Point3f &  viewPoint 
)

Definition at line 284 of file OccupancyGrid.cpp.

◆ createLocalMap() [2/2]

void rtabmap::OccupancyGrid::createLocalMap ( const LaserScan cloud,
const Transform pose,
cv::Mat &  groundCells,
cv::Mat &  obstacleCells,
cv::Mat &  emptyCells,
cv::Point3f &  viewPointInOut 
) const

Definition at line 500 of file OccupancyGrid.cpp.

◆ getCache()

const std::map<int, std::pair<std::pair<cv::Mat, cv::Mat>, cv::Mat> >& rtabmap::OccupancyGrid::getCache ( ) const
inline

Definition at line 67 of file OccupancyGrid.h.

◆ getCellSize()

float rtabmap::OccupancyGrid::getCellSize ( ) const
inline

Definition at line 58 of file OccupancyGrid.h.

◆ getMap()

cv::Mat rtabmap::OccupancyGrid::getMap ( float &  xMin,
float &  yMin 
) const

Definition at line 692 of file OccupancyGrid.cpp.

◆ getMapEmptyCells()

const pcl::PointCloud<pcl::PointXYZRGB>::Ptr& rtabmap::OccupancyGrid::getMapEmptyCells ( ) const
inline

Definition at line 105 of file OccupancyGrid.h.

◆ getMapGround()

const pcl::PointCloud<pcl::PointXYZRGB>::Ptr& rtabmap::OccupancyGrid::getMapGround ( ) const
inline

Definition at line 103 of file OccupancyGrid.h.

◆ getMapObstacles()

const pcl::PointCloud<pcl::PointXYZRGB>::Ptr& rtabmap::OccupancyGrid::getMapObstacles ( ) const
inline

Definition at line 104 of file OccupancyGrid.h.

◆ getMemoryUsed()

unsigned long rtabmap::OccupancyGrid::getMemoryUsed ( ) const

Definition at line 1635 of file OccupancyGrid.cpp.

◆ getMinMapSize()

float rtabmap::OccupancyGrid::getMinMapSize ( ) const
inline

Definition at line 60 of file OccupancyGrid.h.

◆ getProbMap()

cv::Mat rtabmap::OccupancyGrid::getProbMap ( float &  xMin,
float &  yMin 
) const

Definition at line 735 of file OccupancyGrid.cpp.

◆ getUpdateError()

float rtabmap::OccupancyGrid::getUpdateError ( ) const
inline

Definition at line 63 of file OccupancyGrid.h.

◆ isFullUpdate()

bool rtabmap::OccupancyGrid::isFullUpdate ( ) const
inline

Definition at line 62 of file OccupancyGrid.h.

◆ isGridFromDepth()

bool rtabmap::OccupancyGrid::isGridFromDepth ( ) const
inline

Definition at line 61 of file OccupancyGrid.h.

◆ isMapFrameProjection()

bool rtabmap::OccupancyGrid::isMapFrameProjection ( ) const
inline

Definition at line 64 of file OccupancyGrid.h.

◆ logodds()

static float rtabmap::OccupancyGrid::logodds ( double  probability)
inlinestatic

Definition at line 43 of file OccupancyGrid.h.

◆ parseParameters()

void rtabmap::OccupancyGrid::parseParameters ( const ParametersMap parameters)

Definition at line 93 of file OccupancyGrid.cpp.

◆ probability()

static double rtabmap::OccupancyGrid::probability ( double  logodds)
inlinestatic

Definition at line 48 of file OccupancyGrid.h.

◆ segmentCloud()

template<typename PointT >
pcl::PointCloud< PointT >::Ptr rtabmap::OccupancyGrid::segmentCloud ( const typename pcl::PointCloud< PointT >::Ptr &  cloud,
const pcl::IndicesPtr &  indices,
const Transform pose,
const cv::Point3f &  viewPoint,
pcl::IndicesPtr &  groundIndices,
pcl::IndicesPtr &  obstaclesIndices,
pcl::IndicesPtr *  flatObstacles = 0 
) const

Definition at line 38 of file OccupancyGrid.hpp.

◆ setCellSize()

void rtabmap::OccupancyGrid::setCellSize ( float  cellSize)

Definition at line 260 of file OccupancyGrid.cpp.

◆ setCloudAssembling()

void rtabmap::OccupancyGrid::setCloudAssembling ( bool  enabled)

Definition at line 274 of file OccupancyGrid.cpp.

◆ setMap()

void rtabmap::OccupancyGrid::setMap ( const cv::Mat &  map,
float  xMin,
float  yMin,
float  cellSize,
const std::map< int, Transform > &  poses 
)

Definition at line 226 of file OccupancyGrid.cpp.

◆ update()

bool rtabmap::OccupancyGrid::update ( const std::map< int, Transform > &  poses)

Definition at line 782 of file OccupancyGrid.cpp.

Member Data Documentation

◆ addedNodes_

std::map<int, Transform> rtabmap::OccupancyGrid::addedNodes_
private

Definition at line 156 of file OccupancyGrid.h.

◆ assembledEmptyCells_

pcl::PointCloud<pcl::PointXYZRGB>::Ptr rtabmap::OccupancyGrid::assembledEmptyCells_
private

Definition at line 161 of file OccupancyGrid.h.

◆ assembledGround_

pcl::PointCloud<pcl::PointXYZRGB>::Ptr rtabmap::OccupancyGrid::assembledGround_
private

Definition at line 159 of file OccupancyGrid.h.

◆ assembledObstacles_

pcl::PointCloud<pcl::PointXYZRGB>::Ptr rtabmap::OccupancyGrid::assembledObstacles_
private

Definition at line 160 of file OccupancyGrid.h.

◆ cache_

std::map<int, std::pair<std::pair<cv::Mat, cv::Mat>, cv::Mat> > rtabmap::OccupancyGrid::cache_
private

Definition at line 150 of file OccupancyGrid.h.

◆ cellCount_

std::map<int, std::pair<int, int> > rtabmap::OccupancyGrid::cellCount_
private

Definition at line 153 of file OccupancyGrid.h.

◆ cellSize_

float rtabmap::OccupancyGrid::cellSize_
private

Definition at line 119 of file OccupancyGrid.h.

◆ cloudAssembling_

bool rtabmap::OccupancyGrid::cloudAssembling_
private

Definition at line 158 of file OccupancyGrid.h.

◆ cloudDecimation_

unsigned int rtabmap::OccupancyGrid::cloudDecimation_
private

Definition at line 111 of file OccupancyGrid.h.

◆ cloudMaxDepth_

float rtabmap::OccupancyGrid::cloudMaxDepth_
private

Definition at line 112 of file OccupancyGrid.h.

◆ cloudMinDepth_

float rtabmap::OccupancyGrid::cloudMinDepth_
private

Definition at line 113 of file OccupancyGrid.h.

◆ clusterRadius_

float rtabmap::OccupancyGrid::clusterRadius_
private

Definition at line 127 of file OccupancyGrid.h.

◆ erode_

bool rtabmap::OccupancyGrid::erode_
private

Definition at line 141 of file OccupancyGrid.h.

◆ flatObstaclesDetected_

bool rtabmap::OccupancyGrid::flatObstaclesDetected_
private

Definition at line 129 of file OccupancyGrid.h.

◆ footprintHeight_

float rtabmap::OccupancyGrid::footprintHeight_
private

Definition at line 117 of file OccupancyGrid.h.

◆ footprintLength_

float rtabmap::OccupancyGrid::footprintLength_
private

Definition at line 115 of file OccupancyGrid.h.

◆ footprintRadius_

float rtabmap::OccupancyGrid::footprintRadius_
private

Definition at line 142 of file OccupancyGrid.h.

◆ footprintWidth_

float rtabmap::OccupancyGrid::footprintWidth_
private

Definition at line 116 of file OccupancyGrid.h.

◆ fullUpdate_

bool rtabmap::OccupancyGrid::fullUpdate_
private

Definition at line 139 of file OccupancyGrid.h.

◆ grid3D_

bool rtabmap::OccupancyGrid::grid3D_
private

Definition at line 133 of file OccupancyGrid.h.

◆ groundIsObstacle_

bool rtabmap::OccupancyGrid::groundIsObstacle_
private

Definition at line 134 of file OccupancyGrid.h.

◆ groundNormalsUp_

float rtabmap::OccupancyGrid::groundNormalsUp_
private

Definition at line 125 of file OccupancyGrid.h.

◆ map_

cv::Mat rtabmap::OccupancyGrid::map_
private

Definition at line 151 of file OccupancyGrid.h.

◆ mapInfo_

cv::Mat rtabmap::OccupancyGrid::mapInfo_
private

Definition at line 152 of file OccupancyGrid.h.

◆ maxGroundAngle_

float rtabmap::OccupancyGrid::maxGroundAngle_
private

Definition at line 126 of file OccupancyGrid.h.

◆ maxGroundHeight_

float rtabmap::OccupancyGrid::maxGroundHeight_
private

Definition at line 131 of file OccupancyGrid.h.

◆ maxObstacleHeight_

float rtabmap::OccupancyGrid::maxObstacleHeight_
private

Definition at line 123 of file OccupancyGrid.h.

◆ minClusterSize_

int rtabmap::OccupancyGrid::minClusterSize_
private

Definition at line 128 of file OccupancyGrid.h.

◆ minGroundHeight_

float rtabmap::OccupancyGrid::minGroundHeight_
private

Definition at line 130 of file OccupancyGrid.h.

◆ minMapSize_

float rtabmap::OccupancyGrid::minMapSize_
private

Definition at line 140 of file OccupancyGrid.h.

◆ noiseFilteringMinNeighbors_

int rtabmap::OccupancyGrid::noiseFilteringMinNeighbors_
private

Definition at line 136 of file OccupancyGrid.h.

◆ noiseFilteringRadius_

float rtabmap::OccupancyGrid::noiseFilteringRadius_
private

Definition at line 135 of file OccupancyGrid.h.

◆ normalKSearch_

int rtabmap::OccupancyGrid::normalKSearch_
private

Definition at line 124 of file OccupancyGrid.h.

◆ normalsSegmentation_

bool rtabmap::OccupancyGrid::normalsSegmentation_
private

Definition at line 132 of file OccupancyGrid.h.

◆ occupancySensor_

int rtabmap::OccupancyGrid::occupancySensor_
private

Definition at line 121 of file OccupancyGrid.h.

◆ occupancyThr_

float rtabmap::OccupancyGrid::occupancyThr_
private

Definition at line 144 of file OccupancyGrid.h.

◆ parameters_

ParametersMap rtabmap::OccupancyGrid::parameters_
private

Definition at line 110 of file OccupancyGrid.h.

◆ preVoxelFiltering_

bool rtabmap::OccupancyGrid::preVoxelFiltering_
private

Definition at line 120 of file OccupancyGrid.h.

◆ probClampingMax_

float rtabmap::OccupancyGrid::probClampingMax_
private

Definition at line 148 of file OccupancyGrid.h.

◆ probClampingMin_

float rtabmap::OccupancyGrid::probClampingMin_
private

Definition at line 147 of file OccupancyGrid.h.

◆ probHit_

float rtabmap::OccupancyGrid::probHit_
private

Definition at line 145 of file OccupancyGrid.h.

◆ probMiss_

float rtabmap::OccupancyGrid::probMiss_
private

Definition at line 146 of file OccupancyGrid.h.

◆ projMapFrame_

bool rtabmap::OccupancyGrid::projMapFrame_
private

Definition at line 122 of file OccupancyGrid.h.

◆ rayTracing_

bool rtabmap::OccupancyGrid::rayTracing_
private

Definition at line 138 of file OccupancyGrid.h.

◆ roiRatios_

std::vector<float> rtabmap::OccupancyGrid::roiRatios_
private

Definition at line 114 of file OccupancyGrid.h.

◆ scan2dUnknownSpaceFilled_

bool rtabmap::OccupancyGrid::scan2dUnknownSpaceFilled_
private

Definition at line 137 of file OccupancyGrid.h.

◆ scanDecimation_

int rtabmap::OccupancyGrid::scanDecimation_
private

Definition at line 118 of file OccupancyGrid.h.

◆ updateError_

float rtabmap::OccupancyGrid::updateError_
private

Definition at line 143 of file OccupancyGrid.h.

◆ xMin_

float rtabmap::OccupancyGrid::xMin_
private

Definition at line 154 of file OccupancyGrid.h.

◆ yMin_

float rtabmap::OccupancyGrid::yMin_
private

Definition at line 155 of file OccupancyGrid.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:39:00