|
octomap 1.9.8
|
An AbstractOcTree which stores an internal counter per node / volume. More...
#include <CountingOcTree.h>
Inheritance diagram for octomap::CountingOcTree:
Collaboration diagram for octomap::CountingOcTree:Data Structures | |
| class | StaticMemberInitializer |
| Static member object which ensures that this OcTree's prototype ends up in the classIDMapping only once. More... | |
Public Types | |
| typedef leaf_iterator | iterator |
| typedef NODE | NodeType |
| Make the templated NODE type available from the outside. | |
Public Member Functions | |
| 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) | |
| key_type | adjustKeyAtDepth (key_type 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) | |
| iterator | begin (unsigned char maxDepth=0) const |
| leaf_iterator | begin_leafs (unsigned char maxDepth=0) 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 |
| tree_iterator | begin_tree (unsigned char maxDepth=0) const |
| size_t | calcNumNodes () const |
| Traverses the tree to calculate the total number of nodes. | |
| void | clear () |
| Deletes the complete tree structure. | |
| void | clearKeyRays () |
| Clear KeyRay vector to minimize unneeded memory. | |
| 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. | |
| 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. | |
| OcTreeKey | coordToKey (const point3d &coord) const |
| Converts from a 3D coordinate into a 3D addressing key. | |
| OcTreeKey | coordToKey (const point3d &coord, unsigned depth) const |
| Converts from a 3D coordinate into a 3D addressing key at a given depth. | |
| key_type | coordToKey (double coordinate) const |
| Converts from a single coordinate into a discrete key. | |
| key_type | coordToKey (double coordinate, unsigned depth) const |
| Converts from a single coordinate into a discrete key at a given depth. | |
| OcTreeKey | coordToKey (double x, double y, double z) const |
| Converts from a 3D coordinate into a 3D addressing key. | |
| 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. | |
| bool | coordToKeyChecked (const point3d &coord, OcTreeKey &key) const |
| Converts a 3D coordinate into a 3D OcTreeKey, with boundary checking. | |
| 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. | |
| bool | coordToKeyChecked (double coordinate, key_type &key) const |
| Converts a single coordinate into a discrete addressing key, with boundary checking. | |
| bool | coordToKeyChecked (double coordinate, unsigned depth, key_type &key) const |
| Converts a single coordinate into a discrete addressing key, with boundary checking. | |
| bool | coordToKeyChecked (double x, double y, double z, OcTreeKey &key) const |
| Converts a 3D coordinate into a 3D OcTreeKey, with boundary checking. | |
| 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. | |
| CountingOcTree (double resolution) | |
| Default constructor, sets resolution of leafs. | |
| OcTreeBase< CountingOcTreeNode > * | create () const |
| virtual constructor: creates a new object of same type (Covariant return type requires an up-to-date compiler) | |
| NODE * | createNodeChild (NODE *node, unsigned int childIdx) |
| Creates (allocates) the i-th child of the node. | |
| bool | deleteNode (const OcTreeKey &key, unsigned int depth=0) |
| Delete a node (if exists) given an addressing key. | |
| bool | deleteNode (const point3d &value, unsigned int depth=0) |
| Delete a node (if exists) given a 3d point. | |
| bool | deleteNode (double x, double y, double z, unsigned int depth=0) |
| Delete a node (if exists) given a 3d point. | |
| void | deleteNodeChild (NODE *node, unsigned int childIdx) |
| Deletes the i-th child of the node. | |
| const iterator | end () const |
| const leaf_iterator | end_leafs () const |
| const leaf_bbx_iterator | end_leafs_bbx () const |
| const tree_iterator | end_tree () const |
| virtual void | expand () |
| Expands all pruned nodes (reverse of prune()) | |
| virtual void | expandNode (NODE *node) |
| Expands a node (reverse of pruning): All children are created and their occupancy probability is set to the node's value. | |
| void | getCentersMinHits (point3d_list &node_centers, unsigned int min_hits) const |
| virtual void | getMetricMax (double &x, double &y, double &z) |
| maximum value of the bounding box of all known space in x, y, z | |
| void | getMetricMax (double &x, double &y, double &z) const |
| maximum value of the bounding box of all known space in x, y, z | |
| virtual void | getMetricMin (double &x, double &y, double &z) |
| minimum value of the bounding box of all known space in x, y, z | |
| void | getMetricMin (double &x, double &y, double &z) const |
| minimum value of the bounding box of all known space in x, y, z | |
| virtual void | getMetricSize (double &x, double &y, double &z) |
| Size of OcTree (all known space) in meters for x, y and z dimension. | |
| virtual void | getMetricSize (double &x, double &y, double &z) const |
| Size of OcTree (all known space) in meters for x, y and z dimension. | |
| const NODE * | getNodeChild (const NODE *node, unsigned int childIdx) const |
| NODE * | getNodeChild (NODE *node, unsigned int childIdx) const |
| double | getNodeSize (unsigned depth) const |
| size_t | getNumLeafNodes () const |
| Traverses the tree to calculate the total number of leaf nodes. | |
| double | getResolution () const |
| NODE * | getRoot () const |
| unsigned int | getTreeDepth () const |
| std::string | getTreeType () const |
| returns actual class name as string for identification | |
| void | getUnknownLeafCenters (point3d_list &node_centers, point3d pmin, point3d pmax, unsigned int depth=0) const |
| return centers of leafs that do NOT exist (but could) in a given bounding box | |
| virtual bool | isNodeCollapsible (const NODE *node) const |
| A node is collapsible if all children exist, don't have children of their own and have the same occupancy value. | |
| 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 | |
| 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 | |
| double | keyToCoord (key_type key) const |
| converts from a discrete key at the lowest tree level into a coordinate corresponding to the key's center | |
| double | keyToCoord (key_type key, unsigned depth) const |
| converts from a discrete key at a given depth into a coordinate corresponding to the key's center | |
| unsigned long long | memoryFullGrid () const |
| virtual size_t | memoryUsage () const |
| virtual size_t | memoryUsageNode () const |
| bool | nodeChildExists (const NODE *node, unsigned int childIdx) const |
| Safe test if node has a child at index childIdx. | |
| bool | nodeHasChildren (const NODE *node) const |
| Safe test if node has any children. | |
| bool | operator== (const OcTreeBaseImpl< NODE, INTERFACE > &rhs) const |
| Comparison between two octrees, all meta data, all nodes, and the structure must be identical. | |
| virtual void | prune () |
| Lossless compression of the octree: A node will replace all of its eight children if they have identical values. | |
| virtual bool | pruneNode (NODE *node) |
| Prunes a node when it is collapsible. | |
| 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. | |
| 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) You need to check if the returned node is NULL, since it can be in unknown space. | |
| 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) You need to check if the returned node is NULL, since it can be in unknown space. | |
| 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). | |
| void | setResolution (double r) |
| Change the resolution of the octree, scaling all voxels. This will not preserve the (metric) scale! | |
| virtual size_t | size () const |
| void | swapContent (OcTreeBaseImpl< NODE, INTERFACE > &rhs) |
| Swap contents of two octrees, i.e., only the underlying pointer / tree structure. | |
| CountingOcTreeNode * | updateNode (const OcTreeKey &k) |
| virtual CountingOcTreeNode * | updateNode (const point3d &value) |
| double | volume () |
| std::ostream & | writeData (std::ostream &s) const |
| Write complete state of tree to stream (without file header) unmodified. Pruning the tree first produces smaller files (lossless compression) | |
Protected Member Functions | |
| void | allocNodeChildren (NODE *node) |
| void | calcMinMax () |
| recalculates min and max in x, y, z. Does nothing when tree size didn't change. | |
| void | calcNumNodesRecurs (NODE *node, size_t &num_nodes) const |
| void | deleteNodeRecurs (NODE *node) |
| Recursively delete a node and all children. Deallocates memory but does NOT set the node ptr to NULL nor updates tree size. | |
| bool | deleteNodeRecurs (NODE *node, unsigned int depth, unsigned int max_depth, const OcTreeKey &key) |
| recursive call of deleteNode() | |
| void | expandRecurs (NODE *node, unsigned int depth, unsigned int max_depth) |
| recursive call of expand() | |
| void | getCentersMinHitsRecurs (point3d_list &node_centers, unsigned int &min_hits, unsigned int max_depth, CountingOcTreeNode *node, unsigned int depth, const OcTreeKey &parent_key) const |
| size_t | getNumLeafNodesRecurs (const NODE *parent) const |
| void | init () |
| initialize non-trivial members, helper for constructors | |
| void | pruneRecurs (NODE *node, unsigned int depth, unsigned int max_depth, unsigned int &num_pruned) |
| recursive call of prune() | |
| std::istream & | readNodesRecurs (NODE *, std::istream &s) |
| recursive call of readData() | |
| std::ostream & | writeNodesRecurs (const NODE *, std::ostream &s) const |
| recursive call of writeData() | |
Protected Attributes | |
| std::vector< KeyRay > | keyrays |
| data structure for ray casting, array for multithreading | |
| const leaf_bbx_iterator | leaf_iterator_bbx_end |
| const leaf_iterator | leaf_iterator_end |
| double | max_value [3] |
| max in x, y, z | |
| double | min_value [3] |
| min in x, y, z contains the size of a voxel at level i (0: root node). tree_depth+1 levels (incl. 0) | |
| double | resolution |
| in meters | |
| double | resolution_factor |
| = 1. / resolution | |
| NODE * | root |
| Pointer to the root NODE, NULL for empty tree. | |
| bool | size_changed |
| std::vector< double > | sizeLookupTable |
| point3d | tree_center |
| const unsigned int | tree_depth |
| Maximum tree depth is fixed to 16 currently. | |
| const tree_iterator | tree_iterator_end |
| const unsigned int | tree_max_val |
| size_t | tree_size |
| number of nodes in tree flag to denote whether the octree extent changed (for lazy min/max eval) | |
Static Protected Attributes | |
| static StaticMemberInitializer | countingOcTreeMemberInit |
| static member to ensure static initialization (only once) | |
An AbstractOcTree which stores an internal counter per node / volume.
Count is recursive, parent nodes have the summed count of their children.
|
inherited |
|
inherited |
Make the templated NODE type available from the outside.
| octomap::CountingOcTree::CountingOcTree | ( | double | resolution | ) |
Default constructor, sets resolution of leafs.
implementation of CountingOcTree -----------------------------------—
References countingOcTreeMemberInit, and octomap::CountingOcTree::StaticMemberInitializer::ensureLinking().
|
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 |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::adjustKeyAtDepth(), and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_depth.
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::adjustKeyAtDepth().
|
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 |
|
protectedinherited |
|
inlineinherited |
Referenced by boundingBoxTest(), and main().
|
inlineinherited |
Referenced by boundingBoxTest(), octomap::OcTreeStamped::degradeOutdatedNodes(), and main().
|
inlineinherited |
Referenced by boundingBoxTest(), and main().
|
inlineinherited |
|
inlineinherited |
Referenced by calcThresholdedNodes(), main(), printChanges(), and octomap::ColorOcTree::writeColorHistogram().
|
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.
Referenced by main(), and octomap::OccupancyOcTreeBase< NODE >::readBinaryData().
|
protectedinherited |
|
inherited |
Deletes the complete tree structure.
Referenced by main().
|
inlineinherited |
Clear KeyRay vector to minimize unneeded memory.
This is only useful for the StaticMemberInitializer classes, don't call it for an octree that is actually used.
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::keyrays.
Referenced by octomap::ColorOcTree::StaticMemberInitializer::StaticMemberInitializer(), octomap::CountingOcTree::StaticMemberInitializer::StaticMemberInitializer(), octomap::OcTree::StaticMemberInitializer::StaticMemberInitializer(), and octomap::OcTreeStamped::StaticMemberInitializer::StaticMemberInitializer().
|
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" |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::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" |
References octomap::KeyRay::addKey(), octomath::Vector3::norm(), OCTOMAP_WARNING_STR, octomap::KeyRay::reset(), octomap::KeyRay::size(), and octomap::KeyRay::sizeMax().
|
inlineinherited |
Converts from a 3D coordinate into a 3D addressing key.
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::coordToKey().
|
inlineinherited |
Converts from a 3D coordinate into a 3D addressing key at a given depth.
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::coordToKey(), and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_depth.
|
inlineinherited |
Converts from a single coordinate into a discrete key.
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::resolution_factor, and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_max_val.
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::coordToKey().
|
inlineinherited |
Converts from a single coordinate into a discrete key at a given depth.
|
inlineinherited |
Converts from a 3D coordinate into a 3D addressing key.
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::coordToKey().
|
inlineinherited |
Converts from a 3D coordinate into a 3D addressing key at a given depth.
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::coordToKey(), and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_depth.
|
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. |
Referenced by octomap::ColorOcTree::averageNodeColor(), boundingBoxTest(), octomap::ColorOcTree::integrateNodeColor(), main(), octomap::ColorOcTree::setNodeColor(), and updateNode().
|
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 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 |
|
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. |
|
inlineinherited |
virtual constructor: creates a new object of same type (Covariant return type requires an up-to-date compiler)
|
inherited |
Creates (allocates) the i-th child of the node.
Referenced by main(), and updateNode().
|
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.
|
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.
References OCTOMAP_ERROR_STR.
|
inherited |
Deletes the i-th child of the node.
Referenced by main(), and octomap::ColorOcTree::pruneNode().
|
protectedinherited |
Recursively delete a node and all children. Deallocates memory but does NOT set the node ptr to NULL nor updates tree size.
|
protectedinherited |
recursive call of deleteNode()
References octomap::computeChildIdx().
|
inlineinherited |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::leaf_iterator_end.
Referenced by boundingBoxTest(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::computeRay(), octomap::OcTreeStamped::degradeOutdatedNodes(), main(), and octomap::ColorOcTree::writeColorHistogram().
|
inlineinherited |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::leaf_iterator_end.
Referenced by boundingBoxTest(), octomap::OcTreeStamped::degradeOutdatedNodes(), and main().
|
inlineinherited |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::leaf_iterator_bbx_end.
Referenced by boundingBoxTest(), and main().
|
inlineinherited |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_iterator_end.
Referenced by calcThresholdedNodes(), main(), printChanges(), and octomap::ColorOcTree::writeColorHistogram().
|
virtualinherited |
Expands all pruned nodes (reverse of prune())
Referenced by boundingBoxTest(), main(), and printChanges().
|
virtualinherited |
Expands a node (reverse of pruning): All children are created and their occupancy probability is set to the node's value.
You need to verify that this is indeed a pruned node (i.e. not a leaf at the lowest level)
Referenced by main().
|
protectedinherited |
recursive call of expand()
| void octomap::CountingOcTree::getCentersMinHits | ( | point3d_list & | node_centers, |
| unsigned int | min_hits | ||
| ) | const |
|
protected |
References octomap::computeChildKey(), getCentersMinHitsRecurs(), octomap::CountingOcTreeNode::getCount(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::getNodeChild(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::keyToCoord(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::nodeChildExists(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::nodeHasChildren(), and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_max_val.
Referenced by getCentersMinHits(), and getCentersMinHitsRecurs().
|
virtualinherited |
maximum value of the bounding box of all known space in x, y, z
Referenced by boundingBoxTest().
|
inherited |
maximum value of the bounding box of all known space in x, y, z
|
virtualinherited |
minimum value of the bounding box of all known space in x, y, z
Referenced by boundingBoxTest().
|
inherited |
minimum value of the bounding box of all known space in x, y, z
|
virtualinherited |
Size of OcTree (all known space) in meters for x, y and z dimension.
Referenced by main(), and outputStatistics().
|
virtualinherited |
Size of OcTree (all known space) in meters for x, y and z dimension.
|
inherited |
|
inherited |
Referenced by getCentersMinHitsRecurs(), getLeafNodesRecurs(), getVoxelsRecurs(), octomap::ColorOcTree::isNodeCollapsible(), octomap::ColorOcTree::pruneNode(), octomap::ColorOcTree::updateInnerOccupancyRecurs(), and updateNode().
|
inlineinherited |
|
inherited |
Traverses the tree to calculate the total number of leaf nodes.
Referenced by main(), and outputStatistics().
|
protectedinherited |
|
inlineinherited |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::resolution.
Referenced by getLeafNodesRecurs(), getVoxelsRecurs(), and main().
|
inlineinherited |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::root.
Referenced by main().
|
inlineinherited |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_depth.
Referenced by main().
|
inlineinherited |
returns actual class name as string for identification
|
inherited |
return centers of leafs that do NOT exist (but could) in a given bounding box
References octomath::Vector3::x(), octomath::Vector3::y(), and octomath::Vector3::z().
|
protectedinherited |
initialize non-trivial members, helper for constructors
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::OcTreeBaseImpl().
|
virtualinherited |
A node is collapsible if all children exist, don't have children of their own and have the same occupancy value.
|
inlineinherited |
converts from an addressing key at the lowest tree level into a coordinate corresponding to the key's center
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::keyToCoord().
|
inlineinherited |
converts from an addressing key at a given depth into a coordinate corresponding to the key's center
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::keyToCoord().
|
inlineinherited |
converts from a discrete key at the lowest tree level into a coordinate corresponding to the key's center
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::resolution, and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_max_val.
|
inherited |
converts from a discrete key at a given depth into a coordinate corresponding to the key's center
Referenced by getCentersMinHitsRecurs(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::keyToCoord(), and main().
|
inherited |
Referenced by main(), and outputStatistics().
|
virtualinherited |
Referenced by main(), and outputStatistics().
|
inlinevirtualinherited |
|
inherited |
Safe test if node has a child at index childIdx.
First tests if there are any children. Replaces node->childExists(...)
Referenced by getCentersMinHitsRecurs(), getLeafNodesRecurs(), getVoxelsRecurs(), octomap::ColorOcTree::isNodeCollapsible(), main(), octomap::ColorOcTree::updateInnerOccupancyRecurs(), and updateNode().
|
inherited |
Safe test if node has any children.
Replaces node->hasChildren(...)
Referenced by boundingBoxTest(), getCentersMinHitsRecurs(), getLeafNodesRecurs(), getVoxelsRecurs(), octomap::ColorOcTree::isNodeCollapsible(), main(), and octomap::ColorOcTree::updateInnerOccupancyRecurs().
|
inherited |
Comparison between two octrees, all meta data, all nodes, and the structure must be identical.
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_depth, and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_max_val.
|
virtualinherited |
Lossless compression of the octree: A node will replace all of its eight children if they have identical values.
You usually don't have to call prune() after a regular occupancy update, updateNode() incrementally prunes all affected nodes.
Referenced by main(), and printChanges().
|
virtualinherited |
|
protectedinherited |
recursive call of prune()
|
inherited |
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.
References OCTOMAP_ERROR_STR, and OCTOMAP_WARNING_STR.
Referenced by main().
|
protectedinherited |
recursive call of readData()
|
inherited |
Search a node at specified depth given an addressing key (depth=0: search full tree depth) You need to check if the returned node is NULL, since it can be in unknown space.
|
inherited |
Search node at specified depth given a 3d point (depth=0: search full tree depth) You need to check if the returned node is NULL, since it can be in unknown space.
References OCTOMAP_ERROR_STR.
|
inherited |
Search node at specified depth given a 3d point (depth=0: search full tree depth).
You need to check if the returned node is NULL, since it can be in unknown space.
Referenced by octomap::ColorOcTree::averageNodeColor(), boundingBoxTest(), octomap::ColorOcTree::integrateNodeColor(), main(), printChanges(), and octomap::ColorOcTree::setNodeColor().
|
inherited |
Change the resolution of the octree, scaling all voxels. This will not preserve the (metric) scale!
Referenced by main().
|
inlinevirtualinherited |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_size.
Referenced by main(), and outputStatistics().
|
inherited |
Swap contents of two octrees, i.e., only the underlying pointer / tree structure.
You have to ensure yourself that the metadata (resolution etc) matches. No memory is cleared in this function
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::root, and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_size.
Referenced by main().
| CountingOcTreeNode * octomap::CountingOcTree::updateNode | ( | const OcTreeKey & | k | ) |
References octomap::computeChildIdx(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::createNodeChild(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::getNodeChild(), octomap::CountingOcTreeNode::increaseCount(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::nodeChildExists(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::root, octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_depth, and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_size.
|
virtual |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::coordToKeyChecked(), and updateNode().
Referenced by updateNode().
|
inherited |
|
inherited |
Write complete state of tree to stream (without file header) unmodified. Pruning the tree first produces smaller files (lossless compression)
|
protectedinherited |
recursive call of writeData()
|
staticprotected |
static member to ensure static initialization (only once)
Referenced by CountingOcTree().
|
protectedinherited |
data structure for ray casting, array for multithreading
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::clearKeyRays().
|
protectedinherited |
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::end_leafs_bbx().
|
protectedinherited |
|
protectedinherited |
max in x, y, z
|
protectedinherited |
min in x, y, z contains the size of a voxel at level i (0: root node). tree_depth+1 levels (incl. 0)
|
protectedinherited |
|
protectedinherited |
= 1. / resolution
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::coordToKey().
|
protectedinherited |
Pointer to the root NODE, NULL for empty tree.
Referenced by getCentersMinHits(), octomap::OcTreeStamped::getLastUpdateTime(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::getRoot(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::swapContent(), octomap::ColorOcTree::updateInnerOccupancy(), and updateNode().
|
protectedinherited |
|
protectedinherited |
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::getNodeSize().
|
protectedinherited |
|
protectedinherited |
Maximum tree depth is fixed to 16 currently.
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::adjustKeyAtDepth(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::coordToKey(), getCentersMinHits(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::getNodeSize(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::getTreeDepth(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::operator==(), octomap::ColorOcTree::updateInnerOccupancyRecurs(), and updateNode().
|
protectedinherited |
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::end_tree().
|
protectedinherited |
|
protectedinherited |
number of nodes in tree flag to denote whether the octree extent changed (for lazy min/max eval)
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::size(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::swapContent(), and updateNode().