Template Class NormalVectorsFilter

Inheritance Relationships

Base Type

  • public filters::FilterBase< T >

Class Documentation

template<typename T>
class NormalVectorsFilter : public filters::FilterBase<T>

Compute the normal vectors of a layer in a map.

Public Functions

NormalVectorsFilter()

Constructor

~NormalVectorsFilter() override

Destructor.

bool configure() override

Configures the filter from parameters on the Parameter Server. This comprehend in order: 1) algorithm, used for choosing between area and raster algorithm (default=area) 2)If algorithm is not raster estimationRadius_ is read an a basic check on its sign is made. If something is wrong it switches to raster algorithm. 3) parallelization_enabled, used for choosing between serial and parallel algorithm (default=false) 4) thread_count, used to set the number of threads to be used in parallelization is enabled (default=auto) The parallelization_enabled and algorithm parameters allow to choose between the 4 different methods { AreaSerial, AreaParallel, RasterSerial, RasterParallel } 4) normal_vector_positive_axis, used to define the upward positive direction for the normals 5) input_layer, defines in which layer of the grid map lie the information needed (usually elevation or elevation_filtered) 6) output_layers_prefix, defines the prefix for the new 3 layers (x,y,z) that will define the normal vectors Those parameters have to be written in a .yaml file that will be processed as a sequence of filters. An example can be seen in grid_map_demos/config/normal_filter_comparison.yaml.

bool update(const T &mapIn, T &mapOut) override

Compute the normal vectors of a layer in a map and saves it as additional grid map layer.

Parameters:
  • mapIn – grid map containing the layer for which the normal vectors are computed for.

  • mapOut – grid map containing mapIn and the new layers for the normal vectors.