10 #ifndef MRPT_COctoMap_H
11 #define MRPT_COctoMap_H
20 namespace octomap {
class OcTree; }
21 namespace octomap {
class OcTreeNode; }
41 COctoMap(
const double resolution = 0.10);
63 const float end_x,
const float end_y,
const float end_z,
64 const float sensor_x,
const float sensor_y,
const float sensor_z);
69 const double x,
const double y,
const double z,
bool occupied);
73 const float x,
const float y,
const float z)
const;
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define MAP_DEFINITION_END(_CLASS_NAME_)
#define MAP_DEFINITION_START(_CLASS_NAME_)
Add a MAP_DEFINITION_START() ...
A three-dimensional probabilistic occupancy grid, implemented as an octo-tree with the "octomap" C++ ...
A three-dimensional probabilistic occupancy grid, implemented as an octo-tree with the "octomap" C++ ...
void updateVoxel(const double x, const double y, const double z, bool occupied)
Manually updates the occupancy of the voxel at (x,y,z) as being occupied (true) or free (false),...
bool isPointWithinOctoMap(const float x, const float y, const float z) const
Check whether the given point lies within the volume covered by the octomap (that is,...
void setClampingThresMin(double thresProb) override
bool internal_insertObservation(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose) override
Internal method called by insertObservation()
void setProbHit(double prob) override
double getResolution() const
void internal_clear() override
Internal method called by clear()
float getProbMissLog() const override
void setProbMiss(double prob) override
size_t memoryFullGrid() const
size_t getNumLeafNodes() const
Traverses the tree to calculate the total number of leaf nodes.
void getMetricMin(double &x, double &y, double &z)
minimum value of the bounding box of all known space in x, y, z
double getClampingThresMin() const override
void getMetricMax(double &x, double &y, double &z)
maximum value of the bounding box of all known space in x, y, z
void setClampingThresMax(double thresProb) override
void getMetricSize(double &x, double &y, double &z)
Size of OcTree (all known space) in meters for x, y and z dimension.
float getProbHitLog() const override
double getClampingThresMax() const override
float getOccupancyThresLog() const override
unsigned int getTreeDepth() const
float getClampingThresMinLog() const override
void setOccupancyThres(double prob) override
size_t memoryUsageNode() const
double getProbMiss() const override
size_t calcNumNodes() const
Traverses the tree to calculate the total number of nodes.
virtual void getAsOctoMapVoxels(mrpt::opengl::COctoMapVoxels &gl_obj) const override
Builds a renderizable representation of the octomap as a mrpt::opengl::COctoMapVoxels object.
size_t memoryUsage() const
float getClampingThresMaxLog() const override
double getProbHit() const override
void insertRay(const float end_x, const float end_y, const float end_z, const float sensor_x, const float sensor_y, const float sensor_z)
Just like insertPointCloud but with a single ray.
COctoMap(const double resolution=0.10)
Default constructor.
virtual ~COctoMap()
Destructor.
virtual bool isEmpty() const override
Returns true if the map is empty/no observation has been inserted.
double getOccupancyThres() const override
Declares a class that represents any robot's observation.
A flexible renderer of voxels, typically from a 3D octo map (see mrpt::maps::COctoMap).
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.