File map2d_interface.hpp

Common part of mapping subsystems.

Functions

bool pointWithinMap(const Map2DInterface &map, const DynamicVector &pt)

Calculate if a point is within the map bounds.

Parameters
  • map – Map to use.

  • pt – Point in the world coordinate frame.

Returns

True if point is within the map, false otherwise.

CellCoordinates mapPointToCell(const Map2DInterface &map, const DynamicVector &pt)

Calculate the cell index for a point in the world coordinate frame.

Parameters
  • map – Map to use.

  • pt – Point in the world coordinate frame.

Returns

Cell coordinates.

Vector<double, 3> mapCellToPoint(const Map2DInterface &map, const CellCoordinates &cell)

Calculate the point (on the map plane) for a given cell index. Mid-point of a cell.

Parameters
  • map – Map to use.

  • cell – Cell coordinates.

Returns

Point on the map plane in world coordinate frame.

namespace slamcore

Main namespace for the Slamcore public API

Helper conversion methods

slamcore::ImageFormat \(\leftrightarrow\) BytesPerChannel

Get information about the client library

Functions

bool pointWithinMap(const Map2DInterface &map, const DynamicVector &pt)

Calculate if a point is within the map bounds.

Parameters
  • map – Map to use.

  • pt – Point in the world coordinate frame.

Returns

True if point is within the map, false otherwise.

CellCoordinates mapPointToCell(const Map2DInterface &map, const DynamicVector &pt)

Calculate the cell index for a point in the world coordinate frame.

Parameters
  • map – Map to use.

  • pt – Point in the world coordinate frame.

Returns

Cell coordinates.

Vector<double, 3> mapCellToPoint(const Map2DInterface &map, const CellCoordinates &cell)

Calculate the point (on the map plane) for a given cell index. Mid-point of a cell.

Parameters
  • map – Map to use.

  • cell – Cell coordinates.

Returns

Point on the map plane in world coordinate frame.

struct CellCoordinates
#include <map2d_interface.hpp>

Public Members

int x
int y
class Map2DAccessInterface
#include <map2d_interface.hpp>

Fetch interface to access 2D map updates

Subclassed by HeightMappingSubsystemInterface

Public Functions

virtual ~Map2DAccessInterface() = default
template<typename _Rep = int64_t, typename _Period = std::ratio<1>>
inline bool fetch(const std::chrono::duration<_Rep, _Period> &timeout = std::chrono::seconds(0))

Update the internal state with the most recent data.

virtual std::shared_ptr<const Map2DInterface> get() const = 0

Get the map data.

Protected Functions

virtual bool fetchImpl(const std::chrono::milliseconds timeout_ms) = 0