octomap 1.5.0
|
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) | |
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) | |
ColorOcTreeNode * | averageNodeColor (const float &x, const float &y, const float &z, const unsigned char &r, const unsigned char &g, const unsigned char &b) |
ColorOcTreeNode * | averageNodeColor (const OcTreeKey &key, const unsigned char &r, const unsigned char &g, const unsigned char &b) |
bool | bbxSet () const |
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 | calcNumThresholdedNodes (unsigned int &num_thresholded, unsigned int &num_other) const |
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(). | |
KeyBoolMap::const_iterator | changedKeysBegin () |
Iterator to traverse all keys of changed nodes. | |
KeyBoolMap::const_iterator | changedKeysEnd () |
Iterator to traverse all keys of changed nodes. | |
void | clear () |
Deletes the complete tree structure (only the root node will remain) | |
ColorOcTree (double resolution) | |
Default constructor, sets resolution of leafs. | |
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. | |
void | computeUpdate (const Pointcloud &scan, const octomap::point3d &origin, KeySet &free_cells, KeySet &occupied_cells, double maxrange) |
Helper for insertScan. | |
unsigned short int | coordToKey (double coordinate) const |
Converts from a single coordinate into a discrete key. | |
unsigned short int | coordToKey (double coordinate, unsigned depth) const |
Converts from a single coordinate into a discrete key at a given depth. | |
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. | |
bool | coordToKeyChecked (double coordinate, unsigned short int &key) const |
Converts a single coordinate into a discrete addressing key, with boundary checking. | |
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, unsigned depth, unsigned short int &key) const |
Converts a single coordinate into a discrete addressing key, with boundary checking. | |
ColorOcTree * | create () const |
virtual constructor: creates a new object of same type (Covariant return type requires an up-to-date compiler) | |
OcTreeBaseImpl | deepCopy () const |
bool | deleteNode (float x, float y, float z, unsigned int depth=0) |
Delete a node (if exists) given a 3d point. | |
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. | |
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 (bool genKeyAtDepth(const OcTreeKey &key, unsigned int depth, OcTreeKey &out_key) 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 | |
DEPRECATED (void getOccupied(point3d_list &node_centers, unsigned int max_depth=0) const) | |
Convenience function to return all occupied nodes in the OcTree. | |
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. | |
DEPRECATED (void getFreespace(std::list< OcTreeVolume > &free_volumes, unsigned int max_depth=0) const) | |
Convenience function to return all free nodes in the OcTree. | |
DEPRECATED (void getOccupied(std::list< OcTreeVolume > &occupied_volumes, unsigned int max_depth=0) const) | |
Convenience function to return all occupied nodes in the OcTree. | |
DEPRECATED (void getOccupiedLeafsBBX(point3d_list &node_centers, point3d min, point3d max) const) | |
returns occupied leafs within a bounding box defined by min and max. | |
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. | |
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 ) | |
void | enableChangeDetection (bool enable) |
track or ignore changes while inserting scans (default: ignore) | |
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()) | |
point3d | getBBXBounds () const |
point3d | getBBXCenter () const |
point3d | getBBXMax () const |
point3d | getBBXMin () const |
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 | getMetricMax (double &x, double &y, double &z) |
maximum 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 | getMetricMin (double &x, double &y, double &z) |
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. | |
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 |
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 | |
bool | inBBX (const point3d &p) const |
bool | inBBX (const OcTreeKey &key) const |
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. | |
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. | |
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) | |
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. | |
virtual void | insertScanNaive (const Pointcloud &pc, const point3d &origin, double maxrange, bool pruning=true, bool lazy_eval=false) |
for testing only | |
virtual void | integrateHit (ColorOcTreeNode *occupancyNode) const |
integrate a "hit" measurement according to the tree's sensor model | |
virtual void | integrateMiss (ColorOcTreeNode *occupancyNode) const |
integrate a "miss" measurement according to the tree's sensor model | |
ColorOcTreeNode * | integrateNodeColor (const OcTreeKey &key, const unsigned char &r, const unsigned char &g, const unsigned char &b) |
ColorOcTreeNode * | integrateNodeColor (const float &x, const float &y, const float &z, const unsigned char &r, const unsigned char &g, const unsigned char &b) |
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 | |
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 | |
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 | |
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 | |
size_t | memoryFullGrid () |
virtual size_t | memoryUsage () const |
virtual size_t | memoryUsageNode () const |
virtual void | nodeToMaxLikelihood (ColorOcTreeNode &occupancyNode) const |
converts the node to the maximum likelihood value according to the tree's parameter for "occupancy" | |
virtual void | nodeToMaxLikelihood (ColorOcTreeNode *occupancyNode) const |
converts the node to the maximum likelihood value according to the tree's parameter for "occupancy" | |
bool | operator== (const OcTreeBaseImpl< NODE, INTERFACE > &rhs) const |
virtual void | prune () |
Lossless compression of OcTree: merge children to parent when there are eight children with identical values. | |
std::istream & | readBinaryData (std::istream &s) |
Reads only the data (=tree structure) from the input stream. | |
std::istream & | readBinaryNode (std::istream &s, ColorOcTreeNode *node) const |
Read node from binary stream (max-likelihood value), recursively continue with all children. | |
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. | |
void | resetChangeDetection () |
Reset the set of changed keys. Call this after you obtained all changed nodes. | |
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) | |
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) | |
NODE * | search (float x, float y, float z, unsigned int depth=0) const |
Search node at specified depth given a 3d point (depth=0: search full tree depth) | |
void | setBBXMax (point3d &max) |
sets the maximum for a query bounding box to use | |
void | setBBXMin (point3d &min) |
sets the minimum for a query bounding box to use | |
ColorOcTreeNode * | setNodeColor (const float &x, const float &y, const float &z, const unsigned char &r, const unsigned char &g, const unsigned char &b) |
ColorOcTreeNode * | setNodeColor (const OcTreeKey &key, const unsigned char &r, const unsigned char &g, const unsigned char &b) |
void | setResolution (double r) |
Change the resolution of the octree, scaling all voxels. | |
virtual size_t | size () const |
virtual void | toMaxLikelihood () |
Creates the maximum likelihood map by calling toMaxLikelihood on all tree nodes, setting their occupancy to the corresponding occupancy thresholds. | |
void | updateInnerOccupancy () |
Updates the occupancy of all inner nodes to reflect their children's occupancy. | |
virtual ColorOcTreeNode * | updateNode (const point3d &value, bool occupied, bool lazy_eval=false) |
Integrate occupancy measurement. | |
virtual ColorOcTreeNode * | updateNode (const OcTreeKey &key, bool occupied, bool lazy_eval=false) |
Integrate occupancy measurement. | |
virtual ColorOcTreeNode * | updateNode (const point3d &value, float log_odds_update, bool lazy_eval=false) |
Manipulate log_odds value of voxel directly. | |
virtual ColorOcTreeNode * | updateNode (const OcTreeKey &key, float log_odds_update, bool lazy_eval=false) |
Manipulate log_odds value of voxel directly. | |
virtual void | updateNodeLogOdds (ColorOcTreeNode *occupancyNode, const float &update) const |
void | useBBXLimit (bool enable) |
use or ignore BBX limit (default: ignore) | |
double | volume () |
std::ostream & | writeBinaryData (std::ostream &s) const |
Writes the data of the tree (without header) to the stream, recursively calling writeBinaryNode (starting with root) | |
std::ostream & | writeBinaryNode (std::ostream &s, const ColorOcTreeNode *node) const |
Write node to binary stream (max-likelihood value), recursively continue with all children. | |
void | writeColorHistogram (std::string filename) |
std::ostream & | writeData (std::ostream &s) const |
Write complete state of tree to stream (without file header) unmodified. | |
Protected Member Functions | |
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 | calcNumThresholdedNodesRecurs (ColorOcTreeNode *node, unsigned int &num_thresholded, unsigned int &num_other) const |
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() | |
size_t | getNumLeafNodesRecurs (const NODE *parent) const |
void | getOccupiedLeafsBBXRecurs (point3d_list &node_centers, unsigned int max_depth, ColorOcTreeNode *node, unsigned int depth, const OcTreeKey &parent_key, const OcTreeKey &min, const OcTreeKey &max) const |
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. | |
void | pruneRecurs (NODE *node, unsigned int depth, unsigned int max_depth, unsigned int &num_pruned) |
recursive call of prune() | |
void | toMaxLikelihoodRecurs (ColorOcTreeNode *node, unsigned int depth, unsigned int max_depth) |
void | updateInnerOccupancyRecurs (ColorOcTreeNode *node, unsigned int depth) |
ColorOcTreeNode * | updateNodeRecurs (ColorOcTreeNode *node, bool node_just_created, const OcTreeKey &key, unsigned int depth, const float &log_odds_update, bool lazy_eval=false) |
Protected Attributes | |
point3d | bbx_max |
OcTreeKey | bbx_max_key |
point3d | bbx_min |
OcTreeKey | bbx_min_key |
KeyBoolMap | changed_keys |
Set of leaf keys (lowest level) which changed since last resetChangeDetection. | |
KeyRay | keyray |
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 | |
double | resolution |
in meters | |
double | resolution_factor |
= 1. / resolution | |
NODE * | root |
bool | size_changed |
flag to denote whether the octree extent changed (for lazy min/max eval) | |
std::vector< double > | sizeLookupTable |
contains the size of a voxel at level i (0: root node). tree_depth+1 levels (incl. 0) | |
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 | |
bool | use_bbx_limit |
use bounding box for queries (needs to be set)? | |
bool | use_change_detection |
Static Protected Attributes | |
static StaticMemberInitializer | colorOcTreeMemberInit |
static member to ensure static initialization (only once) |
typedef leaf_iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator [inherited] |
typedef NODE octomap::OcTreeBaseImpl< NODE, INTERFACE >::NodeType [inherited] |
Make the templated NODE type available from the outside.
octomap::ColorOcTree::ColorOcTree | ( | double | resolution | ) | [inline] |
Default constructor, sets resolution of leafs.
Referenced by create(), and octomap::ColorOcTree::StaticMemberInitializer::StaticMemberInitializer().
OcTreeKey octomap::OcTreeBaseImpl< NODE, INTERFACE >::adjustKeyAtDepth | ( | const OcTreeKey & | key, |
unsigned int | depth | ||
) | const [inline, inherited] |
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 |
Referenced by octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::adjustKeyAtDepth().
unsigned short int octomap::OcTreeBaseImpl< NODE, I >::adjustKeyAtDepth | ( | unsigned short int | key, |
unsigned int | depth | ||
) | const [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 |
ColorOcTreeNode * octomap::ColorOcTree::averageNodeColor | ( | const OcTreeKey & | key, |
const unsigned char & | r, | ||
const unsigned char & | g, | ||
const unsigned char & | b | ||
) |
References octomap::ColorOcTreeNode::Color::b, octomap::ColorOcTreeNode::Color::g, octomap::ColorOcTreeNode::getColor(), octomap::ColorOcTreeNode::isColorSet(), octomap::ColorOcTreeNode::Color::r, octomap::OcTreeBaseImpl< NODE, INTERFACE >::search(), and octomap::ColorOcTreeNode::setColor().
Referenced by averageNodeColor().
ColorOcTreeNode* octomap::ColorOcTree::averageNodeColor | ( | const float & | x, |
const float & | y, | ||
const float & | z, | ||
const unsigned char & | r, | ||
const unsigned char & | g, | ||
const unsigned char & | b | ||
) | [inline] |
bool octomap::OccupancyOcTreeBase< ColorOcTreeNode >::bbxSet | ( | ) | const [inline, inherited] |
iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::begin | ( | unsigned char | maxDepth = 0 | ) | const [inline, inherited] |
Referenced by main().
leaf_iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::begin_leafs | ( | unsigned char | maxDepth = 0 | ) | const [inline, inherited] |
Referenced by octomap::OcTreeStamped::degradeOutdatedNodes(), and main().
leaf_bbx_iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::begin_leafs_bbx | ( | const OcTreeKey & | min, |
const OcTreeKey & | max, | ||
unsigned char | maxDepth = 0 |
||
) | const [inline, inherited] |
leaf_bbx_iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::begin_leafs_bbx | ( | const point3d & | min, |
const point3d & | max, | ||
unsigned char | maxDepth = 0 |
||
) | const [inline, inherited] |
tree_iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::begin_tree | ( | unsigned char | maxDepth = 0 | ) | const [inline, inherited] |
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::operator==(), printChanges(), and writeColorHistogram().
void octomap::OcTreeBaseImpl< NODE, I >::calcMinMax | ( | ) | [protected, inherited] |
recalculates min and max in x, y, z. Does nothing when tree size didn't change.
size_t octomap::OcTreeBaseImpl< NODE, I >::calcNumNodes | ( | ) | const [inherited] |
Traverses the tree to calculate the total number of nodes.
Referenced by main(), and octomap::OccupancyOcTreeBase< NODE >::readBinaryData().
void octomap::OcTreeBaseImpl< NODE, I >::calcNumNodesRecurs | ( | NODE * | node, |
size_t & | num_nodes | ||
) | const [protected, inherited] |
void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::calcNumThresholdedNodes | ( | unsigned int & | num_thresholded, |
unsigned int & | num_other | ||
) | const [inherited] |
void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::calcNumThresholdedNodesRecurs | ( | ColorOcTreeNode * | node, |
unsigned int & | num_thresholded, | ||
unsigned int & | num_other | ||
) | const [protected, inherited] |
virtual bool octomap::OccupancyOcTreeBase< ColorOcTreeNode >::castRay | ( | const point3d & | origin, |
const point3d & | direction, | ||
point3d & | end, | ||
bool | ignoreUnknownCells = false , |
||
double | maxRange = -1.0 |
||
) | const [virtual, inherited] |
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) |
KeyBoolMap::const_iterator octomap::OccupancyOcTreeBase< ColorOcTreeNode >::changedKeysBegin | ( | ) | [inline, inherited] |
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)
KeyBoolMap::const_iterator octomap::OccupancyOcTreeBase< ColorOcTreeNode >::changedKeysEnd | ( | ) | [inline, inherited] |
Iterator to traverse all keys of changed nodes.
void octomap::OcTreeBaseImpl< NODE, I >::clear | ( | ) | [inherited] |
Deletes the complete tree structure (only the root node will remain)
bool octomap::OcTreeBaseImpl< NODE, I >::computeRay | ( | const point3d & | origin, |
const point3d & | end, | ||
std::vector< point3d > & | ray | ||
) | [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" |
bool octomap::OcTreeBaseImpl< NODE, I >::computeRayKeys | ( | const point3d & | origin, |
const point3d & | end, | ||
KeyRay & | ray | ||
) | const [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" |
Reimplemented in octomap::OcTreeBaseSE< NODE >.
References octomap::KeyRay::addKey(), octomath::Vector3::norm(), OCTOMAP_WARNING_STR, octomap::KeyRay::reset(), octomap::KeyRay::size(), and octomap::KeyRay::sizeMax().
void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::computeUpdate | ( | const Pointcloud & | scan, |
const octomap::point3d & | origin, | ||
KeySet & | free_cells, | ||
KeySet & | occupied_cells, | ||
double | maxrange | ||
) | [inherited] |
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) |
unsigned short int octomap::OcTreeBaseImpl< NODE, I >::coordToKey | ( | double | coordinate, |
unsigned | depth | ||
) | const [inline, inherited] |
Converts from a single coordinate into a discrete key at a given depth.
OcTreeKey octomap::OcTreeBaseImpl< NODE, INTERFACE >::coordToKey | ( | const point3d & | coord | ) | const [inline, inherited] |
Converts from a 3D coordinate into a 3D addressing key.
OcTreeKey octomap::OcTreeBaseImpl< NODE, INTERFACE >::coordToKey | ( | const point3d & | coord, |
unsigned | depth | ||
) | const [inline, inherited] |
Converts from a 3D coordinate into a 3D addressing key at a given depth.
unsigned short int octomap::OcTreeBaseImpl< NODE, INTERFACE >::coordToKey | ( | double | coordinate | ) | const [inline, inherited] |
Converts from a single coordinate into a discrete key.
Referenced by octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::coordToKey().
bool octomap::OcTreeBaseImpl< NODE, I >::coordToKeyChecked | ( | const point3d & | coord, |
unsigned | depth, | ||
OcTreeKey & | key | ||
) | const [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. |
bool octomap::OcTreeBaseImpl< NODE, I >::coordToKeyChecked | ( | const point3d & | coord, |
OcTreeKey & | key | ||
) | const [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 averageNodeColor(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::DEPRECATED(), integrateNodeColor(), main(), setNodeColor(), and octomap::CountingOcTree::updateNode().
bool octomap::OcTreeBaseImpl< NODE, I >::coordToKeyChecked | ( | double | coordinate, |
unsigned | depth, | ||
unsigned short int & | key | ||
) | const [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 |
bool octomap::OcTreeBaseImpl< NODE, I >::coordToKeyChecked | ( | double | coordinate, |
unsigned short int & | key | ||
) | const [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 |
ColorOcTree* octomap::ColorOcTree::create | ( | ) | const [inline] |
virtual constructor: creates a new object of same type (Covariant return type requires an up-to-date compiler)
References ColorOcTree(), and octomap::OcTreeBaseImpl< NODE, INTERFACE >::resolution.
OcTreeBaseImpl octomap::OcTreeBaseImpl< NODE, INTERFACE >::deepCopy | ( | ) | const [inherited] |
bool octomap::OcTreeBaseImpl< NODE, I >::deleteNode | ( | float | x, |
float | y, | ||
float | z, | ||
unsigned int | depth = 0 |
||
) | [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.
bool octomap::OcTreeBaseImpl< NODE, I >::deleteNode | ( | const OcTreeKey & | key, |
unsigned int | depth = 0 |
||
) | [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.
bool octomap::OcTreeBaseImpl< NODE, I >::deleteNode | ( | const point3d & | value, |
unsigned int | depth = 0 |
||
) | [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.
bool octomap::OcTreeBaseImpl< NODE, I >::deleteNodeRecurs | ( | NODE * | node, |
unsigned int | depth, | ||
unsigned int | max_depth, | ||
const OcTreeKey & | key | ||
) | [protected, inherited] |
recursive call of deleteNode()
References octomap::computeChildIdx().
octomap::OcTreeBaseImpl< NODE, INTERFACE >::DEPRECATED | ( | bool genKeyAtDepth(const OcTreeKey &key, unsigned int depth, OcTreeKey &out_key) | const | ) | [inherited] |
octomap::OcTreeBaseImpl< NODE, INTERFACE >::DEPRECATED | ( | bool genCoordFromKey(const unsigned short int &key, unsigned depth, float &coord) | const | ) | [inline, inherited] |
octomap::OcTreeBaseImpl< NODE, INTERFACE >::DEPRECATED | ( | inline bool genCoordFromKey(const unsigned short int &key, float &coord, unsigned depth) | const | ) | [inline, inherited] |
octomap::OcTreeBaseImpl< NODE, INTERFACE >::DEPRECATED | ( | inline bool genCoordFromKey(const unsigned short int &key, float &coord) | const | ) | [inline, inherited] |
octomap::OcTreeBaseImpl< NODE, INTERFACE >::DEPRECATED | ( | inline double genCoordFromKey(const unsigned short int &key) | const | ) | [inline, inherited] |
octomap::OcTreeBaseImpl< NODE, INTERFACE >::DEPRECATED | ( | double genCoordFromKey(const unsigned short int &key, unsigned depth) | const | ) | [inline, inherited] |
octomap::OcTreeBaseImpl< NODE, INTERFACE >::DEPRECATED | ( | inline bool genCoords(const OcTreeKey &key, unsigned int depth, point3d &point) | const | ) | [inline, inherited] |
Will always return true, there is no more boundary check here
octomap::OcTreeBaseImpl< NODE, INTERFACE >::DEPRECATED | ( | inline void genPos(const OcTreeKey &key, int depth, unsigned int &pos) | const | ) | [inline, inherited] |
generate child index (between 0 and 7) from key at given tree depth DEPRECATED
octomap::OccupancyOcTreeBase< ColorOcTreeNode >::DEPRECATED | ( | void getOccupied(point3d_list &node_centers, unsigned int max_depth=0) | const | ) | [inherited] |
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< ColorOcTreeNode >::DEPRECATED | ( | void getOccupied(std::list< OcTreeVolume > &binary_nodes, std::list< OcTreeVolume > &delta_nodes, unsigned int max_depth=0) | const | ) | [inherited] |
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< ColorOcTreeNode >::DEPRECATED | ( | void getOccupied(std::list< OcTreeVolume > &occupied_volumes, unsigned int max_depth=0) | const | ) | [inherited] |
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< ColorOcTreeNode >::DEPRECATED | ( | void getOccupiedLeafsBBX(point3d_list &node_centers, point3d min, point3d max) | const | ) | [inherited] |
returns occupied leafs within a bounding box defined by min and max.
octomap::OccupancyOcTreeBase< ColorOcTreeNode >::DEPRECATED | ( | void getFreespace(std::list< OcTreeVolume > &free_volumes, unsigned int max_depth=0) | const | ) | [inherited] |
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< ColorOcTreeNode >::DEPRECATED | ( | void getFreespace(std::list< OcTreeVolume > &binary_nodes, std::list< OcTreeVolume > &delta_nodes, unsigned int max_depth=0) | const | ) | [inherited] |
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 |
octomap::OcTreeBaseImpl< NODE, INTERFACE >::DEPRECATED | ( | bool genKeyValue(double coordinate, unsigned short int &keyval) | const | ) | [inline, inherited] |
octomap::OcTreeBaseImpl< NODE, INTERFACE >::DEPRECATED | ( | bool genKey(const point3d &point, OcTreeKey &key) | const | ) | [inline, inherited] |
octomap::OcTreeBaseImpl< NODE, INTERFACE >::DEPRECATED | ( | bool genKeyValueAtDepth(const unsigned short int keyval, unsigned int depth, unsigned short int &out_keyval) | const | ) | [inherited] |
void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::enableChangeDetection | ( | bool | enable | ) | [inline, inherited] |
track or ignore changes while inserting scans (default: ignore)
const iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::end | ( | ) | const [inline, inherited] |
Referenced by octomap::OcTreeStamped::degradeOutdatedNodes(), main(), and writeColorHistogram().
const leaf_iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::end_leafs | ( | ) | const [inline, inherited] |
Referenced by octomap::OcTreeStamped::degradeOutdatedNodes(), and main().
const leaf_bbx_iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::end_leafs_bbx | ( | ) | const [inline, inherited] |
const tree_iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::end_tree | ( | ) | const [inline, inherited] |
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::operator==(), printChanges(), and writeColorHistogram().
void octomap::OcTreeBaseImpl< NODE, I >::expand | ( | ) | [virtual, inherited] |
Expands all pruned nodes (reverse of prune())
Referenced by main(), and printChanges().
void octomap::OcTreeBaseImpl< NODE, I >::expandRecurs | ( | NODE * | node, |
unsigned int | depth, | ||
unsigned int | max_depth | ||
) | [protected, inherited] |
recursive call of expand()
point3d octomap::OccupancyOcTreeBase< ColorOcTreeNode >::getBBXBounds | ( | ) | const [inherited] |
point3d octomap::OccupancyOcTreeBase< ColorOcTreeNode >::getBBXCenter | ( | ) | const [inherited] |
point3d octomap::OccupancyOcTreeBase< ColorOcTreeNode >::getBBXMax | ( | ) | const [inline, inherited] |
point3d octomap::OccupancyOcTreeBase< ColorOcTreeNode >::getBBXMin | ( | ) | const [inline, inherited] |
void octomap::OcTreeBaseImpl< NODE, I >::getMetricMax | ( | double & | x, |
double & | y, | ||
double & | z | ||
) | const [inherited] |
maximum value of the bounding box of all known space in x, y, z
void octomap::OcTreeBaseImpl< NODE, I >::getMetricMax | ( | double & | x, |
double & | y, | ||
double & | z | ||
) | [virtual, inherited] |
maximum value of the bounding box of all known space in x, y, z
void octomap::OcTreeBaseImpl< NODE, I >::getMetricMin | ( | double & | x, |
double & | y, | ||
double & | z | ||
) | const [inherited] |
minimum value of the bounding box of all known space in x, y, z
void octomap::OcTreeBaseImpl< NODE, I >::getMetricMin | ( | double & | x, |
double & | y, | ||
double & | z | ||
) | [virtual, inherited] |
minimum value of the bounding box of all known space in x, y, z
void octomap::OcTreeBaseImpl< NODE, I >::getMetricSize | ( | double & | x, |
double & | y, | ||
double & | z | ||
) | [virtual, inherited] |
double octomap::OcTreeBaseImpl< NODE, INTERFACE >::getNodeSize | ( | unsigned | depth | ) | const [inline, inherited] |
size_t octomap::OcTreeBaseImpl< NODE, I >::getNumLeafNodes | ( | ) | const [inherited] |
Traverses the tree to calculate the total number of leaf nodes.
Referenced by main().
size_t octomap::OcTreeBaseImpl< NODE, I >::getNumLeafNodesRecurs | ( | const NODE * | parent | ) | const [protected, inherited] |
void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::getOccupiedLeafsBBXRecurs | ( | point3d_list & | node_centers, |
unsigned int | max_depth, | ||
ColorOcTreeNode * | node, | ||
unsigned int | depth, | ||
const OcTreeKey & | parent_key, | ||
const OcTreeKey & | min, | ||
const OcTreeKey & | max | ||
) | const [protected, inherited] |
double octomap::OcTreeBaseImpl< NODE, INTERFACE >::getResolution | ( | ) | const [inline, inherited] |
Referenced by getLeafNodesRecurs(), and main().
NODE* octomap::OcTreeBaseImpl< NODE, INTERFACE >::getRoot | ( | ) | const [inline, inherited] |
unsigned int octomap::OcTreeBaseImpl< NODE, INTERFACE >::getTreeDepth | ( | ) | const [inline, inherited] |
std::string octomap::ColorOcTree::getTreeType | ( | ) | const [inline] |
Reimplemented from octomap::OcTreeBaseImpl< NODE, INTERFACE >.
Referenced by main().
void octomap::OcTreeBaseImpl< NODE, I >::getUnknownLeafCenters | ( | point3d_list & | node_centers, |
point3d | pmin, | ||
point3d | pmax | ||
) | const [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().
bool octomap::OccupancyOcTreeBase< ColorOcTreeNode >::inBBX | ( | const OcTreeKey & | key | ) | const [inherited] |
bool octomap::OccupancyOcTreeBase< ColorOcTreeNode >::inBBX | ( | const point3d & | p | ) | const [inherited] |
virtual bool octomap::OccupancyOcTreeBase< ColorOcTreeNode >::insertRay | ( | const point3d & | origin, |
const point3d & | end, | ||
double | maxrange = -1.0 , |
||
bool | lazy_eval = false |
||
) | [virtual, inherited] |
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 void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::insertScan | ( | const ScanNode & | scan, |
double | maxrange = -1. , |
||
bool | pruning = true , |
||
bool | lazy_eval = false |
||
) | [virtual, inherited] |
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. |
virtual void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::insertScan | ( | const Pointcloud & | scan, |
const octomap::point3d & | sensor_origin, | ||
double | maxrange = -1. , |
||
bool | pruning = true , |
||
bool | lazy_eval = false |
||
) | [virtual, inherited] |
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 void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::insertScan | ( | const Pointcloud & | scan, |
const point3d & | sensor_origin, | ||
const pose6d & | frame_origin, | ||
double | maxrange = -1. , |
||
bool | pruning = true , |
||
bool | lazy_eval = false |
||
) | [virtual, inherited] |
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 void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::insertScanNaive | ( | const Pointcloud & | pc, |
const point3d & | origin, | ||
double | maxrange, | ||
bool | pruning = true , |
||
bool | lazy_eval = false |
||
) | [virtual, inherited] |
for testing only
virtual void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::integrateHit | ( | ColorOcTreeNode * | occupancyNode | ) | const [virtual, inherited] |
integrate a "hit" measurement according to the tree's sensor model
virtual void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::integrateMiss | ( | ColorOcTreeNode * | occupancyNode | ) | const [virtual, inherited] |
integrate a "miss" measurement according to the tree's sensor model
bool octomap::OccupancyOcTreeBase< ColorOcTreeNode >::integrateMissOnRay | ( | const point3d & | origin, |
const point3d & | end, | ||
bool | lazy_eval = false |
||
) | [inline, protected, inherited] |
Traces a ray from origin to end and updates all voxels on the way as free.
The volume containing "end" is not updated.
ColorOcTreeNode* octomap::ColorOcTree::integrateNodeColor | ( | const float & | x, |
const float & | y, | ||
const float & | z, | ||
const unsigned char & | r, | ||
const unsigned char & | g, | ||
const unsigned char & | b | ||
) | [inline] |
ColorOcTreeNode * octomap::ColorOcTree::integrateNodeColor | ( | const OcTreeKey & | key, |
const unsigned char & | r, | ||
const unsigned char & | g, | ||
const unsigned char & | b | ||
) |
References octomap::ColorOcTreeNode::Color::b, octomap::ColorOcTreeNode::Color::g, octomap::ColorOcTreeNode::getColor(), octomap::OcTreeNode::getOccupancy(), octomap::ColorOcTreeNode::isColorSet(), octomap::ColorOcTreeNode::Color::r, octomap::OcTreeBaseImpl< NODE, INTERFACE >::search(), and octomap::ColorOcTreeNode::setColor().
Referenced by integrateNodeColor().
double octomap::OcTreeBaseImpl< NODE, INTERFACE >::keyToCoord | ( | unsigned short int | key | ) | const [inline, inherited] |
converts from a discrete key at the lowest tree level into a coordinate corresponding to the key's center
point3d octomap::OcTreeBaseImpl< NODE, INTERFACE >::keyToCoord | ( | const OcTreeKey & | key, |
unsigned | depth | ||
) | const [inline, inherited] |
converts from an addressing key at a given depth into a coordinate corresponding to the key's center
double octomap::OcTreeBaseImpl< NODE, I >::keyToCoord | ( | unsigned short int | key, |
unsigned | depth | ||
) | const [inherited] |
converts from a discrete key at a given depth into a coordinate corresponding to the key's center
Referenced by octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::DEPRECATED(), octomap::CountingOcTree::getCentersMinHitsRecurs(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::keyToCoord(), and main().
point3d octomap::OcTreeBaseImpl< NODE, INTERFACE >::keyToCoord | ( | const OcTreeKey & | key | ) | const [inline, inherited] |
converts from an addressing key at the lowest tree level into a coordinate corresponding to the key's center
size_t octomap::OcTreeBaseImpl< NODE, I >::memoryFullGrid | ( | ) | [inherited] |
size_t octomap::OcTreeBaseImpl< NODE, I >::memoryUsage | ( | ) | const [virtual, inherited] |
Referenced by main().
virtual size_t octomap::OcTreeBaseImpl< NODE, INTERFACE >::memoryUsageNode | ( | ) | const [inline, virtual, inherited] |
virtual void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::nodeToMaxLikelihood | ( | ColorOcTreeNode * | occupancyNode | ) | const [virtual, inherited] |
converts the node to the maximum likelihood value according to the tree's parameter for "occupancy"
virtual void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::nodeToMaxLikelihood | ( | ColorOcTreeNode & | occupancyNode | ) | const [virtual, inherited] |
converts the node to the maximum likelihood value according to the tree's parameter for "occupancy"
bool octomap::OcTreeBaseImpl< NODE, I >::operator== | ( | const OcTreeBaseImpl< NODE, I > & | rhs | ) | const [inherited] |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::begin_tree(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::end_tree(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::resolution, octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_depth, octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_max_val, and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_size.
void octomap::OcTreeBaseImpl< NODE, I >::prune | ( | ) | [virtual, inherited] |
Lossless compression of OcTree: merge children to parent when there are eight children with identical values.
Referenced by main(), and printChanges().
void octomap::OcTreeBaseImpl< NODE, I >::pruneRecurs | ( | NODE * | node, |
unsigned int | depth, | ||
unsigned int | max_depth, | ||
unsigned int & | num_pruned | ||
) | [protected, inherited] |
recursive call of prune()
std::istream& octomap::OccupancyOcTreeBase< ColorOcTreeNode >::readBinaryData | ( | std::istream & | s | ) | [inherited] |
Reads only the data (=tree structure) from the input stream.
The tree needs to be constructed with the proper header information beforehand, see readBinary().
std::istream& octomap::OccupancyOcTreeBase< ColorOcTreeNode >::readBinaryNode | ( | std::istream & | s, |
ColorOcTreeNode * | node | ||
) | const [inherited] |
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 |
std::istream & octomap::OcTreeBaseImpl< NODE, I >::readData | ( | std::istream & | s | ) | [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().
void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::resetChangeDetection | ( | ) | [inline, inherited] |
Reset the set of changed keys. Call this after you obtained all changed nodes.
NODE * octomap::OcTreeBaseImpl< NODE, I >::search | ( | float | x, |
float | y, | ||
float | z, | ||
unsigned int | depth = 0 |
||
) | const [inherited] |
Search node at specified depth given a 3d point (depth=0: search full tree depth)
Referenced by averageNodeColor(), integrateNodeColor(), main(), printChanges(), and setNodeColor().
NODE * octomap::OcTreeBaseImpl< NODE, I >::search | ( | const point3d & | value, |
unsigned int | depth = 0 |
||
) | const [inherited] |
Search node at specified depth given a 3d point (depth=0: search full tree depth)
References OCTOMAP_ERROR_STR.
NODE * octomap::OcTreeBaseImpl< NODE, I >::search | ( | const OcTreeKey & | key, |
unsigned int | depth = 0 |
||
) | const [inherited] |
Search a node at specified depth given an addressing key (depth=0: search full tree depth)
References octomap::computeChildIdx().
void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::setBBXMax | ( | point3d & | max | ) | [inherited] |
sets the maximum for a query bounding box to use
void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::setBBXMin | ( | point3d & | min | ) | [inherited] |
sets the minimum for a query bounding box to use
ColorOcTreeNode* octomap::ColorOcTree::setNodeColor | ( | const float & | x, |
const float & | y, | ||
const float & | z, | ||
const unsigned char & | r, | ||
const unsigned char & | g, | ||
const unsigned char & | b | ||
) | [inline] |
ColorOcTreeNode * octomap::ColorOcTree::setNodeColor | ( | const OcTreeKey & | key, |
const unsigned char & | r, | ||
const unsigned char & | g, | ||
const unsigned char & | b | ||
) |
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::search(), and octomap::ColorOcTreeNode::setColor().
Referenced by main(), and setNodeColor().
void octomap::OcTreeBaseImpl< NODE, I >::setResolution | ( | double | r | ) | [inherited] |
Change the resolution of the octree, scaling all voxels.
This will not preserve the (metric) scale!
Referenced by main(), and octomap::OcTreeBaseImpl< NODE, INTERFACE >::OcTreeBaseImpl().
virtual size_t octomap::OcTreeBaseImpl< NODE, INTERFACE >::size | ( | ) | const [inline, virtual, inherited] |
Referenced by main().
virtual void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::toMaxLikelihood | ( | ) | [virtual, inherited] |
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.
void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::toMaxLikelihoodRecurs | ( | ColorOcTreeNode * | node, |
unsigned int | depth, | ||
unsigned int | max_depth | ||
) | [protected, inherited] |
void octomap::ColorOcTree::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.
Reimplemented from octomap::OccupancyOcTreeBase< ColorOcTreeNode >.
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::root, and updateInnerOccupancyRecurs().
Referenced by main().
void octomap::ColorOcTree::updateInnerOccupancyRecurs | ( | ColorOcTreeNode * | node, |
unsigned int | depth | ||
) | [protected] |
Reimplemented from octomap::OccupancyOcTreeBase< ColorOcTreeNode >.
References octomap::OcTreeDataNode< T >::childExists(), octomap::ColorOcTreeNode::getChild(), octomap::OcTreeDataNode< T >::hasChildren(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_depth, octomap::ColorOcTreeNode::updateColorChildren(), and octomap::OcTreeNode::updateOccupancyChildren().
Referenced by updateInnerOccupancy().
virtual ColorOcTreeNode * octomap::OccupancyOcTreeBase< ColorOcTreeNode >::updateNode | ( | const point3d & | value, |
float | log_odds_update, | ||
bool | lazy_eval = false |
||
) | [virtual, inherited] |
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. |
virtual ColorOcTreeNode * octomap::OccupancyOcTreeBase< ColorOcTreeNode >::updateNode | ( | const OcTreeKey & | key, |
float | log_odds_update, | ||
bool | lazy_eval = false |
||
) | [virtual, inherited] |
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. |
virtual ColorOcTreeNode * octomap::OccupancyOcTreeBase< ColorOcTreeNode >::updateNode | ( | const OcTreeKey & | key, |
bool | occupied, | ||
bool | lazy_eval = false |
||
) | [virtual, inherited] |
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. |
virtual ColorOcTreeNode * octomap::OccupancyOcTreeBase< ColorOcTreeNode >::updateNode | ( | const point3d & | value, |
bool | occupied, | ||
bool | lazy_eval = false |
||
) | [virtual, inherited] |
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. |
virtual void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::updateNodeLogOdds | ( | ColorOcTreeNode * | occupancyNode, |
const float & | update | ||
) | const [virtual, inherited] |
ColorOcTreeNode * octomap::OccupancyOcTreeBase< ColorOcTreeNode >::updateNodeRecurs | ( | ColorOcTreeNode * | node, |
bool | node_just_created, | ||
const OcTreeKey & | key, | ||
unsigned int | depth, | ||
const float & | log_odds_update, | ||
bool | lazy_eval = false |
||
) | [protected, inherited] |
void octomap::OccupancyOcTreeBase< ColorOcTreeNode >::useBBXLimit | ( | bool | enable | ) | [inline, inherited] |
use or ignore BBX limit (default: ignore)
double octomap::OcTreeBaseImpl< NODE, I >::volume | ( | ) | [inherited] |
std::ostream& octomap::OccupancyOcTreeBase< ColorOcTreeNode >::writeBinaryData | ( | std::ostream & | s | ) | const [inherited] |
Writes the data of the tree (without header) to the stream, recursively calling writeBinaryNode (starting with root)
std::ostream& octomap::OccupancyOcTreeBase< ColorOcTreeNode >::writeBinaryNode | ( | std::ostream & | s, |
const ColorOcTreeNode * | node | ||
) | const [inherited] |
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 |
void octomap::ColorOcTree::writeColorHistogram | ( | std::string | filename | ) |
References octomap::ColorOcTreeNode::Color::b, octomap::OcTreeBaseImpl< NODE, INTERFACE >::begin_tree(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::end(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::end_tree(), octomap::ColorOcTreeNode::Color::g, and octomap::ColorOcTreeNode::Color::r.
Referenced by main().
std::ostream & octomap::OcTreeBaseImpl< NODE, I >::writeData | ( | std::ostream & | s | ) | const [inherited] |
Write complete state of tree to stream (without file header) unmodified.
Pruning the tree first produces smaller files (lossless compression)
point3d octomap::OccupancyOcTreeBase< ColorOcTreeNode >::bbx_max [protected, inherited] |
OcTreeKey octomap::OccupancyOcTreeBase< ColorOcTreeNode >::bbx_max_key [protected, inherited] |
point3d octomap::OccupancyOcTreeBase< ColorOcTreeNode >::bbx_min [protected, inherited] |
OcTreeKey octomap::OccupancyOcTreeBase< ColorOcTreeNode >::bbx_min_key [protected, inherited] |
KeyBoolMap octomap::OccupancyOcTreeBase< ColorOcTreeNode >::changed_keys [protected, inherited] |
Set of leaf keys (lowest level) which changed since last resetChangeDetection.
ColorOcTree::StaticMemberInitializer octomap::ColorOcTree::colorOcTreeMemberInit [static, protected] |
static member to ensure static initialization (only once)
KeyRay octomap::OcTreeBaseImpl< NODE, INTERFACE >::keyray [protected, inherited] |
Reimplemented in octomap::OcTreeBaseSE< NODE >.
const leaf_bbx_iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::leaf_iterator_bbx_end [protected, inherited] |
const leaf_iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::leaf_iterator_end [protected, inherited] |
double octomap::OcTreeBaseImpl< NODE, INTERFACE >::max_value[3] [protected, inherited] |
max in x, y, z
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::OcTreeBaseImpl().
double octomap::OcTreeBaseImpl< NODE, INTERFACE >::min_value[3] [protected, inherited] |
min in x, y, z
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::OcTreeBaseImpl().
double octomap::OcTreeBaseImpl< NODE, INTERFACE >::resolution [protected, inherited] |
in meters
Referenced by octomap::OcTreeStamped::create(), octomap::OcTree::create(), create(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::getResolution(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::keyToCoord(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::OcTreeBaseImpl(), and octomap::OcTreeBaseImpl< NODE, INTERFACE >::operator==().
double octomap::OcTreeBaseImpl< NODE, INTERFACE >::resolution_factor [protected, inherited] |
= 1. / resolution
Referenced by octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::coordToKey().
NODE* octomap::OcTreeBaseImpl< NODE, INTERFACE >::root [protected, inherited] |
Referenced by octomap::CountingOcTree::getCentersMinHits(), octomap::OcTreeStamped::getLastUpdateTime(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::getRoot(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::OcTreeBaseImpl(), updateInnerOccupancy(), and octomap::CountingOcTree::updateNode().
bool octomap::OcTreeBaseImpl< NODE, INTERFACE >::size_changed [protected, inherited] |
flag to denote whether the octree extent changed (for lazy min/max eval)
Referenced by octomap::OcTreeBaseImpl< NODE, INTERFACE >::OcTreeBaseImpl().
std::vector<double> octomap::OcTreeBaseImpl< NODE, INTERFACE >::sizeLookupTable [protected, inherited] |
contains the size of a voxel at level i (0: root node). tree_depth+1 levels (incl. 0)
Referenced by octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::getNodeSize().
point3d octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_center [protected, inherited] |
const unsigned int octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_depth [protected, inherited] |
Maximum tree depth is fixed to 16 currently.
Referenced by octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::adjustKeyAtDepth(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::coordToKey(), octomap::CountingOcTree::getCentersMinHits(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::getNodeSize(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::getTreeDepth(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::operator==(), updateInnerOccupancyRecurs(), and octomap::CountingOcTree::updateNode().
const tree_iterator octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_iterator_end [protected, inherited] |
const unsigned int octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_max_val [protected, inherited] |
Referenced by octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::coordToKey(), octomap::CountingOcTree::getCentersMinHits(), octomap::CountingOcTree::getCentersMinHitsRecurs(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::keyToCoord(), and octomap::OcTreeBaseImpl< NODE, INTERFACE >::operator==().
size_t octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_size [protected, inherited] |
bool octomap::OccupancyOcTreeBase< ColorOcTreeNode >::use_bbx_limit [protected, inherited] |
use bounding box for queries (needs to be set)?
bool octomap::OccupancyOcTreeBase< ColorOcTreeNode >::use_change_detection [protected, inherited] |