Class GridMapGeo

Class Documentation

class GridMapGeo

Public Functions

GridMapGeo(const std::string &frame_id = "map")
virtual ~GridMapGeo()
inline grid_map::GridMap &getGridMap()

Get the Grid Map object.

Returns:

grid_map::GridMap&

inline void setGridMap(grid_map::GridMap &map)

Set the Grid Map object from an external process.

Parameters:

map

void setGlobalOrigin(ESPG src_coord, const Eigen::Vector3d origin)

Set the Global Coordinate of the Origin of the map.

Parameters:
  • src_coord

  • origin

inline void getGlobalOrigin(ESPG &src_coord, Eigen::Vector3d &origin)

Get the Global Origin object.

Parameters:
  • src_coord

  • origin

inline std::string getCoordinateName()

Get the name of the coordinate frame of the dataset.

Returns:

std::string

inline bool Load(const std::string &map_path)

Overloading terrain loading with only elevation.

Parameters:

map_path – Path to dsm path (Supported formats are *.tif)

bool Load(const std::string &map_path, const std::string &color_map_path)

Helper function for loading terrain from path.

Parameters:
  • map_path – Path to dsm path (Supported formats are *.tif)

  • color_map_path – Path to color raster files to visualize terrain texture (Supported formats are *.tif)

Returns:

true Successfully loaded terrain

Returns:

false Failed to load terrain

bool initializeFromGeotiff(const std::string &path)

Initialize grid map from a geotiff file.

Parameters:

path – Path to dsm path (Supported formats are *.tif)

Returns:

true Successfully loaded terrain

Returns:

false Failed to load terrain

bool addColorFromGeotiff(const std::string &path)

Load a color layer from a geotiff file (orthomosaic)

Parameters:

path – Path to orthomosaic path (Supported formats are *.tif)

Returns:

true Successfully loaded terrain

Returns:

false Failed to load terrain

bool addLayerFromGeotiff(const std::string &layer_name, const std::string &path)

Load ROI layer from geotiff.

Parameters:

path

Returns:

true

Returns:

false

bool AddLayerDistanceTransform(const double surface_distance, const std::string &layer_name, std::string reference_layer = "elevation")

Add layer using distance transform.

Parameters:
  • surface_distance – surface distance to compute. If smaller than zero, will compute the distance transform beneath the reference layer

  • layer_name

Returns:

true

Returns:

false

bool AddLayerHorizontalDistanceTransform(const double surface_distance, const std::string &layer_name, std::string reference_layer = "elevation")

Add layer using distance transform.

Parameters:
  • surface_distance – surface distance to compute. If smaller than zero, will compute the distance transform beneath the reference layer

  • layer_name

Returns:

true

Returns:

false

bool AddLayerOffset(const double offset_distance, const std::string &layer_name)

Add layer with an offset.

Parameters:
  • offset_distance

  • layer_name

Returns:

true

Returns:

false

void AddLayerNormals(std::string reference_layer)

Compute normal vectors of the surface.

Parameters:
  • layer_name

  • reference_layer

Protected Attributes

grid_map::GridMap grid_map_
Location maporigin_
std::string frame_id_ = {""}
std::string coordinate_name_ = {""}