Public Member Functions | List of all members
octomap::OcTreeNode Class Reference

#include <OcTreeNode.h>

Inheritance diagram for octomap::OcTreeNode:
Inheritance graph
[legend]

Public Member Functions

void addValue (const float &p)
 adds p to the node's logOdds value (with no boundary / threshold checking!) More...
 
bool createChild (unsigned int i)
 
OcTreeNodegetChild (unsigned int i)
 
const OcTreeNodegetChild (unsigned int i) const
 
float getLogOdds () const
 
float getMaxChildLogOdds () const
 
double getMeanChildLogOdds () const
 
double getOccupancy () const
 
 OcTreeNode ()
 
void setLogOdds (float l)
 sets log odds occupancy of node More...
 
void updateOccupancyChildren ()
 update this node's occupancy according to its children's maximum occupancy More...
 
 ~OcTreeNode ()
 
- Public Member Functions inherited from octomap::OcTreeDataNode< float >
bool childExists (unsigned int i) const
 
bool collapsible () const
 
bool createChild (unsigned int i)
 initialize i-th child, allocate children array if needed More...
 
void deleteChild (unsigned int i)
 Deletes the i-th child of the node. More...
 
void expandNode ()
 
OcTreeDataNode< float > * getChild (unsigned int i)
 
const OcTreeDataNode< float > * getChild (unsigned int i) const
 
float getValue () const
 
bool hasChildren () const
 
 OcTreeDataNode ()
 
 OcTreeDataNode (floatinitVal)
 
 OcTreeDataNode (const OcTreeDataNode &rhs)
 Copy constructor, performs a recursive deep-copy of all children. More...
 
bool operator== (const OcTreeDataNode &rhs) const
 Equals operator, compares if the stored value is identical. More...
 
bool pruneNode ()
 
std::istream & readValue (std::istream &s)
 
void setValue (floatv)
 sets value to be stored in the node More...
 
std::ostream & writeValue (std::ostream &s) const
 
 ~OcTreeDataNode ()
 

Additional Inherited Members

- Public Types inherited from octomap::OcTreeDataNode< float >
typedef float DataType
 Make the templated data type available from the outside. More...
 
- Protected Member Functions inherited from octomap::OcTreeDataNode< float >
void allocChildren ()
 
- Protected Attributes inherited from octomap::OcTreeDataNode< float >
OcTreeDataNode< float > ** children
 pointer to array of children, may be NULL More...
 
float value
 stored data (payload) More...
 

Detailed Description

Nodes to be used in OcTree. They represent 3d occupancy grid cells. "value" stores their log-odds occupancy.

Note: If you derive a class (directly or indirectly) from OcTreeNode or OcTreeDataNode, you have to implement (at least) the following functions: createChild(), getChild(), getChild() const, expandNode() to avoid slicing errors and memory-related bugs. See ColorOcTreeNode in ColorOcTree.h for an example.

Definition at line 55 of file OcTreeNode.h.

Constructor & Destructor Documentation

octomap::OcTreeNode::OcTreeNode ( )

Definition at line 44 of file OcTreeNode.cpp.

octomap::OcTreeNode::~OcTreeNode ( )

Definition at line 49 of file OcTreeNode.cpp.

Member Function Documentation

void octomap::OcTreeNode::addValue ( const float &  p)

adds p to the node's logOdds value (with no boundary / threshold checking!)

Definition at line 94 of file OcTreeNode.cpp.

bool octomap::OcTreeNode::createChild ( unsigned int  i)

Definition at line 54 of file OcTreeNode.cpp.

OcTreeNode* octomap::OcTreeNode::getChild ( unsigned int  i)
inline

Definition at line 64 of file OcTreeNode.h.

const OcTreeNode* octomap::OcTreeNode::getChild ( unsigned int  i) const
inline

Definition at line 67 of file OcTreeNode.h.

float octomap::OcTreeNode::getLogOdds ( ) const
inline
Returns
log odds representation of occupancy probability of node

Definition at line 77 of file OcTreeNode.h.

float octomap::OcTreeNode::getMaxChildLogOdds ( ) const
Returns
maximum of children's occupancy probabilities, in log odds

Definition at line 82 of file OcTreeNode.cpp.

double octomap::OcTreeNode::getMeanChildLogOdds ( ) const
Returns
mean of all children's occupancy probabilities, in log odds

Definition at line 67 of file OcTreeNode.cpp.

double octomap::OcTreeNode::getOccupancy ( ) const
inline
Returns
occupancy probability of node

Definition at line 74 of file OcTreeNode.h.

void octomap::OcTreeNode::setLogOdds ( float  l)
inline

sets log odds occupancy of node

Definition at line 79 of file OcTreeNode.h.

void octomap::OcTreeNode::updateOccupancyChildren ( )
inline

update this node's occupancy according to its children's maximum occupancy

Definition at line 92 of file OcTreeNode.h.


The documentation for this class was generated from the following files:


octomap
Author(s): Kai M. Wurm , Armin Hornung
autogenerated on Mon Jun 10 2019 14:00:13