Template Class DynamicEDTOctomapBase

Inheritance Relationships

Base Type

Class Documentation

template<class TREE>
class DynamicEDTOctomapBase : private DynamicEDT3D

A DynamicEDTOctomapBase object connects a DynamicEDT3D object to an octomap.

dynamicEDT3D: A library for incrementally updatable Euclidean distance transforms in 3D.

See also

http://octomap.sourceforge.net/ License: New BSD License

Author

C. Sprunk, B. Lau, W. Burgard, University of Freiburg, Copyright (C) 2011.

Public Functions

DynamicEDTOctomapBase(float maxdist, TREE *_octree, octomap::point3d bbxMin, octomap::point3d bbxMax, bool treatUnknownAsOccupied)

Create a DynamicEDTOctomapBase object that maintains a distance transform in the bounding box given by bbxMin, bbxMax and clamps distances at maxdist. treatUnknownAsOccupied configures the treatment of unknown cells in the distance computation.

The constructor copies occupancy data but does not yet compute the distance map. You need to call udpate to do this.

The distance map is maintained in a full three-dimensional array, i.e., there exists a float field in memory for every voxel inside the bounding box given by bbxMin and bbxMax. Consider this when computing distance maps for large octomaps, they will use much more memory than the octomap itself!

virtual ~DynamicEDTOctomapBase()
virtual void update(bool updateRealDist = true)

trigger updating of the distance map. This will query the octomap for the set of changes since the last update. If you set updateRealDist to false, computations will be faster (square root will be omitted), but you can only retrieve squared distances

void getDistanceAndClosestObstacle(const octomap::point3d &p, float &distance, octomap::point3d &closestObstacle) const

retrieves distance and closestObstacle (closestObstacle is to be discarded if distance is maximum distance, the method does not write closestObstacle in this case). Returns DynamicEDTOctomapBase::distanceValue_Error if point is outside the map.

float getDistance(const octomap::point3d &p) const

retrieves distance at point. Returns DynamicEDTOctomapBase::distanceValue_Error if point is outside the map.

float getDistance(const octomap::OcTreeKey &k) const

retrieves distance at key. Returns DynamicEDTOctomapBase::distanceValue_Error if key is outside the map.

int getSquaredDistanceInCells(const octomap::point3d &p) const

retrieves squared distance in cells at point. Returns DynamicEDTOctomapBase::distanceInCellsValue_Error if point is outside the map.

void getDistanceAndClosestObstacle_unsafe(const octomap::point3d &p, float &distance, octomap::point3d &closestObstacle) const
float getDistance_unsafe(const octomap::point3d &p) const
float getDistance_unsafe(const octomap::OcTreeKey &k) const
int getSquaredDistanceInCells_unsafe(const octomap::point3d &p) const
inline float getMaxDist() const

retrieve maximum distance value

inline int getSquaredMaxDistCells() const

retrieve squared maximum distance value in grid cells

bool checkConsistency() const

Brute force method used for debug purposes. Checks occupancy state consistency between octomap and internal representation.

Public Static Attributes

static float distanceValue_Error = -1.0

distance value returned when requesting distance for a cell outside the map

dynamicEDT3D: A library for incrementally updatable Euclidean distance transforms in 3D.

See also

http://octomap.sourceforge.net/ License: New BSD License

Author

C. Sprunk, B. Lau, W. Burgard, University of Freiburg, Copyright (C) 2011.

static int distanceInCellsValue_Error = -1

distance value returned when requesting distance in cell units for a cell outside the map