Program Listing for File GridMapOctomapConverter.hpp

Return to documentation for file (include/grid_map_octomap/GridMapOctomapConverter.hpp)

/*
 * GridMapOctomapConverter.hpp
 *
 *  Created on: May 1, 2017
 *      Author: Jeff Delmerico, Peter Fankhauser
 *   Institute: University of Zürich, Robotics and Perception Group
 */

#ifndef GRID_MAP_OCTOMAP__GRIDMAPOCTOMAPCONVERTER_HPP_
#define GRID_MAP_OCTOMAP__GRIDMAPOCTOMAPCONVERTER_HPP_

#include <grid_map_core/grid_map_core.hpp>

// Octomap
#include <octomap/octomap.h>

// STD
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>

namespace grid_map
{

class GridMapOctomapConverter
{
public:
  GridMapOctomapConverter();

  virtual ~GridMapOctomapConverter();

  static bool fromOctomap(
    const octomap::OcTree & octomap,
    const std::string & layer,
    grid_map::GridMap & gridMap,
    const grid_map::Position3 * minPoint = nullptr,
    const grid_map::Position3 * maxPoint = nullptr);
};

}  // namespace grid_map
#endif  // GRID_MAP_OCTOMAP__GRIDMAPOCTOMAPCONVERTER_HPP_