Autoware.Auto
autoware::perception::filters::voxel_grid::Config Class Reference

A configuration class for the VoxelGrid data structure, also includes some helper functionality for computing indices and centroids of voxels. More...

#include <config.hpp>

Collaboration diagram for autoware::perception::filters::voxel_grid::Config:

Public Member Functions

 Config (const PointXYZ &min_point, const PointXYZ &max_point, const PointXYZ &voxel_size, const uint64_t capacity)
 Constructor. More...
 
const PointXYZget_min_point () const
 Gets the minimum corner of the voxel grid. More...
 
const PointXYZget_max_point () const
 Gets the maximum corner of the voxel grid. More...
 
const PointXYZget_voxel_size () const
 Gets the voxel size of the voxel grid. More...
 
uint64_t get_capacity () const
 Gets the capacity of the voxel grid. More...
 
template<typename PointT >
uint64_t index (const PointT &pt) const
 Computes index for a given point given the voxelgrid configuration parameters. More...
 
template<typename PointT >
PointT centroid (const uint64_t index) const
 Computes the centroid for a given voxel index. More...
 

Static Public Attributes

static constexpr float32_t MIN_VOXEL_SIZE_M = 0.01F
 

Detailed Description

A configuration class for the VoxelGrid data structure, also includes some helper functionality for computing indices and centroids of voxels.

Constructor & Destructor Documentation

◆ Config()

autoware::perception::filters::voxel_grid::Config::Config ( const PointXYZ min_point,
const PointXYZ max_point,
const PointXYZ voxel_size,
const uint64_t  capacity 
)

Constructor.

Parameters
[in]min_pointThe minimum corner of the receptive field (box) for the voxel grid
[in]max_pointThe maximum corner of the receptive field (box) for the voxel grid
[in]voxel_sizeThe size of each voxel
[in]capacityThe preallocated size of the voxel grid

Member Function Documentation

◆ centroid()

template<typename PointT >
PointT autoware::perception::filters::voxel_grid::Config::centroid ( const uint64_t  index) const
inline

Computes the centroid for a given voxel index.

Parameters
[in]indexThe index for a given voxel
Returns
A point for whom the x, y and z fields are filled out
Template Parameters
PointTThe point type returned. Assumed to have public float32_t members x, y, and z. Also assumed to have a default constructor. Only the x, y, and z fields will be filled out.

◆ get_capacity()

uint64_t autoware::perception::filters::voxel_grid::Config::get_capacity ( ) const

Gets the capacity of the voxel grid.

Returns
Fixed value

◆ get_max_point()

const PointXYZ & autoware::perception::filters::voxel_grid::Config::get_max_point ( ) const

Gets the maximum corner of the voxel grid.

Returns
Fixed value

◆ get_min_point()

const PointXYZ & autoware::perception::filters::voxel_grid::Config::get_min_point ( ) const

Gets the minimum corner of the voxel grid.

Returns
Fixed value

◆ get_voxel_size()

const PointXYZ & autoware::perception::filters::voxel_grid::Config::get_voxel_size ( ) const

Gets the voxel size of the voxel grid.

Returns
Fixed value

◆ index()

template<typename PointT >
uint64_t autoware::perception::filters::voxel_grid::Config::index ( const PointT &  pt) const
inline

Computes index for a given point given the voxelgrid configuration parameters.

Parameters
[in]ptThe point for which the voxel index will be computed
Returns
The index of the voxel for which this point will fall into
Template Parameters
PointTThe point type taken. Assumed to have public float32_t members x, y, and z. Also assumed to have a default constructor.

Member Data Documentation

◆ MIN_VOXEL_SIZE_M

constexpr float32_t autoware::perception::filters::voxel_grid::Config::MIN_VOXEL_SIZE_M = 0.01F
staticconstexpr

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