#include <AbstractOccupancyOcTree.h>
Public Member Functions | |
AbstractOccupancyOcTree () | |
double | getClampingThresMax () const |
float | getClampingThresMaxLog () const |
double | getClampingThresMin () const |
float | getClampingThresMinLog () const |
double | getOccupancyThres () const |
float | getOccupancyThresLog () const |
double | getProbHit () const |
float | getProbHitLog () const |
double | getProbMiss () const |
float | getProbMissLog () const |
bool | isNodeAtThreshold (const OcTreeNode *occupancyNode) const |
queries whether a node is at the clamping threshold according to the tree's parameter More... | |
bool | isNodeAtThreshold (const OcTreeNode &occupancyNode) const |
queries whether a node is at the clamping threshold according to the tree's parameter More... | |
bool | isNodeOccupied (const OcTreeNode *occupancyNode) const |
queries whether a node is occupied according to the tree's parameter for "occupancy" More... | |
bool | isNodeOccupied (const OcTreeNode &occupancyNode) const |
queries whether a node is occupied according to the tree's parameter for "occupancy" More... | |
bool | readBinary (std::istream &s) |
bool | readBinary (const std::string &filename) |
virtual std::istream & | readBinaryData (std::istream &s)=0 |
Reads the actual data, implemented in OccupancyOcTreeBase::readBinaryData() More... | |
void | setClampingThresMax (double thresProb) |
sets the maximum threshold for occupancy clamping (sensor model) More... | |
void | setClampingThresMin (double thresProb) |
sets the minimum threshold for occupancy clamping (sensor model) More... | |
void | setOccupancyThres (double prob) |
sets the threshold for occupancy (sensor model) More... | |
void | setProbHit (double prob) |
sets the probability for a "hit" (will be converted to logodds) - sensor model More... | |
void | setProbMiss (double prob) |
sets the probability for a "miss" (will be converted to logodds) - sensor model More... | |
virtual void | toMaxLikelihood ()=0 |
virtual OcTreeNode * | updateNode (const OcTreeKey &key, float log_odds_update, bool lazy_eval=false)=0 |
virtual OcTreeNode * | updateNode (const point3d &value, float log_odds_update, bool lazy_eval=false)=0 |
virtual OcTreeNode * | updateNode (const OcTreeKey &key, bool occupied, bool lazy_eval=false)=0 |
virtual OcTreeNode * | updateNode (const point3d &value, bool occupied, bool lazy_eval=false)=0 |
bool | writeBinary (const std::string &filename) |
bool | writeBinary (std::ostream &s) |
bool | writeBinaryConst (const std::string &filename) const |
bool | writeBinaryConst (std::ostream &s) const |
virtual std::ostream & | writeBinaryData (std::ostream &s) const =0 |
Writes the actual data, implemented in OccupancyOcTreeBase::writeBinaryData() More... | |
virtual | ~AbstractOccupancyOcTree () |
Public Member Functions inherited from octomap::AbstractOcTree | |
AbstractOcTree () | |
virtual void | clear ()=0 |
virtual AbstractOcTree * | create () const =0 |
virtual constructor: creates a new object of same type More... | |
virtual void | expand ()=0 |
virtual void | getMetricMax (double &x, double &y, double &z)=0 |
virtual void | getMetricMax (double &x, double &y, double &z) const =0 |
virtual void | getMetricMin (double &x, double &y, double &z)=0 |
virtual void | getMetricMin (double &x, double &y, double &z) const =0 |
virtual void | getMetricSize (double &x, double &y, double &z)=0 |
virtual double | getResolution () const =0 |
virtual std::string | getTreeType () const =0 |
returns actual class name as string for identification More... | |
virtual size_t | memoryUsage () const =0 |
virtual size_t | memoryUsageNode () const =0 |
virtual void | prune ()=0 |
virtual std::istream & | readData (std::istream &s)=0 |
virtual void | setResolution (double res)=0 |
virtual size_t | size () const =0 |
bool | write (const std::string &filename) const |
Write file header and complete tree to file (serialization) More... | |
bool | write (std::ostream &s) const |
Write file header and complete tree to stream (serialization) More... | |
virtual std::ostream & | writeData (std::ostream &s) const =0 |
virtual | ~AbstractOcTree () |
Protected Member Functions | |
bool | readBinaryLegacyHeader (std::istream &s, unsigned int &size, double &res) |
Try to read the old binary format for conversion, will be removed in the future. More... | |
Protected Attributes | |
float | clamping_thres_max |
float | clamping_thres_min |
float | occ_prob_thres_log |
float | prob_hit_log |
float | prob_miss_log |
Static Protected Attributes | |
static const std::string | binaryFileHeader = "# Octomap OcTree binary file" |
Static Protected Attributes inherited from octomap::AbstractOcTree | |
static const std::string | fileHeader = "# Octomap OcTree file" |
Additional Inherited Members | |
Static Public Member Functions inherited from octomap::AbstractOcTree | |
static AbstractOcTree * | createTree (const std::string id, double res) |
static AbstractOcTree * | read (const std::string &filename) |
static AbstractOcTree * | read (std::istream &s) |
Static Protected Member Functions inherited from octomap::AbstractOcTree | |
static bool | readHeader (std::istream &s, std::string &id, unsigned &size, double &res) |
static void | registerTreeType (AbstractOcTree *tree) |
Interface class for all octree types that store occupancy. This serves as a common base class e.g. for polymorphism and contains common code for reading and writing binary trees.
Definition at line 52 of file AbstractOccupancyOcTree.h.
octomap::AbstractOccupancyOcTree::AbstractOccupancyOcTree | ( | ) |
Definition at line 40 of file AbstractOccupancyOcTree.cpp.
|
inlinevirtual |
Definition at line 55 of file AbstractOccupancyOcTree.h.
|
inline |
Definition at line 217 of file AbstractOccupancyOcTree.h.
|
inline |
Definition at line 219 of file AbstractOccupancyOcTree.h.
|
inline |
Definition at line 213 of file AbstractOccupancyOcTree.h.
|
inline |
Definition at line 215 of file AbstractOccupancyOcTree.h.
|
inline |
Definition at line 199 of file AbstractOccupancyOcTree.h.
|
inline |
Definition at line 201 of file AbstractOccupancyOcTree.h.
|
inline |
Definition at line 204 of file AbstractOccupancyOcTree.h.
|
inline |
Definition at line 206 of file AbstractOccupancyOcTree.h.
|
inline |
Definition at line 208 of file AbstractOccupancyOcTree.h.
|
inline |
Definition at line 210 of file AbstractOccupancyOcTree.h.
|
inline |
queries whether a node is at the clamping threshold according to the tree's parameter
Definition at line 124 of file AbstractOccupancyOcTree.h.
|
inline |
queries whether a node is at the clamping threshold according to the tree's parameter
Definition at line 130 of file AbstractOccupancyOcTree.h.
|
inline |
queries whether a node is occupied according to the tree's parameter for "occupancy"
Definition at line 114 of file AbstractOccupancyOcTree.h.
|
inline |
queries whether a node is occupied according to the tree's parameter for "occupancy"
Definition at line 119 of file AbstractOccupancyOcTree.h.
bool octomap::AbstractOccupancyOcTree::readBinary | ( | std::istream & | s | ) |
Reads an OcTree from an input stream. Existing nodes of the tree are deleted before the tree is read.
Definition at line 135 of file AbstractOccupancyOcTree.cpp.
bool octomap::AbstractOccupancyOcTree::readBinary | ( | const std::string & | filename | ) |
Reads OcTree from a binary file. Existing nodes of the tree are deleted before the tree is read.
Definition at line 126 of file AbstractOccupancyOcTree.cpp.
|
pure virtual |
Reads the actual data, implemented in OccupancyOcTreeBase::readBinaryData()
Implemented in octomap::OccupancyOcTreeBase< NODE >, octomap::OccupancyOcTreeBase< ColorOcTreeNode >, octomap::OccupancyOcTreeBase< OcTreeNode >, and octomap::OccupancyOcTreeBase< OcTreeNodeStamped >.
|
protected |
Try to read the old binary format for conversion, will be removed in the future.
Definition at line 98 of file AbstractOccupancyOcTree.cpp.
|
inline |
sets the maximum threshold for occupancy clamping (sensor model)
Definition at line 196 of file AbstractOccupancyOcTree.h.
|
inline |
sets the minimum threshold for occupancy clamping (sensor model)
Definition at line 194 of file AbstractOccupancyOcTree.h.
|
inline |
sets the threshold for occupancy (sensor model)
Definition at line 188 of file AbstractOccupancyOcTree.h.
|
inline |
sets the probability for a "hit" (will be converted to logodds) - sensor model
Definition at line 190 of file AbstractOccupancyOcTree.h.
|
inline |
sets the probability for a "miss" (will be converted to logodds) - sensor model
Definition at line 192 of file AbstractOccupancyOcTree.h.
|
pure virtual |
|
pure virtual |
Manipulate log_odds value of voxel directly
key | of the NODE that is to be updated |
log_odds_update | value to be added (+) to log_odds value of node |
lazy_eval | whether update of inner nodes is omitted after the update (default: false). This speeds up the insertion, but you need to call updateInnerOccupancy() when done. |
Implemented in octomap::OccupancyOcTreeBase< NODE >, octomap::OccupancyOcTreeBase< ColorOcTreeNode >, octomap::OccupancyOcTreeBase< OcTreeNode >, and octomap::OccupancyOcTreeBase< OcTreeNodeStamped >.
|
pure virtual |
Manipulate log_odds value of voxel directly. Looks up the OcTreeKey corresponding to the coordinate and then calls udpateNode() with it.
value | 3d coordinate of the NODE that is to be updated |
log_odds_update | value to be added (+) to log_odds value of node |
lazy_eval | whether update of inner nodes is omitted after the update (default: false). This speeds up the insertion, but you need to call updateInnerOccupancy() when done. |
Implemented in octomap::OccupancyOcTreeBase< NODE >, octomap::OccupancyOcTreeBase< ColorOcTreeNode >, octomap::OccupancyOcTreeBase< OcTreeNode >, and octomap::OccupancyOcTreeBase< OcTreeNodeStamped >.
|
pure virtual |
Integrate occupancy measurement.
key | of the NODE that is to be updated |
occupied | true if the node was measured occupied, else false |
lazy_eval | whether update of inner nodes is omitted after the update (default: false). This speeds up the insertion, but you need to call updateInnerOccupancy() when done. |
Implemented in octomap::OccupancyOcTreeBase< NODE >, octomap::OccupancyOcTreeBase< ColorOcTreeNode >, octomap::OccupancyOcTreeBase< OcTreeNode >, and octomap::OccupancyOcTreeBase< OcTreeNodeStamped >.
|
pure virtual |
Integrate occupancy measurement. Looks up the OcTreeKey corresponding to the coordinate and then calls udpateNode() with it.
value | 3d coordinate of the NODE that is to be updated |
occupied | true if the node was measured occupied, else false |
lazy_eval | whether update of inner nodes is omitted after the update (default: false). This speeds up the insertion, but you need to call updateInnerOccupancy() when done. |
Implemented in octomap::OccupancyOcTreeBase< NODE >, octomap::OccupancyOcTreeBase< ColorOcTreeNode >, octomap::OccupancyOcTreeBase< OcTreeNode >, and octomap::OccupancyOcTreeBase< OcTreeNodeStamped >.
bool octomap::AbstractOccupancyOcTree::writeBinary | ( | const std::string & | filename | ) |
Writes OcTree to a binary file using writeBinary(). The OcTree is first converted to the maximum likelihood estimate and pruned.
Definition at line 50 of file AbstractOccupancyOcTree.cpp.
bool octomap::AbstractOccupancyOcTree::writeBinary | ( | std::ostream & | s | ) |
Writes compressed maximum likelihood OcTree to a binary stream. The OcTree is first converted to the maximum likelihood estimate and pruned for maximum compression.
Definition at line 72 of file AbstractOccupancyOcTree.cpp.
bool octomap::AbstractOccupancyOcTree::writeBinaryConst | ( | const std::string & | filename | ) | const |
Writes OcTree to a binary file using writeBinaryConst(). The OcTree is not changed, in particular not pruned first. Files will be smaller when the tree is pruned first or by using writeBinary() instead.
Definition at line 60 of file AbstractOccupancyOcTree.cpp.
bool octomap::AbstractOccupancyOcTree::writeBinaryConst | ( | std::ostream & | s | ) | const |
Writes the maximum likelihood OcTree to a binary stream (const variant). Files will be smaller when the tree is pruned first or by using writeBinary() instead.
Definition at line 79 of file AbstractOccupancyOcTree.cpp.
|
pure virtual |
Writes the actual data, implemented in OccupancyOcTreeBase::writeBinaryData()
Implemented in octomap::OccupancyOcTreeBase< NODE >, octomap::OccupancyOcTreeBase< ColorOcTreeNode >, octomap::OccupancyOcTreeBase< OcTreeNode >, and octomap::OccupancyOcTreeBase< OcTreeNodeStamped >.
|
staticprotected |
Definition at line 235 of file AbstractOccupancyOcTree.h.
|
protected |
Definition at line 230 of file AbstractOccupancyOcTree.h.
|
protected |
Definition at line 229 of file AbstractOccupancyOcTree.h.
|
protected |
Definition at line 233 of file AbstractOccupancyOcTree.h.
|
protected |
Definition at line 231 of file AbstractOccupancyOcTree.h.
|
protected |
Definition at line 232 of file AbstractOccupancyOcTree.h.