Class slamcore::Map2DInterface

class slamcore::Map2DInterface : public ObjectInterface, public virtual MeasurementPointInterface<camera_clock>

Interface to a 2D map.

Public Types

using Ptr = std::shared_ptr<Map2DInterface>
using CPtr = std::shared_ptr<const Map2DInterface>
using MeasurementPointT = MeasurementPointInterface<camera_clock>

Public Functions

inline virtual ObjectType type() const

Type of the object.

virtual ~Map2DInterface() = default
virtual bool hasChannel(MapChannelType channel) const = 0

Return whether this map has a channel of the given type.

virtual bool hasChannel(MapChannelType channel, size_t group) const = 0

Return whether this map has a channel of the given type, of the given group.

virtual const MapChannel2DInterface &getChannel(MapChannelType channel) const = 0

Return the channel of the given type, of the group with the highest index.

Note

Throws std::out_of_range if the channel does not exist.

virtual const MapChannel2DInterface &getChannel(MapChannelType channel, size_t group) const = 0

Return the channel of the given type, of the given group.

Note

Throws std::out_of_range if the channel does not exist.

virtual size_t numGroups() const = 0

Returns the number of groups in the map.

virtual size_t numChannels() const = 0

Returns the number of channels in the map

virtual size_t numChannels(size_t group) const = 0

Returns the number of channels in the given group.

virtual ScalarT getCellSize() const = 0

Map cell size in metres.

virtual std::size_t getWidth() const = 0

Number of cells in the horizontal dimension.

virtual std::size_t getHeight() const = 0

Number of cells in the vertical dimension.

virtual const VectorInterface &getBoundsMin() const = 0

Min 2D coordinates of the map bounds, in metres.

The map bounds in metres define the rectangular area of 2D space covered by the [0,0]x[w,h] rectangle of integer cell coordinates.

The max 2D coordinates of the map bounds in metres are unambiguously determined as: max_x = min_x + resolution * width max_y = min_y + resolution * height

virtual IDT getMapId() const = 0

Map identifier for sub-mapped or tiled implementations.