octomap
1.9.7
|
An AbstractOcTree which stores an internal counter per node / volume. More...
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 CountingOcTreeNode | NodeType |
Make the templated NODE type available from the outside. More... | |
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) More... | |
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) More... | |
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. More... | |
void | clear () |
Deletes the complete tree structure. More... | |
void | clearKeyRays () |
Clear KeyRay vector to minimize unneeded memory. 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... | |
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... | |
OcTreeKey | coordToKey (const point3d &coord) 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... | |
key_type | coordToKey (double coordinate) const |
Converts from a single coordinate into a discrete key. More... | |
key_type | coordToKey (double coordinate, unsigned depth) const |
Converts from a single coordinate into a discrete key at a given depth. More... | |
OcTreeKey | coordToKey (double x, double y, double z) const |
Converts from a 3D coordinate into a 3D addressing key. 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... | |
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 coordinate, key_type &key) const |
Converts a single coordinate into a discrete addressing key, with boundary checking. More... | |
bool | coordToKeyChecked (double coordinate, unsigned depth, key_type &key) const |
Converts a single coordinate into a discrete addressing key, 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... | |
CountingOcTree (double resolution) | |
Default constructor, sets resolution of leafs. More... | |
OcTreeBase< CountingOcTreeNode > * | create () const |
virtual constructor: creates a new object of same type (Covariant return type requires an up-to-date compiler) More... | |
virtual AbstractOcTree * | create () const =0 |
virtual constructor: creates a new object of same type More... | |
CountingOcTreeNode * | createNodeChild (CountingOcTreeNode *node, unsigned int childIdx) |
Creates (allocates) the i-th child of the node. More... | |
bool | deleteNode (const OcTreeKey &key, unsigned int depth=0) |
Delete a node (if exists) given an addressing key. More... | |
bool | deleteNode (const point3d &value, unsigned int depth=0) |
Delete a node (if exists) given a 3d point. More... | |
bool | deleteNode (double x, double y, double z, unsigned int depth=0) |
Delete a node (if exists) given a 3d point. More... | |
void | deleteNodeChild (CountingOcTreeNode *node, unsigned int childIdx) |
Deletes the i-th child of the node. More... | |
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()) More... | |
virtual void | expandNode (CountingOcTreeNode *node) |
Expands a node (reverse of pruning): All children are created and their occupancy probability is set to the node's value. More... | |
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 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... | |
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 | 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... | |
const CountingOcTreeNode * | getNodeChild (const CountingOcTreeNode *node, unsigned int childIdx) const |
CountingOcTreeNode * | getNodeChild (CountingOcTreeNode *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. More... | |
double | getResolution () const |
virtual double | getResolution () const =0 |
CountingOcTreeNode * | getRoot () const |
unsigned int | getTreeDepth () const |
std::string | getTreeType () const |
returns actual class name as string for identification More... | |
virtual std::string | getTreeType () const =0 |
returns actual class name as string for identification More... | |
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 More... | |
virtual bool | isNodeCollapsible (const CountingOcTreeNode *node) const |
A node is collapsible if all children exist, don't have children of their own and have the same occupancy value. 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... | |
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 More... | |
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 More... | |
unsigned long long | memoryFullGrid () const |
virtual size_t | memoryUsage () const |
virtual size_t | memoryUsage () const =0 |
virtual size_t | memoryUsageNode () const |
virtual size_t | memoryUsageNode () const =0 |
bool | nodeChildExists (const CountingOcTreeNode *node, unsigned int childIdx) const |
Safe test if node has a child at index childIdx. More... | |
bool | nodeHasChildren (const CountingOcTreeNode *node) const |
Safe test if node has any children. More... | |
bool | operator== (const OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree > &rhs) const |
Comparison between two octrees, all meta data, all nodes, and the structure must be identical. More... | |
virtual void | prune () |
Lossless compression of the octree: A node will replace all of its eight children if they have identical values. More... | |
virtual bool | pruneNode (CountingOcTreeNode *node) |
Prunes a node when it is collapsible. 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... | |
CountingOcTreeNode * | 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. More... | |
CountingOcTreeNode * | 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. More... | |
CountingOcTreeNode * | 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... | |
void | setResolution (double r) |
Change the resolution of the octree, scaling all voxels. This will not preserve the (metric) scale! More... | |
virtual size_t | size () const |
virtual size_t | size () const =0 |
void | swapContent (OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree > &rhs) |
Swap contents of two octrees, i.e., only the underlying pointer / tree structure. More... | |
CountingOcTreeNode * | updateNode (const OcTreeKey &k) |
virtual CountingOcTreeNode * | updateNode (const point3d &value) |
double | volume () |
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... | |
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) 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. This creates a new octree which you need to delete yourself. More... | |
Protected Member Functions | |
void | allocNodeChildren (CountingOcTreeNode *node) |
void | calcMinMax () |
recalculates min and max in x, y, z. Does nothing when tree size didn't change. More... | |
void | calcNumNodesRecurs (CountingOcTreeNode *node, size_t &num_nodes) const |
void | deleteNodeRecurs (CountingOcTreeNode *node) |
Recursively delete a node and all children. Deallocates memory but does NOT set the node ptr to NULL nor updates tree size. More... | |
bool | deleteNodeRecurs (CountingOcTreeNode *node, unsigned int depth, unsigned int max_depth, const OcTreeKey &key) |
recursive call of deleteNode() More... | |
void | expandRecurs (CountingOcTreeNode *node, unsigned int depth, unsigned int max_depth) |
recursive call of expand() More... | |
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 CountingOcTreeNode *parent) const |
void | init () |
initialize non-trivial members, helper for constructors More... | |
void | pruneRecurs (CountingOcTreeNode *node, unsigned int depth, unsigned int max_depth, unsigned int &num_pruned) |
recursive call of prune() More... | |
std::istream & | readNodesRecurs (CountingOcTreeNode *, std::istream &s) |
recursive call of readData() More... | |
std::ostream & | writeNodesRecurs (const CountingOcTreeNode *, std::ostream &s) const |
recursive call of writeData() 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 | |
std::vector< KeyRay > | keyrays |
data structure for ray casting, array for multithreading More... | |
const leaf_bbx_iterator | leaf_iterator_bbx_end |
const leaf_iterator | leaf_iterator_end |
double | max_value [3] |
max in x, y, z More... | |
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) More... | |
double | resolution |
in meters More... | |
double | resolution_factor |
= 1. / resolution More... | |
CountingOcTreeNode * | root |
Pointer to the root NODE, NULL for empty tree. More... | |
bool | size_changed |
std::vector< double > | sizeLookupTable |
point3d | tree_center |
const unsigned int | tree_depth |
Maximum tree depth is fixed to 16 currently. More... | |
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) More... | |
Static Protected Attributes | |
static StaticMemberInitializer | countingOcTreeMemberInit |
static member to ensure static initialization (only once) More... | |
static const std::string | fileHeader = "# Octomap OcTree file" |
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().
Referenced by octomap::CountingOcTree::StaticMemberInitializer::StaticMemberInitializer().
|
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 |
|
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 |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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 |
|
virtualinherited |
Deletes the complete tree structure.
Implements octomap::AbstractOcTree.
|
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.
|
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" |
|
inlineinherited |
Converts from a 3D coordinate into a 3D addressing key.
|
inlineinherited |
Converts from a 3D coordinate into a 3D addressing key at a given depth.
|
inlineinherited |
Converts from a single coordinate into a discrete key.
|
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.
|
inlineinherited |
Converts from a 3D coordinate into a 3D addressing key at a given 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. |
|
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)
|
pure virtualinherited |
virtual constructor: creates a new object of same type
Implemented in octomap::ColorOcTree, octomap::OcTreeStamped, octomap::OcTree, and octomap::OcTreeBase< NODE >.
|
inherited |
Creates (allocates) the i-th child of the node.
|
staticinherited |
Creates a certain OcTree (factory pattern)
References OCTOMAP_ERROR, and octomap::AbstractOcTree::setResolution().
Referenced by octomap::AbstractOcTree::read().
|
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.
|
inherited |
Deletes the i-th child of the node.
|
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()
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
virtualinherited |
Expands all pruned nodes (reverse of prune())
Implements octomap::AbstractOcTree.
|
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)
|
protectedinherited |
recursive call of expand()
void octomap::CountingOcTree::getCentersMinHits | ( | point3d_list & | node_centers, |
unsigned int | min_hits | ||
) | const |
|
protected |
References octomap::computeChildKey(), octomap::CountingOcTreeNode::getCount(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::getNodeChild(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::keyToCoord(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::nodeChildExists(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::nodeHasChildren(), and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::tree_max_val.
Referenced by getCentersMinHits().
|
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.
|
inherited |
|
inherited |
|
inlineinherited |
|
inherited |
Traverses the tree to calculate the total number of leaf nodes.
|
protectedinherited |
|
inlineinherited |
|
pure virtualinherited |
Referenced by main(), octomap::AbstractOcTree::write(), and octomap::AbstractOccupancyOcTree::writeBinaryConst().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
returns actual class name as string for identification
|
pure virtualinherited |
returns actual class name as string for identification
Implemented in octomap::ColorOcTree, octomap::OcTreeStamped, octomap::OcTree, and octomap::OcTreeBase< NODE >.
Referenced by main(), octomap::AbstractOcTree::registerTreeType(), octomap::AbstractOcTree::write(), and octomap::AbstractOccupancyOcTree::writeBinaryConst().
|
inherited |
return centers of leafs that do NOT exist (but could) in a given bounding box
|
protectedinherited |
initialize non-trivial members, helper for constructors
|
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
|
inlineinherited |
converts from an addressing 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
|
inherited |
converts from a discrete key at a given depth into a coordinate corresponding to the key's center
|
inherited |
|
virtualinherited |
|
pure virtualinherited |
|
inlinevirtualinherited |
|
pure virtualinherited |
|
inherited |
Safe test if node has a child at index childIdx.
First tests if there are any children. Replaces node->childExists(...)
|
inherited |
Safe test if node has any children.
Replaces node->hasChildren(...)
|
inherited |
Comparison between two octrees, all meta data, all nodes, and the structure must be identical.
|
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.
Implements octomap::AbstractOcTree.
|
virtualinherited |
Prunes a node when it is collapsible.
|
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:
References OCTOMAP_ERROR_STR.
|
staticinherited |
Read the file header, create the appropriate class and deserialize. This creates a new octree which you need to delete yourself.
References octomap::AbstractOcTree::createTree(), octomap::AbstractOcTree::fileHeader, OCTOMAP_DEBUG_STR, OCTOMAP_ERROR_STR, octomap::AbstractOcTree::readData(), octomap::AbstractOcTree::readHeader(), and octomap::AbstractOcTree::size().
|
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 |
References OCTOMAP_ERROR_STR, OCTOMAP_WARNING, OCTOMAP_WARNING_STR, and octomap::AbstractOcTree::size().
Referenced by octomap::AbstractOcTree::read(), and octomap::AbstractOccupancyOcTree::readBinary().
|
protectedinherited |
recursive call of readData()
|
staticprotectedinherited |
References octomap::AbstractOcTree::getTreeType().
Referenced by octomap::OcTree::StaticMemberInitializer::StaticMemberInitializer(), octomap::CountingOcTree::StaticMemberInitializer::StaticMemberInitializer(), octomap::OcTreeStamped::StaticMemberInitializer::StaticMemberInitializer(), and octomap::ColorOcTree::StaticMemberInitializer::StaticMemberInitializer().
|
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.
|
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.
|
virtualinherited |
Change the resolution of the octree, scaling all voxels. This will not preserve the (metric) scale!
Implements octomap::AbstractOcTree.
|
inlinevirtualinherited |
|
pure virtualinherited |
|
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
CountingOcTreeNode * octomap::CountingOcTree::updateNode | ( | const OcTreeKey & | k | ) |
References octomap::computeChildIdx(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::createNodeChild(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::getNodeChild(), octomap::CountingOcTreeNode::increaseCount(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::nodeChildExists(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::root, octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::tree_depth, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::tree_size.
|
virtual |
|
inherited |
|
inherited |
Write file header and complete tree to file (serialization)
References OCTOMAP_ERROR_STR.
Referenced by main().
|
inherited |
Write file header and complete tree to stream (serialization)
References octomap::AbstractOcTree::fileHeader, octomap::AbstractOcTree::getResolution(), octomap::AbstractOcTree::getTreeType(), octomap::AbstractOcTree::size(), and octomap::AbstractOcTree::writeData().
|
virtualinherited |
Write complete state of tree to stream (without file header) unmodified. Pruning the tree first produces smaller files (lossless compression)
Implements octomap::AbstractOcTree.
|
protectedinherited |
recursive call of writeData()
|
staticprotected |
static member to ensure static initialization (only once)
Referenced by CountingOcTree().
|
staticprotectedinherited |
Referenced by octomap::AbstractOcTree::read(), and octomap::AbstractOcTree::write().
|
protectedinherited |
data structure for ray casting, array for multithreading
|
protectedinherited |
|
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 |
in meters
|
protectedinherited |
= 1. / resolution
|
protectedinherited |
Pointer to the root NODE, NULL for empty tree.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Maximum tree depth is fixed to 16 currently.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
number of nodes in tree flag to denote whether the octree extent changed (for lazy min/max eval)