Base implementation for Occupancy Octrees (e.g.
for mapping). AbstractOccupancyOcTree serves as a common base interface for all these classes. Each class used as NODE type needs to be derived from OccupancyOcTreeNode.
This tree implementation has a maximum depth of 16. At a resolution of 1 cm, values have to be < +/- 327.68 meters (2^15)
This limitation enables the use of an efficient key generation method which uses the binary representation of the data.
NODE | Node class to be used in tree (usually derived from OcTreeDataNode) |
Definition at line 81 of file OccupancyOcTreeBase.h.
#include <mrpt/otherlibs/octomap/OccupancyOcTreeBase.h>
Public Types | |
typedef NODE | NodeType |
Make the templated NODE type available from the outside. More... | |
typedef leaf_iterator | iterator |
Public Member Functions | |
OccupancyOcTreeBase (double resolution) | |
Default constructor, sets resolution of leafs. More... | |
virtual | ~OccupancyOcTreeBase () |
OccupancyOcTreeBase (const OccupancyOcTreeBase< NODE > &rhs) | |
Copy constructor. More... | |
virtual void | insertScan (const Pointcloud &scan, const octomap::point3d &sensor_origin, double maxrange=-1., bool pruning=true, bool lazy_eval=false) |
Integrate a Pointcloud (in global reference frame) More... | |
template<class SCAN > | |
void | insertScan_templ (const SCAN &scan, const octomap::point3d &sensor_origin, double maxrange=-1., bool pruning=true, bool lazy_eval=false) |
virtual void | insertScan (const Pointcloud &scan, const point3d &sensor_origin, const pose6d &frame_origin, double maxrange=-1., bool pruning=true, bool lazy_eval=false) |
Integrate a 3d scan, transform scan before tree update. More... | |
virtual void | insertScan (const ScanNode &scan, double maxrange=-1., bool pruning=true, bool lazy_eval=false) |
Insert a 3d scan (given as a ScanNode) into the tree. More... | |
virtual void | insertScanNaive (const Pointcloud &pc, const point3d &origin, double maxrange, bool pruning=true, bool lazy_eval=false) |
for testing only More... | |
virtual NODE * | updateNode (const OcTreeKey &key, float log_odds_update, bool lazy_eval=false) |
Manipulate log_odds value of voxel directly. More... | |
virtual NODE * | updateNode (const point3d &value, float log_odds_update, bool lazy_eval=false) |
Manipulate log_odds value of voxel directly. More... | |
virtual NODE * | updateNode (double x, double y, double z, float log_odds_update, bool lazy_eval=false) |
Manipulate log_odds value of voxel directly. More... | |
virtual NODE * | updateNode (const OcTreeKey &key, bool occupied, bool lazy_eval=false) |
Integrate occupancy measurement. More... | |
virtual NODE * | updateNode (const point3d &value, bool occupied, bool lazy_eval=false) |
Integrate occupancy measurement. More... | |
virtual NODE * | updateNode (double x, double y, double z, bool occupied, bool lazy_eval=false) |
Integrate occupancy measurement. More... | |
virtual void | toMaxLikelihood () |
Creates the maximum likelihood map by calling toMaxLikelihood on all tree nodes, setting their occupancy to the corresponding occupancy thresholds. More... | |
virtual bool | insertRay (const point3d &origin, const point3d &end, double maxrange=-1.0, bool lazy_eval=false) |
Insert one ray between origin and end into the tree. More... | |
virtual bool | castRay (const point3d &origin, const point3d &direction, point3d &end, bool ignoreUnknownCells=false, double maxRange=-1.0) const |
Performs raycasting in 3d, similar to computeRay(). More... | |
DEPRECATED (void getOccupied(point3d_list &node_centers, unsigned int max_depth=0) const) | |
Convenience function to return all occupied nodes in the OcTree. More... | |
DEPRECATED (void getOccupied(std::list< OcTreeVolume > &occupied_volumes, unsigned int max_depth=0) const) | |
Convenience function to return all occupied nodes in the OcTree. More... | |
DEPRECATED (void getOccupied(std::list< OcTreeVolume > &binary_nodes, std::list< OcTreeVolume > &delta_nodes, unsigned int max_depth=0) const) | |
Traverses the tree and collects all OcTreeVolumes regarded as occupied. More... | |
DEPRECATED (void getOccupiedLeafsBBX(point3d_list &node_centers, point3d min, point3d max) const) | |
returns occupied leafs within a bounding box defined by min and max. More... | |
DEPRECATED (void getFreespace(std::list< OcTreeVolume > &free_volumes, unsigned int max_depth=0) const) | |
Convenience function to return all free nodes in the OcTree. More... | |
DEPRECATED (void getFreespace(std::list< OcTreeVolume > &binary_nodes, std::list< OcTreeVolume > &delta_nodes, unsigned int max_depth=0) const) | |
Traverses the tree and collects all OcTreeVolumes regarded as free. More... | |
void | useBBXLimit (bool enable) |
use or ignore BBX limit (default: ignore) More... | |
bool | bbxSet () const |
void | setBBXMin (point3d &min) |
sets the minimum for a query bounding box to use More... | |
void | setBBXMax (point3d &max) |
sets the maximum for a query bounding box to use More... | |
point3d | getBBXMin () const |
point3d | getBBXMax () const |
point3d | getBBXBounds () const |
point3d | getBBXCenter () const |
bool | inBBX (const point3d &p) const |
bool | inBBX (const OcTreeKey &key) const |
void | enableChangeDetection (bool enable) |
track or ignore changes while inserting scans (default: ignore) More... | |
void | resetChangeDetection () |
Reset the set of changed keys. Call this after you obtained all changed nodes. More... | |
KeyBoolMap::const_iterator | changedKeysBegin () |
Iterator to traverse all keys of changed nodes. More... | |
KeyBoolMap::const_iterator | changedKeysEnd () |
Iterator to traverse all keys of changed nodes. More... | |
void | computeUpdate (const Pointcloud &scan, const octomap::point3d &origin, KeySet &free_cells, KeySet &occupied_cells, double maxrange) |
Helper for insertScan. More... | |
template<class POINTCLOUD > | |
void | computeUpdate_templ (const POINTCLOUD &scan, const octomap::point3d &origin, KeySet &free_cells, KeySet &occupied_cells, double maxrange) |
void | computeUpdate_onePoint (const point3d &p, const octomap::point3d &origin, KeySet &free_cells, KeySet &occupied_cells, double maxrange) |
std::istream & | readBinaryData (std::istream &s) |
Reads only the data (=tree structure) from the input stream. More... | |
std::istream & | readBinaryNode (std::istream &s, NODE *node) const |
Read node from binary stream (max-likelihood value), recursively continue with all children. More... | |
std::ostream & | writeBinaryNode (std::ostream &s, const NODE *node) const |
Write node to binary stream (max-likelihood value), recursively continue with all children. More... | |
std::ostream & | writeBinaryData (std::ostream &s) const |
Writes the data of the tree (without header) to the stream, recursively calling writeBinaryNode (starting with root) More... | |
void | calcNumThresholdedNodes (unsigned int &num_thresholded, unsigned int &num_other) const |
void | updateInnerOccupancy () |
Updates the occupancy of all inner nodes to reflect their children's occupancy. More... | |
virtual void | integrateHit (NODE *occupancyNode) const |
integrate a "hit" measurement according to the tree's sensor model More... | |
virtual void | integrateMiss (NODE *occupancyNode) const |
integrate a "miss" measurement according to the tree's sensor model More... | |
virtual void | updateNodeLogOdds (NODE *occupancyNode, const float &update) const |
virtual void | nodeToMaxLikelihood (NODE *occupancyNode) const |
converts the node to the maximum likelihood value according to the tree's parameter for "occupancy" More... | |
virtual void | nodeToMaxLikelihood (NODE &occupancyNode) const |
converts the node to the maximum likelihood value according to the tree's parameter for "occupancy" More... | |
bool | operator== (const OcTreeBaseImpl< NODE, AbstractOccupancyOcTree > &rhs) const |
std::string | getTreeType () const |
void | setResolution (double r) |
Change the resolution of the octree, scaling all voxels. More... | |
double | getResolution () const |
unsigned int | getTreeDepth () const |
double | getNodeSize (unsigned depth) const |
NODE * | getRoot () const |
NODE * | search (double x, double y, double z, unsigned int depth=0) const |
Search node at specified depth given a 3d point (depth=0: search full tree depth) More... | |
NODE * | search (const point3d &value, unsigned int depth=0) const |
Search node at specified depth given a 3d point (depth=0: search full tree depth) More... | |
NODE * | search (const OcTreeKey &key, unsigned int depth=0) const |
Search a node at specified depth given an addressing key (depth=0: search full tree depth) More... | |
bool | deleteNode (double x, double y, double z, unsigned int depth=0) |
Delete a node (if exists) given a 3d point. More... | |
bool | deleteNode (const point3d &value, unsigned int depth=0) |
Delete a node (if exists) given a 3d point. More... | |
bool | deleteNode (const OcTreeKey &key, unsigned int depth=0) |
Delete a node (if exists) given an addressing key. More... | |
void | clear () |
Deletes the complete tree structure (only the root node will remain) More... | |
virtual void | prune () |
Lossless compression of OcTree: merge children to parent when there are eight children with identical values. More... | |
virtual void | expand () |
Expands all pruned nodes (reverse of prune()) More... | |
virtual size_t | size () const |
virtual size_t | memoryUsage () const |
virtual size_t | memoryUsageNode () const |
size_t | memoryFullGrid () const |
double | volume () const |
virtual void | getMetricSize (double &x, double &y, double &z) |
Size of OcTree (all known space) in meters for x, y and z dimension. More... | |
virtual void | getMetricSize (double &x, double &y, double &z) const |
Size of OcTree (all known space) in meters for x, y and z dimension. More... | |
virtual void | getMetricMin (double &x, double &y, double &z) |
minimum value of the bounding box of all known space in x, y, z More... | |
void | getMetricMin (double &x, double &y, double &z) const |
minimum value of the bounding box of all known space in x, y, z More... | |
virtual void | getMetricMax (double &x, double &y, double &z) |
maximum value of the bounding box of all known space in x, y, z More... | |
void | getMetricMax (double &x, double &y, double &z) const |
maximum value of the bounding box of all known space in x, y, z More... | |
size_t | calcNumNodes () const |
Traverses the tree to calculate the total number of nodes. More... | |
size_t | getNumLeafNodes () const |
Traverses the tree to calculate the total number of leaf nodes. More... | |
void | getUnknownLeafCenters (point3d_list &node_centers, point3d pmin, point3d pmax) const |
return centers of leafs that do NOT exist (but could) in a given bounding box More... | |
bool | computeRayKeys (const point3d &origin, const point3d &end, KeyRay &ray) const |
Traces a ray from origin to end (excluding), returning an OcTreeKey of all nodes traversed by the beam. More... | |
bool | computeRay (const point3d &origin, const point3d &end, std::vector< point3d > &ray) |
Traces a ray from origin to end (excluding), returning the coordinates of all nodes traversed by the beam. More... | |
std::istream & | readData (std::istream &s) |
Read all nodes from the input stream (without file header), for this the tree needs to be already created. More... | |
std::ostream & | writeData (std::ostream &s) const |
Write complete state of tree to stream (without file header) unmodified. More... | |
iterator | begin (unsigned char maxDepth=0) const |
const iterator | end () const |
leaf_iterator | begin_leafs (unsigned char maxDepth=0) const |
const leaf_iterator | end_leafs () const |
leaf_bbx_iterator | begin_leafs_bbx (const OcTreeKey &min, const OcTreeKey &max, unsigned char maxDepth=0) const |
leaf_bbx_iterator | begin_leafs_bbx (const point3d &min, const point3d &max, unsigned char maxDepth=0) const |
const leaf_bbx_iterator | end_leafs_bbx () const |
tree_iterator | begin_tree (unsigned char maxDepth=0) const |
const tree_iterator | end_tree () const |
unsigned short int | coordToKey (double coordinate) const |
Converts from a single coordinate into a discrete key. More... | |
unsigned short int | coordToKey (double coordinate, unsigned depth) const |
Converts from a single coordinate into a discrete key at a given depth. More... | |
OcTreeKey | coordToKey (const point3d &coord) const |
Converts from a 3D coordinate into a 3D addressing key. More... | |
OcTreeKey | coordToKey (double x, double y, double z) const |
Converts from a 3D coordinate into a 3D addressing key. More... | |
OcTreeKey | coordToKey (const point3d &coord, unsigned depth) const |
Converts from a 3D coordinate into a 3D addressing key at a given depth. More... | |
OcTreeKey | coordToKey (double x, double y, double z, unsigned depth) const |
Converts from a 3D coordinate into a 3D addressing key at a given depth. More... | |
OcTreeKey | adjustKeyAtDepth (const OcTreeKey &key, unsigned int depth) const |
Adjusts a 3D key from the lowest level to correspond to a higher depth (by shifting the key values) More... | |
unsigned short int | adjustKeyAtDepth (unsigned short int key, unsigned int depth) const |
Adjusts a single key value from the lowest level to correspond to a higher depth (by shifting the key value) More... | |
bool | coordToKeyChecked (const point3d &coord, OcTreeKey &key) const |
Converts a 3D coordinate into a 3D OcTreeKey, with boundary checking. More... | |
bool | coordToKeyChecked (const point3d &coord, unsigned depth, OcTreeKey &key) const |
Converts a 3D coordinate into a 3D OcTreeKey at a certain depth, with boundary checking. More... | |
bool | coordToKeyChecked (double x, double y, double z, OcTreeKey &key) const |
Converts a 3D coordinate into a 3D OcTreeKey, with boundary checking. More... | |
bool | coordToKeyChecked (double x, double y, double z, unsigned depth, OcTreeKey &key) const |
Converts a 3D coordinate into a 3D OcTreeKey at a certain depth, with boundary checking. More... | |
bool | coordToKeyChecked (double coordinate, unsigned short int &key) const |
Converts a single coordinate into a discrete addressing key, with boundary checking. More... | |
bool | coordToKeyChecked (double coordinate, unsigned depth, unsigned short int &key) const |
Converts a single coordinate into a discrete addressing key, with boundary checking. More... | |
double | keyToCoord (unsigned short int key, unsigned depth) const |
converts from a discrete key at a given depth into a coordinate corresponding to the key's center More... | |
double | keyToCoord (unsigned short int key) const |
converts from a discrete key at the lowest tree level into a coordinate corresponding to the key's center More... | |
point3d | keyToCoord (const OcTreeKey &key) const |
converts from an addressing key at the lowest tree level into a coordinate corresponding to the key's center More... | |
point3d | keyToCoord (const OcTreeKey &key, unsigned depth) const |
converts from an addressing key at a given depth into a coordinate corresponding to the key's center More... | |
DEPRECATED (bool genKeyValue(double coordinate, unsigned short int &keyval) const) | |
DEPRECATED (bool genKey(const point3d &point, OcTreeKey &key) const ) | |
DEPRECATED (bool genKeyValueAtDepth(const unsigned short int keyval, unsigned int depth, unsigned short int &out_keyval) const ) | |
DEPRECATED (bool genKeyAtDepth(const OcTreeKey &key, unsigned int depth, OcTreeKey &out_key) const ) | |
DEPRECATED (bool genCoordFromKey(const unsigned short int &key, unsigned depth, float &coord) const ) | |
DEPRECATED (inline bool genCoordFromKey(const unsigned short int &key, float &coord, unsigned depth) const) | |
DEPRECATED (inline bool genCoordFromKey(const unsigned short int &key, float &coord) const) | |
DEPRECATED (double genCoordFromKey(const unsigned short int &key, unsigned depth) const) | |
DEPRECATED (inline double genCoordFromKey(const unsigned short int &key) const) | |
DEPRECATED (inline bool genCoords(const OcTreeKey &key, unsigned int depth, point3d &point) const) | |
DEPRECATED (inline void genPos(const OcTreeKey &key, int depth, unsigned int &pos) const) | |
generate child index (between 0 and 7) from key at given tree depth DEPRECATED More... | |
bool | writeBinary (const std::string &filename) |
Writes OcTree to a binary file using writeBinary(). More... | |
bool | writeBinary (std::ostream &s) |
Writes compressed maximum likelihood OcTree to a binary stream. More... | |
bool | writeBinaryConst (const std::string &filename) const |
Writes OcTree to a binary file using writeBinaryConst(). More... | |
bool | writeBinaryConst (std::ostream &s) const |
Writes the maximum likelihood OcTree to a binary stream (const variant). More... | |
bool | readBinary (std::istream &s) |
Reads an OcTree from an input stream. More... | |
bool | readBinary (const std::string &filename) |
Reads OcTree from a binary file. 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 | 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... | |
void | setOccupancyThres (double prob) |
sets the threshold for occupancy (sensor model) More... | |
void | setProbHit (double prob) |
sets the probablility for a "hit" (will be converted to logodds) - sensor model More... | |
void | setProbMiss (double prob) |
sets the probablility for a "miss" (will be converted to logodds) - sensor model More... | |
void | setClampingThresMin (double thresProb) |
sets the minimum threshold for occupancy clamping (sensor model) More... | |
void | setClampingThresMax (double thresProb) |
sets the maximum threshold for occupancy clamping (sensor model) More... | |
double | getOccupancyThres () const |
float | getOccupancyThresLog () const |
double | getProbHit () const |
float | getProbHitLog () const |
double | getProbMiss () const |
float | getProbMissLog () const |
double | getClampingThresMin () const |
float | getClampingThresMinLog () const |
double | getClampingThresMax () const |
float | getClampingThresMaxLog () const |
virtual AbstractOcTree * | create () const =0 |
virtual constructor: creates a new object of same type More... | |
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... | |
Static Public Member Functions | |
static AbstractOcTree * | createTree (const std::string id, double res) |
Creates a certain OcTree (factory pattern) More... | |
static AbstractOcTree * | read (const std::string &filename) |
Read the file header, create the appropriate class and deserialize. More... | |
static AbstractOcTree * | read (std::istream &s) |
Read the file header, create the appropriate class and deserialize. More... | |
Protected Member Functions | |
OccupancyOcTreeBase (double resolution, unsigned int tree_depth, unsigned int tree_max_val) | |
Constructor to enable derived classes to change tree constants. More... | |
bool | integrateMissOnRay (const point3d &origin, const point3d &end, bool lazy_eval=false) |
Traces a ray from origin to end and updates all voxels on the way as free. More... | |
NODE * | updateNodeRecurs (NODE *node, bool node_just_created, const OcTreeKey &key, unsigned int depth, const float &log_odds_update, bool lazy_eval=false) |
void | updateInnerOccupancyRecurs (NODE *node, unsigned int depth) |
void | getOccupiedLeafsBBXRecurs (point3d_list &node_centers, unsigned int max_depth, NODE *node, unsigned int depth, const OcTreeKey &parent_key, const OcTreeKey &min, const OcTreeKey &max) const |
void | toMaxLikelihoodRecurs (NODE *node, unsigned int depth, unsigned int max_depth) |
void | calcNumThresholdedNodesRecurs (NODE *node, unsigned int &num_thresholded, unsigned int &num_other) const |
void | calcMinMax () |
recalculates min and max in x, y, z. Does nothing when tree size didn't change. More... | |
void | calcNumNodesRecurs (NODE *node, size_t &num_nodes) const |
bool | deleteNodeRecurs (NODE *node, unsigned int depth, unsigned int max_depth, const OcTreeKey &key) |
recursive call of deleteNode() More... | |
void | pruneRecurs (NODE *node, unsigned int depth, unsigned int max_depth, unsigned int &num_pruned) |
recursive call of prune() More... | |
void | expandRecurs (NODE *node, unsigned int depth, unsigned int max_depth) |
recursive call of expand() More... | |
size_t | getNumLeafNodesRecurs (const NODE *parent) const |
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... | |
Static Protected Member Functions | |
static bool | readHeader (std::istream &s, std::string &id, unsigned &size, double &res) |
static void | registerTreeType (AbstractOcTree *tree) |
Protected Attributes | |
bool | use_bbx_limit |
use bounding box for queries (needs to be set)? More... | |
point3d | bbx_min |
point3d | bbx_max |
OcTreeKey | bbx_min_key |
OcTreeKey | bbx_max_key |
bool | use_change_detection |
KeyBoolMap | changed_keys |
Set of leaf keys (lowest level) which changed since last resetChangeDetection. More... | |
NODE * | root |
const unsigned int | tree_depth |
Maximum tree depth is fixed to 16 currently. More... | |
const unsigned int | tree_max_val |
double | resolution |
in meters More... | |
double | resolution_factor |
= 1. / resolution More... | |
size_t | tree_size |
number of nodes in tree More... | |
bool | size_changed |
flag to denote whether the octree extent changed (for lazy min/max eval) More... | |
point3d | tree_center |
double | max_value [3] |
max in x, y, z More... | |
double | min_value [3] |
min in x, y, z More... | |
std::vector< double > | sizeLookupTable |
contains the size of a voxel at level i (0: root node). tree_depth+1 levels (incl. 0) More... | |
KeyRay | keyray |
const leaf_iterator | leaf_iterator_end |
const leaf_bbx_iterator | leaf_iterator_bbx_end |
const tree_iterator | tree_iterator_end |
float | clamping_thres_min |
float | clamping_thres_max |
float | prob_hit_log |
float | prob_miss_log |
float | occ_prob_thres_log |
Static Protected Attributes | |
static const std::string | binaryFileHeader |
static const std::string | fileHeader |
|
inherited |
Definition at line 261 of file OcTreeBaseImpl.h.
|
inherited |
Make the templated NODE type available from the outside.
Definition at line 89 of file OcTreeBaseImpl.h.
octomap::OccupancyOcTreeBase< NODE >::OccupancyOcTreeBase | ( | double | resolution | ) |
Default constructor, sets resolution of leafs.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
virtual |
octomap::OccupancyOcTreeBase< NODE >::OccupancyOcTreeBase | ( | const OccupancyOcTreeBase< NODE > & | rhs | ) |
Copy constructor.
|
protected |
Constructor to enable derived classes to change tree constants.
This usually requires a re-implementation of some core tree-traversal functions as well!
|
inlineinherited |
Adjusts a 3D key from the lowest level to correspond to a higher depth (by shifting the key values)
key | Input key, at the lowest tree level |
depth | Target depth level for the new key |
Definition at line 336 of file OcTreeBaseImpl.h.
|
inherited |
Adjusts a single key value from the lowest level to correspond to a higher depth (by shifting the key value)
key | Input key, at the lowest tree level |
depth | Target depth level for the new key |
|
inline |
Definition at line 319 of file OccupancyOcTreeBase.h.
|
inlineinherited |
Definition at line 264 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 269 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 274 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 278 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 285 of file OcTreeBaseImpl.h.
|
protectedinherited |
recalculates min and max in x, y, z. Does nothing when tree size didn't change.
|
inherited |
Traverses the tree to calculate the total number of nodes.
|
protectedinherited |
void octomap::OccupancyOcTreeBase< NODE >::calcNumThresholdedNodes | ( | unsigned int & | num_thresholded, |
unsigned int & | num_other | ||
) | const |
|
protected |
|
virtual |
Performs raycasting in 3d, similar to computeRay().
A ray is cast from origin with a given direction, the first occupied cell is returned (as center coordinate). If the starting coordinate is already occupied in the tree, this coordinate will be returned as a hit.
origin | starting coordinate of ray |
direction | A vector pointing in the direction of the raycast. Does not need to be normalized. |
end | returns the center of the cell that was hit by the ray, if successful |
ignoreUnknownCells | whether unknown cells are ignored. If false (default), the raycast aborts when an unkown cell is hit. |
maxRange | Maximum range after which the raycast is aborted (<= 0: no limit, default) |
|
inline |
Iterator to traverse all keys of changed nodes.
you need to enableChangeDetection() first. Here, an OcTreeKey always refers to a node at the lowest tree level (its size is the minimum tree resolution)
Definition at line 346 of file OccupancyOcTreeBase.h.
|
inline |
Iterator to traverse all keys of changed nodes.
Definition at line 349 of file OccupancyOcTreeBase.h.
|
virtualinherited |
Deletes the complete tree structure (only the root node will remain)
Implements octomap::AbstractOcTree.
|
inherited |
Traces a ray from origin to end (excluding), returning the coordinates of all nodes traversed by the beam.
You still need to check if a node at that coordinate exists (e.g. with search()).
origin | start coordinate of ray |
end | end coordinate of ray |
ray | KeyRay structure that holds the keys of all nodes traversed by the ray, excluding "end" |
|
inherited |
Traces a ray from origin to end (excluding), returning an OcTreeKey of all nodes traversed by the beam.
You still need to check if a node at that coordinate exists (e.g. with search()).
origin | start coordinate of ray |
end | end coordinate of ray |
ray | KeyRay structure that holds the keys of all nodes traversed by the ray, excluding "end" |
void octomap::OccupancyOcTreeBase< NODE >::computeUpdate | ( | const Pointcloud & | scan, |
const octomap::point3d & | origin, | ||
KeySet & | free_cells, | ||
KeySet & | occupied_cells, | ||
double | maxrange | ||
) |
Helper for insertScan.
Computes all octree nodes affected by the point cloud integration at once. Here, occupied nodes have a preference over free ones.
scan | point cloud measurement to be integrated |
origin | origin of the sensor for ray casting |
free_cells | keys of nodes to be cleared |
occupied_cells | keys of nodes to be marked occupied |
maxrange | maximum range for raycasting (-1: unlimited) |
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
inline |
void octomap::OccupancyOcTreeBase< NODE >::computeUpdate_templ | ( | const POINTCLOUD & | scan, |
const octomap::point3d & | origin, | ||
KeySet & | free_cells, | ||
KeySet & | occupied_cells, | ||
double | maxrange | ||
) |
|
inlineinherited |
Converts from a single coordinate into a discrete key.
Definition at line 294 of file OcTreeBaseImpl.h.
|
inherited |
Converts from a single coordinate into a discrete key at a given depth.
|
inlineinherited |
Converts from a 3D coordinate into a 3D addressing key.
Definition at line 303 of file OcTreeBaseImpl.h.
|
inlineinherited |
Converts from a 3D coordinate into a 3D addressing key.
Definition at line 308 of file OcTreeBaseImpl.h.
|
inlineinherited |
Converts from a 3D coordinate into a 3D addressing key at a given depth.
Definition at line 313 of file OcTreeBaseImpl.h.
|
inlineinherited |
Converts from a 3D coordinate into a 3D addressing key at a given depth.
Definition at line 321 of file OcTreeBaseImpl.h.
|
inherited |
Converts a 3D coordinate into a 3D OcTreeKey, with boundary checking.
coord | 3d coordinate of a point |
key | values that will be computed, an array of fixed size 3. |
|
inherited |
Converts a 3D coordinate into a 3D OcTreeKey at a certain depth, with boundary checking.
coord | 3d coordinate of a point |
depth | level of the key from the top |
key | values that will be computed, an array of fixed size 3. |
|
inherited |
Converts a 3D coordinate into a 3D OcTreeKey, with boundary checking.
x | |
y | |
z | |
key | values that will be computed, an array of fixed size 3. |
|
inherited |
Converts a 3D coordinate into a 3D OcTreeKey at a certain depth, with boundary checking.
x | |
y | |
z | |
depth | level of the key from the top |
key | values that will be computed, an array of fixed size 3. |
|
inherited |
Converts a single coordinate into a discrete addressing key, with boundary checking.
coordinate | 3d coordinate of a point |
key | discrete 16 bit adressing key, result |
|
inherited |
Converts a single coordinate into a discrete addressing key, with boundary checking.
coordinate | 3d coordinate of a point |
depth | level of the key from the top |
key | discrete 16 bit adressing key, result |
|
pure virtualinherited |
virtual constructor: creates a new object of same type
Implemented in octomap::ColorOcTree, octomap::OcTreeStamped, octomap::OcTree, octomap::OcTreeBase< NODE >, and octomap::OcTreeBase< CountingOcTreeNode >.
Referenced by octomap::AbstractOcTree::~AbstractOcTree().
|
staticinherited |
Creates a certain OcTree (factory pattern)
Referenced by octomap::AbstractOcTree::~AbstractOcTree().
|
inherited |
Delete a node (if exists) given a 3d point.
Will always delete at the lowest level unless depth !=0, and expand pruned inner nodes as needed. Pruned nodes at level "depth" will directly be deleted as a whole.
|
inherited |
Delete a node (if exists) given a 3d point.
Will always delete at the lowest level unless depth !=0, and expand pruned inner nodes as needed. Pruned nodes at level "depth" will directly be deleted as a whole.
|
inherited |
Delete a node (if exists) given an addressing key.
Will always delete at the lowest level unless depth !=0, and expand pruned inner nodes as needed. Pruned nodes at level "depth" will directly be deleted as a whole.
|
protectedinherited |
recursive call of deleteNode()
octomap::OccupancyOcTreeBase< NODE >::DEPRECATED | ( | void getOccupied(point3d_list &node_centers, unsigned int max_depth=0) | const | ) |
Convenience function to return all occupied nodes in the OcTree.
node_centers | list of occpupied nodes (as point3d) |
max_depth | Depth limit of query. 0 (default): no depth limit |
octomap::OccupancyOcTreeBase< NODE >::DEPRECATED | ( | void getOccupied(std::list< OcTreeVolume > &occupied_volumes, unsigned int max_depth=0) | const | ) |
Convenience function to return all occupied nodes in the OcTree.
occupied_volumes | list of occpupied nodes (as point3d and size of the volume) |
max_depth | Depth limit of query. 0 (default): no depth limit |
octomap::OccupancyOcTreeBase< NODE >::DEPRECATED | ( | void getOccupied(std::list< OcTreeVolume > &binary_nodes, std::list< OcTreeVolume > &delta_nodes, unsigned int max_depth=0) | const | ) |
Traverses the tree and collects all OcTreeVolumes regarded as occupied.
Inner nodes with both occupied and free children are regarded as occupied. This should be for internal use only, use getOccupied(occupied_volumes) instead.
binary_nodes | list of binary OcTreeVolumes which are occupied |
delta_nodes | list of delta OcTreeVolumes which are occupied |
max_depth | Depth limit of query. 0 (default): no depth limit |
octomap::OccupancyOcTreeBase< NODE >::DEPRECATED | ( | void getOccupiedLeafsBBX(point3d_list &node_centers, point3d min, point3d max) | const | ) |
returns occupied leafs within a bounding box defined by min and max.
octomap::OccupancyOcTreeBase< NODE >::DEPRECATED | ( | void getFreespace(std::list< OcTreeVolume > &free_volumes, unsigned int max_depth=0) | const | ) |
Convenience function to return all free nodes in the OcTree.
free_volumes | list of free nodes (as point3d and size of the volume) |
max_depth | Depth limit of query. 0 (default): no depth limit |
octomap::OccupancyOcTreeBase< NODE >::DEPRECATED | ( | void getFreespace(std::list< OcTreeVolume > &binary_nodes, std::list< OcTreeVolume > &delta_nodes, unsigned int max_depth=0) | const | ) |
Traverses the tree and collects all OcTreeVolumes regarded as free.
Inner nodes with both occupied and free children are regarded as occupied.
binary_nodes | list of binary OcTreeVolumes which are free |
delta_nodes | list of delta OcTreeVolumes which are free |
max_depth | Depth limit of query. 0 (default): no depth limit |
|
inlineinherited |
Definition at line 438 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 443 of file OcTreeBaseImpl.h.
|
inherited |
|
inherited |
|
inlineinherited |
Definition at line 455 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 462 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 469 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 475 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 480 of file OcTreeBaseImpl.h.
|
inlineinherited |
Will always return true, there is no more boundary check here
Definition at line 486 of file OcTreeBaseImpl.h.
|
inlineinherited |
generate child index (between 0 and 7) from key at given tree depth DEPRECATED
Definition at line 493 of file OcTreeBaseImpl.h.
|
inline |
track or ignore changes while inserting scans (default: ignore)
Definition at line 337 of file OccupancyOcTreeBase.h.
|
inlineinherited |
Definition at line 266 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 271 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 282 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 287 of file OcTreeBaseImpl.h.
|
virtualinherited |
Expands all pruned nodes (reverse of prune())
Implements octomap::AbstractOcTree.
|
protectedinherited |
recursive call of expand()
point3d octomap::OccupancyOcTreeBase< NODE >::getBBXBounds | ( | ) | const |
point3d octomap::OccupancyOcTreeBase< NODE >::getBBXCenter | ( | ) | const |
|
inline |
Definition at line 327 of file OccupancyOcTreeBase.h.
|
inline |
Definition at line 325 of file OccupancyOcTreeBase.h.
|
inlineinherited |
Definition at line 231 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::clamping_thres_max, and octomap::probability().
|
inlineinherited |
Definition at line 233 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::clamping_thres_max, octomap::AbstractOccupancyOcTree::readBinaryLegacyHeader(), and octomap::AbstractOcTree::size().
|
inlineinherited |
Definition at line 227 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::clamping_thres_min, and octomap::probability().
|
inlineinherited |
Definition at line 229 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::clamping_thres_min.
|
virtualinherited |
maximum value of the bounding box of all known space in x, y, z
Implements octomap::AbstractOcTree.
|
virtualinherited |
maximum value of the bounding box of all known space in x, y, z
Implements octomap::AbstractOcTree.
|
virtualinherited |
minimum value of the bounding box of all known space in x, y, z
Implements octomap::AbstractOcTree.
|
virtualinherited |
minimum value of the bounding box of all known space in x, y, z
Implements octomap::AbstractOcTree.
|
virtualinherited |
Size of OcTree (all known space) in meters for x, y and z dimension.
Implements octomap::AbstractOcTree.
|
virtualinherited |
Size of OcTree (all known space) in meters for x, y and z dimension.
|
inlineinherited |
Definition at line 111 of file OcTreeBaseImpl.h.
|
inherited |
Traverses the tree to calculate the total number of leaf nodes.
|
protectedinherited |
|
inlineinherited |
Definition at line 213 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::occ_prob_thres_log, and octomap::probability().
|
inlineinherited |
Definition at line 215 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::occ_prob_thres_log.
|
protected |
|
inlineinherited |
Definition at line 218 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::prob_hit_log, and octomap::probability().
|
inlineinherited |
Definition at line 220 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::prob_hit_log.
|
inlineinherited |
Definition at line 222 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::prob_miss_log, and octomap::probability().
|
inlineinherited |
Definition at line 224 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::prob_miss_log.
|
inlinevirtualinherited |
Implements octomap::AbstractOcTree.
Definition at line 107 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 118 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 109 of file OcTreeBaseImpl.h.
|
inlinevirtualinherited |
Implements octomap::AbstractOcTree.
Definition at line 102 of file OcTreeBaseImpl.h.
|
inherited |
return centers of leafs that do NOT exist (but could) in a given bounding box
bool octomap::OccupancyOcTreeBase< NODE >::inBBX | ( | const point3d & | p | ) | const |
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::getBBXMax().
bool octomap::OccupancyOcTreeBase< NODE >::inBBX | ( | const OcTreeKey & | key | ) | const |
|
virtual |
Insert one ray between origin and end into the tree.
integrateMissOnRay() is called for the ray, the end point is updated as occupied.
origin | origin of sensor in global coordinates |
end | endpoint of measurement in global coordinates |
maxrange | maximum range after which the raycast should be aborted |
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. |
|
virtual |
Integrate a Pointcloud (in global reference frame)
scan | Pointcloud (measurement endpoints), in global reference frame |
sensor_origin | measurement origin in global reference frame |
maxrange | maximum range for how long individual beams are inserted (default -1: complete beam) |
pruning | whether the tree is (losslessly) pruned after insertion (default: true) |
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. |
|
virtual |
Integrate a 3d scan, transform scan before tree update.
scan | Pointcloud (measurement endpoints) relative to frame origin |
sensor_origin | origin of sensor relative to frame origin |
frame_origin | origin of reference frame, determines transform to be applied to cloud and sensor origin |
maxrange | maximum range for how long individual beams are inserted (default -1: complete beam) |
pruning | whether the tree is (losslessly) pruned after insertion (default: true) |
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. |
|
virtual |
Insert a 3d scan (given as a ScanNode) into the tree.
scan | ScanNode contains Pointcloud data and frame/sensor origin |
maxrange | maximum range for how long individual beams are inserted (default -1: complete beam) |
pruning | whether the tree is (losslessly) pruned after insertion (default: true) |
lazy_eval | whether the tree is left 'dirty' after the update (default: false). This speeds up the insertion by not updating inner nodes, but you need to call updateInnerOccupancy() when done. |
void octomap::OccupancyOcTreeBase< NODE >::insertScan_templ | ( | const SCAN & | scan, |
const octomap::point3d & | sensor_origin, | ||
double | maxrange = -1. , |
||
bool | pruning = true , |
||
bool | lazy_eval = false |
||
) |
|
virtual |
for testing only
|
virtual |
integrate a "hit" measurement according to the tree's sensor model
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
virtual |
integrate a "miss" measurement according to the tree's sensor model
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
inlineprotected |
Traces a ray from origin to end and updates all voxels on the way as free.
The volume containing "end" is not updated.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
inlineinherited |
queries whether a node is at the clamping threshold according to the tree's parameter
Definition at line 138 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::clamping_thres_max, octomap::AbstractOccupancyOcTree::clamping_thres_min, and octomap::OcTreeNode::getLogOdds().
|
inlineinherited |
queries whether a node is at the clamping threshold according to the tree's parameter
Definition at line 144 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::clamping_thres_max, octomap::AbstractOccupancyOcTree::clamping_thres_min, octomap::OcTreeNode::getLogOdds(), octomap::AbstractOccupancyOcTree::toMaxLikelihood(), and octomap::AbstractOccupancyOcTree::updateNode().
|
inlineinherited |
queries whether a node is occupied according to the tree's parameter for "occupancy"
Definition at line 128 of file AbstractOccupancyOcTree.h.
References octomap::OcTreeNode::getLogOdds(), and octomap::AbstractOccupancyOcTree::occ_prob_thres_log.
|
inlineinherited |
queries whether a node is occupied according to the tree's parameter for "occupancy"
Definition at line 133 of file AbstractOccupancyOcTree.h.
References octomap::OcTreeNode::getLogOdds(), and octomap::AbstractOccupancyOcTree::occ_prob_thres_log.
|
inherited |
converts from a discrete key at a given depth into a coordinate corresponding to the key's center
|
inlineinherited |
converts from a discrete key at the lowest tree level into a coordinate corresponding to the key's center
Definition at line 421 of file OcTreeBaseImpl.h.
|
inlineinherited |
converts from an addressing key at the lowest tree level into a coordinate corresponding to the key's center
Definition at line 427 of file OcTreeBaseImpl.h.
|
inlineinherited |
converts from an addressing key at a given depth into a coordinate corresponding to the key's center
Definition at line 433 of file OcTreeBaseImpl.h.
|
inherited |
|
virtualinherited |
Implements octomap::AbstractOcTree.
|
inlinevirtualinherited |
Implements octomap::AbstractOcTree.
Definition at line 182 of file OcTreeBaseImpl.h.
|
virtual |
converts the node to the maximum likelihood value according to the tree's parameter for "occupancy"
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
virtual |
converts the node to the maximum likelihood value according to the tree's parameter for "occupancy"
|
inherited |
|
virtualinherited |
Lossless compression of OcTree: merge children to parent when there are eight children with identical values.
Implements octomap::AbstractOcTree.
|
protectedinherited |
recursive call of prune()
|
staticinherited |
Read the file header, create the appropriate class and deserialize.
This creates a new octree which you need to delete yourself. If you expect or requre a specific kind of octree, use dynamic_cast afterwards:
Referenced by octomap::AbstractOcTree::~AbstractOcTree().
|
staticinherited |
Read the file header, create the appropriate class and deserialize.
This creates a new octree which you need to delete yourself.
|
inherited |
Reads an OcTree from an input stream.
Existing nodes of the tree are deleted before the tree is read.
Referenced by octomap::AbstractOccupancyOcTree::~AbstractOccupancyOcTree().
|
inherited |
Reads OcTree from a binary file.
Existing nodes of the tree are deleted before the tree is read.
|
virtual |
Reads only the data (=tree structure) from the input stream.
The tree needs to be constructed with the proper header information beforehand, see readBinary().
Implements octomap::AbstractOccupancyOcTree.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
protectedinherited |
Try to read the old binary format for conversion, will be removed in the future.
Referenced by octomap::AbstractOccupancyOcTree::getClampingThresMaxLog().
std::istream& octomap::OccupancyOcTreeBase< NODE >::readBinaryNode | ( | std::istream & | s, |
NODE * | node | ||
) | const |
Read node from binary stream (max-likelihood value), recursively continue with all children.
This will set the log_odds_occupancy value of all leaves to either free or occupied.
s |
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
virtualinherited |
Read all nodes from the input stream (without file header), for this the tree needs to be already created.
For general file IO, you should probably use AbstractOcTree::read() instead.
Implements octomap::AbstractOcTree.
|
staticprotectedinherited |
Referenced by octomap::AbstractOcTree::~AbstractOcTree().
|
staticprotectedinherited |
Referenced by octomap::OcTree::StaticMemberInitializer::StaticMemberInitializer(), octomap::CountingOcTree::StaticMemberInitializer::StaticMemberInitializer(), octomap::OcTreeStamped::StaticMemberInitializer::StaticMemberInitializer(), octomap::ColorOcTree::StaticMemberInitializer::StaticMemberInitializer(), and octomap::AbstractOcTree::~AbstractOcTree().
|
inline |
Reset the set of changed keys. Call this after you obtained all changed nodes.
Definition at line 339 of file OccupancyOcTreeBase.h.
|
inherited |
Search node at specified depth given a 3d point (depth=0: search full tree depth)
|
inherited |
Search node at specified depth given a 3d point (depth=0: search full tree depth)
|
inherited |
Search a node at specified depth given an addressing key (depth=0: search full tree depth)
void octomap::OccupancyOcTreeBase< NODE >::setBBXMax | ( | point3d & | max | ) |
sets the maximum for a query bounding box to use
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::bbxSet().
void octomap::OccupancyOcTreeBase< NODE >::setBBXMin | ( | point3d & | min | ) |
sets the minimum for a query bounding box to use
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::bbxSet().
|
inlineinherited |
sets the maximum threshold for occupancy clamping (sensor model)
Definition at line 210 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::clamping_thres_max, and octomap::logodds().
|
inlineinherited |
sets the minimum threshold for occupancy clamping (sensor model)
Definition at line 208 of file AbstractOccupancyOcTree.h.
References octomap::AbstractOccupancyOcTree::clamping_thres_min, and octomap::logodds().
|
inlineinherited |
sets the threshold for occupancy (sensor model)
Definition at line 202 of file AbstractOccupancyOcTree.h.
References octomap::logodds(), and octomap::AbstractOccupancyOcTree::occ_prob_thres_log.
|
inlineinherited |
sets the probablility for a "hit" (will be converted to logodds) - sensor model
Definition at line 204 of file AbstractOccupancyOcTree.h.
References octomap::logodds(), and octomap::AbstractOccupancyOcTree::prob_hit_log.
|
inlineinherited |
sets the probablility for a "miss" (will be converted to logodds) - sensor model
Definition at line 206 of file AbstractOccupancyOcTree.h.
References octomap::logodds(), and octomap::AbstractOccupancyOcTree::prob_miss_log.
|
virtualinherited |
Change the resolution of the octree, scaling all voxels.
This will not preserve the (metric) scale!
Implements octomap::AbstractOcTree.
|
inlinevirtualinherited |
Implements octomap::AbstractOcTree.
Definition at line 176 of file OcTreeBaseImpl.h.
|
virtual |
Creates the maximum likelihood map by calling toMaxLikelihood on all tree nodes, setting their occupancy to the corresponding occupancy thresholds.
This enables a very efficient compression if you call prune() afterwards.
Implements octomap::AbstractOccupancyOcTree.
|
protected |
void octomap::OccupancyOcTreeBase< NODE >::updateInnerOccupancy | ( | ) |
Updates the occupancy of all inner nodes to reflect their children's occupancy.
If you performed batch-updates with lazy evaluation enabled, you must call this before any queries to ensure correct multi-resolution behavior.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
protected |
|
virtual |
Manipulate log_odds value of voxel directly.
key | OcTreeKey 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. |
Implements octomap::AbstractOccupancyOcTree.
|
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. |
Implements octomap::AbstractOccupancyOcTree.
|
virtual |
Manipulate log_odds value of voxel directly.
Looks up the OcTreeKey corresponding to the coordinate and then calls udpateNode() with it.
x | |
y | |
z | |
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. |
|
virtual |
Integrate occupancy measurement.
key | OcTreeKey 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. |
Implements octomap::AbstractOccupancyOcTree.
|
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. |
Implements octomap::AbstractOccupancyOcTree.
|
virtual |
Integrate occupancy measurement.
Looks up the OcTreeKey corresponding to the coordinate and then calls udpateNode() with it.
x | |
y | |
z | |
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. |
|
virtual |
Reimplemented in octomap::OcTreeStamped.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
protected |
|
inline |
use or ignore BBX limit (default: ignore)
Definition at line 318 of file OccupancyOcTreeBase.h.
|
inherited |
|
inherited |
Write file header and complete tree to file (serialization)
Referenced by octomap::AbstractOcTree::~AbstractOcTree().
|
inherited |
Write file header and complete tree to stream (serialization)
|
inherited |
Writes OcTree to a binary file using writeBinary().
The OcTree is first converted to the maximum likelihood estimate and pruned.
Referenced by octomap::AbstractOccupancyOcTree::~AbstractOccupancyOcTree().
|
inherited |
|
inherited |
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.
Referenced by octomap::AbstractOccupancyOcTree::~AbstractOccupancyOcTree().
|
inherited |
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.
|
virtual |
Writes the data of the tree (without header) to the stream, recursively calling writeBinaryNode (starting with root)
Implements octomap::AbstractOccupancyOcTree.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
std::ostream& octomap::OccupancyOcTreeBase< NODE >::writeBinaryNode | ( | std::ostream & | s, |
const NODE * | node | ||
) | const |
Write node to binary stream (max-likelihood value), recursively continue with all children.
This will discard the log_odds_occupancy value, writing all leaves as either free or occupied.
s | |
node | OcTreeNode to write out, will recurse to all children |
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
virtualinherited |
Write complete state of tree to stream (without file header) unmodified.
Pruning the tree first produces smaller files (lossless compression)
Implements octomap::AbstractOcTree.
|
protected |
Definition at line 475 of file OccupancyOcTreeBase.h.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::getBBXMax().
|
protected |
Definition at line 477 of file OccupancyOcTreeBase.h.
|
protected |
Definition at line 474 of file OccupancyOcTreeBase.h.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::getBBXMin().
|
protected |
Definition at line 476 of file OccupancyOcTreeBase.h.
|
staticprotectedinherited |
Definition at line 249 of file AbstractOccupancyOcTree.h.
|
protected |
Set of leaf keys (lowest level) which changed since last resetChangeDetection.
Definition at line 481 of file OccupancyOcTreeBase.h.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysBegin(), octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd(), and octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::resetChangeDetection().
|
protectedinherited |
Definition at line 244 of file AbstractOccupancyOcTree.h.
Referenced by octomap::AbstractOccupancyOcTree::getClampingThresMax(), octomap::AbstractOccupancyOcTree::getClampingThresMaxLog(), octomap::AbstractOccupancyOcTree::isNodeAtThreshold(), and octomap::AbstractOccupancyOcTree::setClampingThresMax().
|
protectedinherited |
Definition at line 243 of file AbstractOccupancyOcTree.h.
Referenced by octomap::AbstractOccupancyOcTree::getClampingThresMin(), octomap::AbstractOccupancyOcTree::getClampingThresMinLog(), octomap::AbstractOccupancyOcTree::isNodeAtThreshold(), and octomap::AbstractOccupancyOcTree::setClampingThresMin().
|
staticprotectedinherited |
Definition at line 169 of file AbstractOcTree.h.
|
protectedinherited |
Definition at line 544 of file OcTreeBaseImpl.h.
|
protectedinherited |
Definition at line 547 of file OcTreeBaseImpl.h.
|
protectedinherited |
Definition at line 546 of file OcTreeBaseImpl.h.
|
protectedinherited |
max in x, y, z
Definition at line 539 of file OcTreeBaseImpl.h.
|
protectedinherited |
min in x, y, z
Definition at line 540 of file OcTreeBaseImpl.h.
|
protectedinherited |
|
protectedinherited |
Definition at line 245 of file AbstractOccupancyOcTree.h.
Referenced by octomap::AbstractOccupancyOcTree::getProbHit(), octomap::AbstractOccupancyOcTree::getProbHitLog(), and octomap::AbstractOccupancyOcTree::setProbHit().
|
protectedinherited |
Definition at line 246 of file AbstractOccupancyOcTree.h.
Referenced by octomap::AbstractOccupancyOcTree::getProbMiss(), octomap::AbstractOccupancyOcTree::getProbMissLog(), and octomap::AbstractOccupancyOcTree::setProbMiss().
|
protectedinherited |
in meters
Definition at line 530 of file OcTreeBaseImpl.h.
|
protectedinherited |
= 1. / resolution
Definition at line 531 of file OcTreeBaseImpl.h.
|
protectedinherited |
Definition at line 525 of file OcTreeBaseImpl.h.
|
protectedinherited |
flag to denote whether the octree extent changed (for lazy min/max eval)
Definition at line 535 of file OcTreeBaseImpl.h.
|
protectedinherited |
contains the size of a voxel at level i (0: root node). tree_depth+1 levels (incl. 0)
Definition at line 542 of file OcTreeBaseImpl.h.
|
protectedinherited |
Definition at line 537 of file OcTreeBaseImpl.h.
|
protectedinherited |
Maximum tree depth is fixed to 16 currently.
Definition at line 528 of file OcTreeBaseImpl.h.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
protectedinherited |
Definition at line 548 of file OcTreeBaseImpl.h.
|
protectedinherited |
Definition at line 529 of file OcTreeBaseImpl.h.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::changedKeysEnd().
|
protectedinherited |
number of nodes in tree
Definition at line 533 of file OcTreeBaseImpl.h.
|
protected |
use bounding box for queries (needs to be set)?
Definition at line 473 of file OccupancyOcTreeBase.h.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::bbxSet(), and octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::useBBXLimit().
|
protected |
Definition at line 479 of file OccupancyOcTreeBase.h.
Referenced by octomap::OccupancyOcTreeBase< OcTreeNodeStamped >::enableChangeDetection().
Page generated by Doxygen 1.8.11 for MRPT 1.4.0 SVN: at Sun Aug 14 23:58:29 UTC 2016 |