Class EsdfMap

Nested Relationships

Class Documentation

class EsdfMap

Map holding a Euclidean Signed Distance Field Layer.

Contains functions for interacting with the layer and getting gradient and distance information.

Public Types

typedef std::shared_ptr<EsdfMap> Ptr
using EigenDStride = Eigen::Stride<Eigen::Dynamic, Eigen::Dynamic>
using EigenDRef = Eigen::Ref<MatrixType, 0, EigenDStride>

Public Functions

EsdfMap(const Config &config)
EsdfMap(const Layer<EsdfVoxel> &layer)

Creates a new EsdfMap based on a COPY of this layer.

EsdfMap(Layer<EsdfVoxel>::Ptr layer)

Creates a new EsdfMap that contains this layer.

virtual ~EsdfMap()
Layer<EsdfVoxel> *getEsdfLayerPtr()
const Layer<EsdfVoxel> &getEsdfLayer() const
FloatingPoint block_size() const
FloatingPoint voxel_size() const
bool getDistanceAtPosition(const Eigen::Vector3d &position, double *distance) const

Specific accessor functions for esdf maps.

Returns true if the point exists in the map AND is observed. These accessors use Vector3d and doubles explicitly rather than FloatingPoint to have a standard, cast-free interface to planning functions.

bool getDistanceAtPosition(const Eigen::Vector3d &position, bool interpolate, double *distance) const
bool getDistanceAndGradientAtPosition(const Eigen::Vector3d &position, double *distance, Eigen::Vector3d *gradient) const
bool getDistanceAndGradientAtPosition(const Eigen::Vector3d &position, bool interpolate, double *distance, Eigen::Vector3d *gradient) const
bool isObserved(const Eigen::Vector3d &position) const
void batchGetDistanceAtPosition(EigenDRef<const Eigen::Matrix<double, 3, Eigen::Dynamic>> &positions, Eigen::Ref<Eigen::VectorXd> distances, Eigen::Ref<Eigen::VectorXi> observed) const
void batchGetDistanceAndGradientAtPosition(EigenDRef<const Eigen::Matrix<double, 3, Eigen::Dynamic>> &positions, Eigen::Ref<Eigen::VectorXd> distances, EigenDRef<Eigen::Matrix<double, 3, Eigen::Dynamic>> &gradients, Eigen::Ref<Eigen::VectorXi> observed) const
void batchIsObserved(EigenDRef<const Eigen::Matrix<double, 3, Eigen::Dynamic>> &positions, Eigen::Ref<Eigen::VectorXi> observed) const
unsigned int coordPlaneSliceGetCount(unsigned int free_plane_index, double free_plane_val) const
unsigned int coordPlaneSliceGetDistance(unsigned int free_plane_index, double free_plane_val, EigenDRef<Eigen::Matrix<double, 3, Eigen::Dynamic>> &positions, Eigen::Ref<Eigen::VectorXd> distances, unsigned int max_points) const

Extract all voxels on a slice plane that is parallel to one of the axis-aligned planes.

free_plane_index specifies the free coordinate (zero-based; x, y, z order) free_plane_val specifies the plane intercept coordinate along that axis

Protected Attributes

FloatingPoint block_size_
Layer<EsdfVoxel>::Ptr esdf_layer_
Interpolator<EsdfVoxel> interpolator_
struct Config

Public Members

FloatingPoint esdf_voxel_size = 0.2
size_t esdf_voxels_per_side = 16u