octomap 1.5.0
|
Interface class for all octree types that store occupancy. More...
Public Member Functions | |
AbstractOccupancyOcTree () | |
virtual void | clear ()=0 |
virtual AbstractOcTree * | create () const =0 |
virtual constructor: creates a new object of same type | |
virtual void | expand ()=0 |
double | getClampingThresMax () const |
float | getClampingThresMaxLog () const |
double | getClampingThresMin () const |
float | getClampingThresMinLog () const |
virtual void | getMetricMax (double &x, double &y, double &z)=0 |
virtual void | getMetricMax (double &x, double &y, double &z) const =0 |
virtual void | getMetricMin (double &x, double &y, double &z) const =0 |
virtual void | getMetricMin (double &x, double &y, double &z)=0 |
virtual void | getMetricSize (double &x, double &y, double &z)=0 |
double | getOccupancyThres () const |
float | getOccupancyThresLog () const |
double | getProbHit () const |
float | getProbHitLog () const |
double | getProbMiss () const |
float | getProbMissLog () const |
virtual double | getResolution () const =0 |
virtual std::string | getTreeType () const =0 |
returns actual class name as string for identification | |
bool | isNodeAtThreshold (const OcTreeNode *occupancyNode) const |
queries whether a node is at the clamping threshold according to the tree's parameter | |
bool | isNodeAtThreshold (const OcTreeNode &occupancyNode) const |
queries whether a node is at the clamping threshold according to the tree's parameter | |
bool | isNodeOccupied (const OcTreeNode *occupancyNode) const |
queries whether a node is occupied according to the tree's parameter for "occupancy" | |
bool | isNodeOccupied (const OcTreeNode &occupancyNode) const |
queries whether a node is occupied according to the tree's parameter for "occupancy" | |
virtual size_t | memoryUsage () const =0 |
virtual size_t | memoryUsageNode () const =0 |
virtual void | prune ()=0 |
bool | readBinary (const std::string &filename) |
Reads OcTree from a binary file. | |
bool | readBinary (std::istream &s) |
Reads an OcTree from an input stream. | |
virtual std::istream & | readBinaryData (std::istream &s)=0 |
Reads the actual data, implemented in OccupancyOcTreeBase::readBinaryData() | |
virtual std::istream & | readData (std::istream &s)=0 |
Read all nodes from the input stream (without file header), for this the tree needs to be already created. | |
void | setClampingThresMax (double thresProb) |
sets the maximum threshold for occupancy clamping (sensor model) | |
void | setClampingThresMin (double thresProb) |
sets the minimum threshold for occupancy clamping (sensor model) | |
void | setOccupancyThres (double prob) |
sets the threshold for occupancy (sensor model) | |
void | setProbHit (double prob) |
sets the probablility for a "hit" (will be converted to logodds) - sensor model | |
void | setProbMiss (double prob) |
sets the probablility for a "miss" (will be converted to logodds) - sensor model | |
virtual void | setResolution (double res)=0 |
virtual size_t | size () const =0 |
virtual void | toMaxLikelihood ()=0 |
virtual OcTreeNode * | updateNode (const OcTreeKey &key, bool occupied, bool lazy_eval=false)=0 |
Integrate occupancy measurement. | |
virtual OcTreeNode * | updateNode (const point3d &value, float log_odds_update, bool lazy_eval=false)=0 |
Manipulate log_odds value of voxel directly. | |
virtual OcTreeNode * | updateNode (const OcTreeKey &key, float log_odds_update, bool lazy_eval=false)=0 |
Manipulate log_odds value of voxel directly. | |
virtual OcTreeNode * | updateNode (const point3d &value, bool occupied, bool lazy_eval=false)=0 |
Integrate occupancy measurement. | |
bool | write (std::ostream &s) const |
Write file header and complete tree to stream (serialization) | |
bool | write (const std::string &filename) const |
Write file header and complete tree to file (serialization) | |
bool | writeBinary (const std::string &filename) |
Writes OcTree to a binary file using writeBinary(). | |
bool | writeBinary (std::ostream &s) |
Writes compressed maximum likelihood OcTree to a binary stream. | |
bool | writeBinaryConst (std::ostream &s) const |
Writes the maximum likelihood OcTree to a binary stream (const variant). | |
bool | writeBinaryConst (const std::string &filename) const |
Writes OcTree to a binary file using writeBinaryConst(). | |
virtual std::ostream & | writeBinaryData (std::ostream &s) const =0 |
Writes the actual data, implemented in OccupancyOcTreeBase::writeBinaryData() | |
virtual std::ostream & | writeData (std::ostream &s) const =0 |
Write complete state of tree to stream (without file header) unmodified. | |
virtual | ~AbstractOccupancyOcTree () |
Static Public Member Functions | |
static AbstractOcTree * | createTree (const std::string id, double res) |
Creates a certain OcTree (factory pattern) | |
static AbstractOcTree * | read (std::istream &s) |
Read the file header, create the appropriate class and deserialize. | |
static AbstractOcTree * | read (const std::string &filename) |
Read the file header, create the appropriate class and deserialize. | |
Protected Member Functions | |
bool | readBinaryLegacyHeader (std::istream &s, unsigned int &size, double &res) |
Try to read the old binary format for conversion, will be removed in the future. | |
Static Protected Member Functions | |
static bool | readHeader (std::istream &s, std::string &id, unsigned &size, double &res) |
static void | registerTreeType (AbstractOcTree *tree) |
Protected Attributes | |
float | clamping_thres_max |
float | clamping_thres_min |
float | occ_prob_thres_log |
float | prob_hit_log |
float | prob_miss_log |
Static Protected Attributes | |
static const std::string | binaryFileHeader = "# Octomap OcTree binary file" |
static const std::string | fileHeader = "# Octomap OcTree file" |
Interface class for all octree types that store occupancy.
This serves as a common base class e.g. for polymorphism and contains common code for reading and writing binary trees.
octomap::AbstractOccupancyOcTree::AbstractOccupancyOcTree | ( | ) |
References setClampingThresMax(), setClampingThresMin(), setOccupancyThres(), setProbHit(), and setProbMiss().
virtual octomap::AbstractOccupancyOcTree::~AbstractOccupancyOcTree | ( | ) | [inline, virtual] |
virtual void octomap::AbstractOcTree::clear | ( | ) | [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
Referenced by readBinary(), and readBinaryLegacyHeader().
virtual AbstractOcTree* octomap::AbstractOcTree::create | ( | ) | const [pure virtual, inherited] |
virtual constructor: creates a new object of same type
Implemented in octomap::OcTreeBase< NODE >.
Referenced by octomap::AbstractOcTree::createTree().
AbstractOcTree * octomap::AbstractOcTree::createTree | ( | const std::string | id, |
double | res | ||
) | [static, inherited] |
Creates a certain OcTree (factory pattern)
References octomap::AbstractOcTree::create(), OCTOMAP_ERROR, and octomap::AbstractOcTree::setResolution().
Referenced by octomap::AbstractOcTree::read().
virtual void octomap::AbstractOcTree::expand | ( | ) | [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
double octomap::AbstractOccupancyOcTree::getClampingThresMax | ( | ) | const [inline] |
References clamping_thres_max, and octomap::probability().
float octomap::AbstractOccupancyOcTree::getClampingThresMaxLog | ( | ) | const [inline] |
References clamping_thres_max.
double octomap::AbstractOccupancyOcTree::getClampingThresMin | ( | ) | const [inline] |
References clamping_thres_min, and octomap::probability().
float octomap::AbstractOccupancyOcTree::getClampingThresMinLog | ( | ) | const [inline] |
References clamping_thres_min.
virtual void octomap::AbstractOcTree::getMetricMax | ( | double & | x, |
double & | y, | ||
double & | z | ||
) | [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
virtual void octomap::AbstractOcTree::getMetricMax | ( | double & | x, |
double & | y, | ||
double & | z | ||
) | const [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
virtual void octomap::AbstractOcTree::getMetricMin | ( | double & | x, |
double & | y, | ||
double & | z | ||
) | [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
virtual void octomap::AbstractOcTree::getMetricMin | ( | double & | x, |
double & | y, | ||
double & | z | ||
) | const [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
virtual void octomap::AbstractOcTree::getMetricSize | ( | double & | x, |
double & | y, | ||
double & | z | ||
) | [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
double octomap::AbstractOccupancyOcTree::getOccupancyThres | ( | ) | const [inline] |
References occ_prob_thres_log, and octomap::probability().
float octomap::AbstractOccupancyOcTree::getOccupancyThresLog | ( | ) | const [inline] |
References occ_prob_thres_log.
double octomap::AbstractOccupancyOcTree::getProbHit | ( | ) | const [inline] |
References prob_hit_log, and octomap::probability().
float octomap::AbstractOccupancyOcTree::getProbHitLog | ( | ) | const [inline] |
References prob_hit_log.
double octomap::AbstractOccupancyOcTree::getProbMiss | ( | ) | const [inline] |
References prob_miss_log, and octomap::probability().
float octomap::AbstractOccupancyOcTree::getProbMissLog | ( | ) | const [inline] |
References prob_miss_log.
virtual double octomap::AbstractOcTree::getResolution | ( | ) | const [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
Referenced by main(), octomap::AbstractOcTree::write(), and writeBinaryConst().
virtual std::string octomap::AbstractOcTree::getTreeType | ( | ) | const [pure virtual, inherited] |
returns actual class name as string for identification
Implemented in octomap::OcTreeBase< NODE >, octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
Referenced by main(), octomap::AbstractOcTree::registerTreeType(), octomap::AbstractOcTree::write(), and writeBinaryConst().
bool octomap::AbstractOccupancyOcTree::isNodeAtThreshold | ( | const OcTreeNode * | occupancyNode | ) | const [inline] |
queries whether a node is at the clamping threshold according to the tree's parameter
References clamping_thres_max, clamping_thres_min, and octomap::OcTreeNode::getLogOdds().
bool octomap::AbstractOccupancyOcTree::isNodeAtThreshold | ( | const OcTreeNode & | occupancyNode | ) | const [inline] |
queries whether a node is at the clamping threshold according to the tree's parameter
References clamping_thres_max, clamping_thres_min, and octomap::OcTreeNode::getLogOdds().
bool octomap::AbstractOccupancyOcTree::isNodeOccupied | ( | const OcTreeNode * | occupancyNode | ) | const [inline] |
queries whether a node is occupied according to the tree's parameter for "occupancy"
References octomap::OcTreeNode::getLogOdds(), and occ_prob_thres_log.
bool octomap::AbstractOccupancyOcTree::isNodeOccupied | ( | const OcTreeNode & | occupancyNode | ) | const [inline] |
queries whether a node is occupied according to the tree's parameter for "occupancy"
References octomap::OcTreeNode::getLogOdds(), and occ_prob_thres_log.
virtual size_t octomap::AbstractOcTree::memoryUsage | ( | ) | const [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
virtual size_t octomap::AbstractOcTree::memoryUsageNode | ( | ) | const [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
virtual void octomap::AbstractOcTree::prune | ( | ) | [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
Referenced by writeBinary().
AbstractOcTree * octomap::AbstractOcTree::read | ( | std::istream & | s | ) | [static, inherited] |
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().
AbstractOcTree * octomap::AbstractOcTree::read | ( | const std::string & | filename | ) | [static, inherited] |
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:
AbstractOcTree* tree = AbstractOcTree::read("filename.ot"); OcTree* octree = dynamic_cast<OcTree*>(tree);
References OCTOMAP_ERROR_STR.
bool octomap::AbstractOccupancyOcTree::readBinary | ( | std::istream & | s | ) |
Reads an OcTree from an input stream.
Existing nodes of the tree are deleted before the tree is read.
References binaryFileHeader, octomap::AbstractOcTree::clear(), OCTOMAP_DEBUG_STR, OCTOMAP_ERROR, OCTOMAP_ERROR_STR, OCTOMAP_WARNING_STR, readBinaryData(), readBinaryLegacyHeader(), octomap::AbstractOcTree::readHeader(), octomap::AbstractOcTree::setResolution(), and octomap::AbstractOcTree::size().
Referenced by readBinary().
bool octomap::AbstractOccupancyOcTree::readBinary | ( | const std::string & | filename | ) |
Reads OcTree from a binary file.
Existing nodes of the tree are deleted before the tree is read.
References OCTOMAP_ERROR_STR, and readBinary().
virtual std::istream& octomap::AbstractOccupancyOcTree::readBinaryData | ( | std::istream & | s | ) | [pure virtual] |
Reads the actual data, implemented in OccupancyOcTreeBase::readBinaryData()
Implemented in octomap::OccupancyOcTreeBase< NODE >.
Referenced by readBinary().
bool octomap::AbstractOccupancyOcTree::readBinaryLegacyHeader | ( | std::istream & | s, |
unsigned int & | size, | ||
double & | res | ||
) | [protected] |
Try to read the old binary format for conversion, will be removed in the future.
References octomap::AbstractOcTree::clear(), OCTOMAP_ERROR, OCTOMAP_ERROR_STR, and OCTOMAP_WARNING_STR.
Referenced by readBinary().
virtual std::istream& octomap::AbstractOcTree::readData | ( | std::istream & | s | ) | [pure virtual, 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.
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
Referenced by octomap::AbstractOcTree::read().
bool octomap::AbstractOcTree::readHeader | ( | std::istream & | s, |
std::string & | id, | ||
unsigned & | size, | ||
double & | res | ||
) | [static, protected, inherited] |
References OCTOMAP_ERROR_STR, OCTOMAP_WARNING, OCTOMAP_WARNING_STR, and octomap::AbstractOcTree::size().
Referenced by octomap::AbstractOcTree::read(), and readBinary().
void octomap::AbstractOcTree::registerTreeType | ( | AbstractOcTree * | tree | ) | [static, protected, inherited] |
References octomap::AbstractOcTree::getTreeType().
Referenced by octomap::OcTreeStamped::StaticMemberInitializer::StaticMemberInitializer(), octomap::OcTree::StaticMemberInitializer::StaticMemberInitializer(), octomap::CountingOcTree::StaticMemberInitializer::StaticMemberInitializer(), and octomap::ColorOcTree::StaticMemberInitializer::StaticMemberInitializer().
void octomap::AbstractOccupancyOcTree::setClampingThresMax | ( | double | thresProb | ) | [inline] |
sets the maximum threshold for occupancy clamping (sensor model)
References clamping_thres_max, and octomap::logodds().
Referenced by AbstractOccupancyOcTree().
void octomap::AbstractOccupancyOcTree::setClampingThresMin | ( | double | thresProb | ) | [inline] |
sets the minimum threshold for occupancy clamping (sensor model)
References clamping_thres_min, and octomap::logodds().
Referenced by AbstractOccupancyOcTree().
void octomap::AbstractOccupancyOcTree::setOccupancyThres | ( | double | prob | ) | [inline] |
sets the threshold for occupancy (sensor model)
References octomap::logodds(), and occ_prob_thres_log.
Referenced by AbstractOccupancyOcTree().
void octomap::AbstractOccupancyOcTree::setProbHit | ( | double | prob | ) | [inline] |
sets the probablility for a "hit" (will be converted to logodds) - sensor model
References octomap::logodds(), and prob_hit_log.
Referenced by AbstractOccupancyOcTree().
void octomap::AbstractOccupancyOcTree::setProbMiss | ( | double | prob | ) | [inline] |
sets the probablility for a "miss" (will be converted to logodds) - sensor model
References octomap::logodds(), and prob_miss_log.
Referenced by AbstractOccupancyOcTree().
virtual void octomap::AbstractOcTree::setResolution | ( | double | res | ) | [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
Referenced by octomap::AbstractOcTree::createTree(), and readBinary().
virtual size_t octomap::AbstractOcTree::size | ( | ) | const [pure virtual, inherited] |
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
Referenced by main(), octomap::AbstractOcTree::read(), readBinary(), octomap::AbstractOcTree::readHeader(), octomap::AbstractOcTree::write(), and writeBinaryConst().
virtual void octomap::AbstractOccupancyOcTree::toMaxLikelihood | ( | ) | [pure virtual] |
Implemented in octomap::OccupancyOcTreeBase< NODE >.
Referenced by writeBinary().
virtual OcTreeNode* octomap::AbstractOccupancyOcTree::updateNode | ( | const OcTreeKey & | key, |
bool | occupied, | ||
bool | lazy_eval = false |
||
) | [pure virtual] |
Integrate occupancy measurement.
key | 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. |
Implemented in octomap::OccupancyOcTreeBase< NODE >.
virtual OcTreeNode* octomap::AbstractOccupancyOcTree::updateNode | ( | const OcTreeKey & | key, |
float | log_odds_update, | ||
bool | lazy_eval = false |
||
) | [pure virtual] |
Manipulate log_odds value of voxel directly.
key | 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. |
Implemented in octomap::OccupancyOcTreeBase< NODE >.
virtual OcTreeNode* octomap::AbstractOccupancyOcTree::updateNode | ( | const point3d & | value, |
bool | occupied, | ||
bool | lazy_eval = false |
||
) | [pure virtual] |
Integrate occupancy measurement.
Looks up the OcTreeKey corresponding to the coordinate and then calls udpateNode() with it.
value | 3d coordinate of the NODE that is to be updated |
occupied | true if the node was measured occupied, else false |
lazy_eval | whether update of inner nodes is omitted after the update (default: false). This speeds up the insertion, but you need to call updateInnerOccupancy() when done. |
Implemented in octomap::OccupancyOcTreeBase< NODE >.
virtual OcTreeNode* octomap::AbstractOccupancyOcTree::updateNode | ( | const point3d & | value, |
float | log_odds_update, | ||
bool | lazy_eval = false |
||
) | [pure virtual] |
Manipulate log_odds value of voxel directly.
Looks up the OcTreeKey corresponding to the coordinate and then calls udpateNode() with it.
value | 3d coordinate of the NODE that is to be updated |
log_odds_update | value to be added (+) to log_odds value of node |
lazy_eval | whether update of inner nodes is omitted after the update (default: false). This speeds up the insertion, but you need to call updateInnerOccupancy() when done. |
Implemented in octomap::OccupancyOcTreeBase< NODE >.
bool octomap::AbstractOcTree::write | ( | std::ostream & | s | ) | const [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().
bool octomap::AbstractOcTree::write | ( | const std::string & | filename | ) | const [inherited] |
Write file header and complete tree to file (serialization)
References OCTOMAP_ERROR_STR.
Referenced by main().
bool octomap::AbstractOccupancyOcTree::writeBinary | ( | std::ostream & | s | ) |
Writes compressed maximum likelihood OcTree to a binary stream.
The OcTree is first converted to the maximum likelihood estimate and pruned for maximum compression.
References octomap::AbstractOcTree::prune(), toMaxLikelihood(), and writeBinaryConst().
bool octomap::AbstractOccupancyOcTree::writeBinary | ( | const std::string & | filename | ) |
Writes OcTree to a binary file using writeBinary().
The OcTree is first converted to the maximum likelihood estimate and pruned.
References OCTOMAP_ERROR_STR.
Referenced by main().
bool octomap::AbstractOccupancyOcTree::writeBinaryConst | ( | std::ostream & | s | ) | const |
Writes the maximum likelihood OcTree to a binary stream (const variant).
Files will be smaller when the tree is pruned first or by using writeBinary() instead.
References binaryFileHeader, octomap::AbstractOcTree::getResolution(), octomap::AbstractOcTree::getTreeType(), OCTOMAP_DEBUG, OCTOMAP_WARNING_STR, octomap::AbstractOcTree::size(), and writeBinaryData().
bool octomap::AbstractOccupancyOcTree::writeBinaryConst | ( | const std::string & | filename | ) | const |
Writes OcTree to a binary file using writeBinaryConst().
The OcTree is not changed, in particular not pruned first. Files will be smaller when the tree is pruned first or by using writeBinary() instead.
References OCTOMAP_ERROR_STR.
Referenced by writeBinary().
virtual std::ostream& octomap::AbstractOccupancyOcTree::writeBinaryData | ( | std::ostream & | s | ) | const [pure virtual] |
Writes the actual data, implemented in OccupancyOcTreeBase::writeBinaryData()
Implemented in octomap::OccupancyOcTreeBase< NODE >.
Referenced by writeBinaryConst().
virtual std::ostream& octomap::AbstractOcTree::writeData | ( | std::ostream & | s | ) | const [pure virtual, inherited] |
Write complete state of tree to stream (without file header) unmodified.
Pruning the tree first produces smaller files (lossless compression)
Implemented in octomap::OcTreeBaseImpl< NODE, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNodeStamped, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< OcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< ColorOcTreeNode, AbstractOccupancyOcTree >, octomap::OcTreeBaseImpl< NODE, AbstractOcTree >, and octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >.
Referenced by octomap::AbstractOcTree::write().
const std::string octomap::AbstractOccupancyOcTree::binaryFileHeader = "# Octomap OcTree binary file" [static, protected] |
Referenced by readBinary(), and writeBinaryConst().
float octomap::AbstractOccupancyOcTree::clamping_thres_max [protected] |
float octomap::AbstractOccupancyOcTree::clamping_thres_min [protected] |
const std::string octomap::AbstractOcTree::fileHeader = "# Octomap OcTree file" [static, protected, inherited] |
Referenced by octomap::AbstractOcTree::read(), and octomap::AbstractOcTree::write().
float octomap::AbstractOccupancyOcTree::occ_prob_thres_log [protected] |
float octomap::AbstractOccupancyOcTree::prob_hit_log [protected] |
Referenced by getProbHit(), getProbHitLog(), octomap::OccupancyOcTreeBase< NODE >::OccupancyOcTreeBase(), and setProbHit().
float octomap::AbstractOccupancyOcTree::prob_miss_log [protected] |