Template Class MultivariateUniformDistribution< Sophus::SE2d, OccupancyGrid >

Class Documentation

template<class OccupancyGrid>
class MultivariateUniformDistribution<Sophus::SE2d, OccupancyGrid>

Specialization of multivariate uniform distribution for occupancy grids.

The range of the distribution is limited to the free space available in the occupancy grid. The rotation is sampled uniformly and the translation will match the exact grid coordinates of one of the free cells.

Public Functions

inline explicit constexpr MultivariateUniformDistribution(const OccupancyGrid &grid)

Constructs a multivariate uniform distribution based on the provided occupancy grid.

Template Parameters:

OccupancyGrid – A type of the occupancy grid.

Parameters:

grid – The occupancy grid from which free states will be computed.

template<class URNG>
inline Sophus::SE2d operator()(URNG &engine)

Generates a random 2D pose.

This function generates a random pose by sampling a random rotation from SO2 space and a random translation from the precomputed free states based on the provided occupancy grid.

Template Parameters:

URNG – The type of the random number generator.

Parameters:

engine – The random number generator engine.

Returns:

A random Sophus::SE2d pose.