Template Class NDTSensorModel

Class Documentation

template<typename SparseGridT>
class NDTSensorModel

NDT sensor model for range finders.

This class satisfies Beluga named requirements: SensorModel.

Template Parameters:

SparseGridT – Type representing a sparse NDT grid, as a specialization of ‘beluga::SparseValueGrid’.

Public Types

using ndt_cell_type = typename SparseGridT::mapped_type

NDT Cell type.

using state_type = std::conditional_t<ndt_cell_type::num_dim == 2, Sophus::SE2<typename ndt_cell_type::scalar_type>, Sophus::SE3<typename ndt_cell_type::scalar_type>>

State type of a particle.

using weight_type = double

Weight type of the particle.

using measurement_type = std::vector<Eigen::Vector<typename ndt_cell_type::scalar_type, ndt_cell_type::num_dim>>

Measurement type of the sensor: a point cloud for the range finder.

using map_type = SparseGridT

Map representation type.

using param_type = NDTModelParam<ndt_cell_type::num_dim>

Parameter type that the constructor uses to configure the NDT sensor model.

Public Functions

inline NDTSensorModel(param_type params, SparseGridT cells_data)

Constructs a NDTSensorModel instance.

Parameters:
  • params – Parameters to configure this instance. See beluga::NDTModelParam for details.

  • cells_data – Sparse grid representing an NDT map, used for calculating importance weights for the different particles.

inline auto operator()(measurement_type &&points) const

Returns a state weighting function conditioned on 2D / 3D lidar hits.

Parameters:

points – Lidar hit points in the reference frame of particle states.

Returns:

a state weighting function satisfying Beluga named requirements: StateWeightingFunction and borrowing a reference to this sensor model (and thus their lifetime are bound).

inline double likelihood_at(const ndt_cell_type &measurement) const

Returns the L2 likelihood scaled by ‘d1’ and ‘d2’ set in the parameters for this instance for ‘measurement’, for the neighbors kernel cells around the measurement cell, or ‘params_.min_likelihood’, whichever is higher.