00001 /* 00002 * OctomapToGridmapDemo.hpp 00003 * 00004 * Created on: May 03, 2017 00005 * Author: Jeff Delmerico 00006 * Institute: University of Zürich, Robotics and Perception Group 00007 */ 00008 00009 #pragma once 00010 00011 // ROS 00012 #include <ros/ros.h> 00013 00014 #include <grid_map_ros/grid_map_ros.hpp> 00015 00016 #include <string> 00017 00018 namespace grid_map_demos { 00019 00024 class OctomapToGridmapDemo 00025 { 00026 public: 00027 00032 OctomapToGridmapDemo(ros::NodeHandle& nodeHandle); 00033 00037 virtual ~OctomapToGridmapDemo(); 00038 00043 bool readParameters(); 00044 00045 void convertAndPublishMap(); 00046 00047 private: 00048 00050 ros::NodeHandle& nodeHandle_; 00051 00053 ros::Publisher gridMapPublisher_; 00054 00056 ros::Publisher octomapPublisher_; 00057 00059 grid_map::GridMap map_; 00060 00062 std::string octomapServiceTopic_; 00063 00065 ros::ServiceClient client_; 00066 00068 float minX_; 00069 float maxX_; 00070 float minY_; 00071 float maxY_; 00072 float minZ_; 00073 float maxZ_; 00074 }; 00075 00076 } /* namespace */