map
Grid map data class. Represents the grid map of the environment containing the defined layers.
- 
namespace slope_constrained_planner
 - 
class Map
 - #include <map.h>
Grid map data class. Represents the grid map of the environment containing the defined layers.
Public Functions
- 
Map(const ParamsConstPtr ¶ms)
 Constructs an empty map, without underlying grid map.
- Parameters:
 params – Contains grid map layers info
- 
void setMap(GridMapPtr &&map)
 Sets the underlying grid map by taking ownership of it.
- Parameters:
 map – Grid map to be set
- 
void copy(const Map &map)
 Copies the underlying map and parameters of another map object.
- Parameters:
 map – Grid map to be copied
- 
const std::vector<std::string> getLayers()
 Returns the layers available in the grid map.
- 
inline bool isInside(const grid_map::Position &pos) const
 Checks whether position is inside of map bounds.
- Parameters:
 pos – Position of the state to br checked
- Returns:
 Whether the state is inside the map or not
- 
inline grid_map::Position getPositionOfIndex(const grid_map::Index &ind) const
 Gets the position of state with a particular index in the grid map.
- Parameters:
 ind – Index of the state in the grid map
- Returns:
 pos Position of the state
- 
inline float getHeightAtIndex(const grid_map::Index &ind) const
 Gets the height value at a certain map index.
- Parameters:
 ind – Index of the state in the grid map
- Returns:
 Height of state
- 
inline float getHeightAtPosition(const grid_map::Position &pos) const
 Gets the height value at a certain map position. Might throw exceptions if position is outside map boundaries.
- Parameters:
 pos – Position of the state
- Returns:
 Height of state position
- 
inline bool getUpdatedAtPosition(const grid_map::Position &pos) const
 Return whether this cell was updated in the last map update. Might throw exceptions if position is outside map boundaries.
- Parameters:
 pos – Position of the state
- 
bool getUpdatedOnLine(const grid_map::Position &start, const grid_map::Position &end)
 Updates the grid map data from and starting to the ending position.
- Parameters:
 start – Starting position
end – Ending position
- Returns:
 Whether the grid map data is updated
- 
inline Eigen::Vector3d getNormal(const grid_map::Index &ind) const
 Gets the terrain normal at a certain map index.
- Parameters:
 ind – Index of state in the grid map
- Returns:
 Normal Vector at the index
- 
inline grid_map::Index getIndexOfPosition(const grid_map::Position &pos) const
 Gets the map index of a certain position. Might throw exception if position is out of bounds.
- Parameters:
 pos – Position of the state
- Returns:
 ind Index of position
- 
inline float getPlaneFitStdDev(const grid_map::Index &ind) const
 Gets the standard deviation of a plane fit error at the given map index.
- Parameters:
 ind – Index of the state at the grid map
- Returns:
 Standard deviation of plane
- 
inline const grid_map::Matrix &getLayer(const std::string &layer) const
 Gets the required layer from the grid map.
- Parameters:
 layer – Required layer name
- Returns:
 Layer data
- 
inline void addLayer(const std::string &layer_name, const grid_map::Matrix &data)
 Adds a layer to the grid map.
- Parameters:
 layer_name – Name of the layer to be added
data – Layer data
- 
inline void addLayer(const std::string &layer_name, const double val)
 Adds a layer to the grid map.
- Parameters:
 layer_name – Name of the layer to be added
val – Layer value
- 
inline Eigen::Index lengthToCellCount(const double &length) const
 Gets the length to cell resolution ratio of the grid map.
- Parameters:
 length – Length to be checked
- Returns:
 Length to cell
- 
inline const grid_map::GridMap &getMap() const
 Gets the map from the corresponding class attribute.
- Returns:
 Grid map data
- 
void reApplyPreprocessing()
 Performs the pre-processing on the map again.
Private Members
- 
GridMapPtr map_ = {new grid_map::GridMap()}
 Grid map object attribute.
- 
ParamsConstPtr params_
 Params containing the grid map layers info.
- 
mutable std::mutex mutex_
 Grid map process mutex.
- 
ChainOldMap old_map_post_processor_
 Old map post-processor attribute to be used in setting map.
 - 
Map(const ParamsConstPtr ¶ms)
 
- 
class Map