Go to the documentation of this file.
28 #ifndef SRC_OCTOMAP_H_
29 #define SRC_OCTOMAP_H_
31 #include "rtabmap/core/rtabmap_core_export.h"
33 #include <octomap/ColorOcTree.h>
34 #include <octomap/OcTreeKey.h>
36 #include <pcl/pcl_base.h>
37 #include <pcl/point_types.h>
44 #include <unordered_set>
51 class RtabmapColorOcTree;
117 octomap::OcTreeKey
key;
118 if (!this->coordToKeyChecked(octomap::point3d(
x,
y,
z),
key))
return NULL;
129 octomap:: OcTreeKey
key;
130 if (!this->coordToKeyChecked(octomap::point3d(
x,
y,
z),
key))
return NULL;
141 octomap::OcTreeKey
key;
142 if (!this->coordToKeyChecked(octomap::point3d(
x,
y,
z),
key))
return NULL;
181 pcl::PointCloud<pcl::PointXYZRGB>::Ptr createCloud(
182 unsigned int treeDepth = 0,
183 std::vector<int> * obstacleIndices = 0,
184 std::vector<int> * emptyIndices = 0,
185 std::vector<int> * groundIndices = 0,
186 bool originalRefPoints =
true,
187 std::vector<int> * frontierIndices = 0,
188 std::vector<double> * cloudProb = 0)
const;
190 cv::Mat createProjectionMap(
193 float & gridCellSize,
194 float minGridSize = 0.0f,
195 unsigned int treeDepth = 0);
197 bool writeBinary(
const std::string & path);
200 virtual void clear();
201 virtual unsigned long getMemoryUsed()
const;
205 static std::unordered_set<octomap::OcTreeKey, octomap::OcTreeKey::KeyHash> findEmptyNode(
RtabmapColorOcTree* octree_,
unsigned int treeDepth, octomap::point3d startPosition);
206 static void floodFill(
RtabmapColorOcTree* octree_,
unsigned int treeDepth,octomap::point3d startPosition, std::unordered_set<octomap::OcTreeKey, octomap::OcTreeKey::KeyHash> & EmptyNodes,std::queue<octomap::point3d>& positionToExplore);
207 static bool isNodeVisited(std::unordered_set<octomap::OcTreeKey,octomap::OcTreeKey::KeyHash>
const & EmptyNodes,octomap::OcTreeKey
const key);
208 static octomap::point3d findCloseEmpty(
RtabmapColorOcTree* octree_,
unsigned int treeDepth,octomap::point3d startPosition);
209 static bool isValidEmpty(
RtabmapColorOcTree* octree_,
unsigned int treeDepth,octomap::point3d startPosition);
212 virtual void assemble(
const std::list<std::pair<int, Transform> > & newPoses);
215 void updateMinMax(
const octomap::point3d & point);
RtabmapColorOcTreeNode * integrateNodeColor(float x, float y, float z, uint8_t r, uint8_t g, uint8_t b)
const octomap::point3d & getPointRef() const
void setNodeRefId(int nodeRefId)
bool createChild(unsigned int i)
RtabmapColorOcTree * octree_
unsigned int emptyFloodFillDepth_
const RtabmapColorOcTree * octree() const
RtabmapColorOcTreeNode * getChild(unsigned int i)
static StaticMemberInitializer RtabmapColorOcTreeMemberInit
static member to ensure static initialization (only once)
virtual ~RtabmapColorOcTree()
std::map< std::string, std::string > ParametersMap
RtabmapColorOcTreeNode * setNodeColor(float x, float y, float z, uint8_t r, uint8_t g, uint8_t b)
StaticMemberInitializer()
void setOccupancyType(char type)
void updateInnerOccupancy()
RtabmapColorOcTree * create() const
virtual bool isNodeCollapsible(const RtabmapColorOcTreeNode *node) const
void updateInnerOccupancyRecurs(RtabmapColorOcTreeNode *node, unsigned int depth)
RtabmapColorOcTreeNode * integrateNodeColor(const octomap::OcTreeKey &key, uint8_t r, uint8_t g, uint8_t b)
const gtsam::Symbol key( 'X', 0)
octomap::point3d pointRef_
void updateOccupancyTypeChildren()
RtabmapColorOcTree(double resolution)
Default constructor, sets resolution of leafs.
std::string getTreeType() const
RtabmapColorOcTreeNode * setNodeColor(const octomap::OcTreeKey &key, uint8_t r, uint8_t g, uint8_t b)
RtabmapColorOcTreeNode(const RtabmapColorOcTreeNode &rhs)
int getOccupancyType() const
RtabmapColorOcTreeNode * averageNodeColor(float x, float y, float z, uint8_t r, uint8_t g, uint8_t b)
virtual bool pruneNode(RtabmapColorOcTreeNode *node)
RtabmapColorOcTreeNode * averageNodeColor(const octomap::OcTreeKey &key, uint8_t r, uint8_t g, uint8_t b)
void setPointRef(const octomap::point3d &point)
rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:13