Template Class Costmap2DTranslationTable

Inheritance Relationships

Derived Types

Class Documentation

template<int64_t noInformation, int64_t lethalObstacle, int64_t inscribedInflatedObstacle, int64_t freeSpace>
class Costmap2DTranslationTable

Defines the conversion between grid_map and costmap_2d. -> There is only one distinct value for no information in the grid map. -> All values smaller or equal to freeSpace are considered free space (except noInformation). -> All values bigger or equal to lethalObstacle are considered a lethal obstacle (except noInformation). -> All values between inscribedInflatedObstacle and lethalObstacle are considered an inscribed inflated obstacle (except noInformation). -> All other values are interpolated between freeSpace and inscribedInflatedObstacle

Template Parameters:
  • noInformation – Gridmap value that represents no information.

  • lethalObstacle – Gridmap value (lower bound) for lethal obstacles.

  • inscribedInflatedObstacle – Gridmap value (lower bound) for inscribed inflated obstacles.

  • freeSpace – Gridmap value (upper bound) for free space.

Subclassed by grid_map::Costmap2DDefaultTranslationTable< DataType >, grid_map::Costmap2DDefaultTranslationTable< float >

Public Functions

Costmap2DTranslationTable() = delete

Public Static Functions

template<typename DataType>
static inline void create(std::vector<DataType> &costTranslationTable)

Creates a translation table from costmap to grid map. (for backwards compatibility)

Template Parameters:

DataType – Data type of the grid map.

Parameters:

costTranslationTable – Translation table mapping from costmap value to grid map value.

template<typename DataType>
static inline DataType fromCostmap(const uint8_t costmapValue)

Convert a costmap value to a grid map value.

Template Parameters:

DataType – Data type of the grid map.

Parameters:

costmapValue – Cost map value.

Returns:

Equivalent grid map value.

template<typename DataType>
static inline uint8_t toCostmap(const DataType gridmapValue)

Convert a grid map value to a costmap value.

Template Parameters:

DataType – Data type of the grid map.

Parameters:

gridmapValue – Grid map value.

Returns:

Equivalent cost map value.