VisualizationBase.hpp
Go to the documentation of this file.
00001 /*
00002  * VisualizationBase.hpp
00003  *
00004  *  Created on: Mar 20, 2015
00005  *      Author: Péter Fankhauser
00006  *   Institute: ETH Zurich, ANYbotics
00007  */
00008 
00009 #pragma once
00010 
00011 #include <grid_map_core/GridMap.hpp>
00012 
00013 // ROS
00014 #include <ros/ros.h>
00015 
00016 namespace grid_map_visualization {
00017 
00018 typedef std::map<std::string, XmlRpc::XmlRpcValue> StringMap;
00019 
00020 class VisualizationBase
00021 {
00022  public:
00023 
00029   VisualizationBase(ros::NodeHandle& nodeHandle, const std::string& name);
00030 
00034   virtual ~VisualizationBase();
00035 
00041   virtual bool readParameters(XmlRpc::XmlRpcValue& config);
00042 
00046   virtual bool initialize() = 0;
00047 
00053   virtual bool visualize(const grid_map::GridMap& map) = 0;
00054 
00059   bool isActive() const;
00060 
00061  protected:
00062 
00069   bool getParam(const std::string& name, std::string& value);
00070 
00077   bool getParam(const std::string& name, double& value);
00078 
00085   bool getParam(const std::string& name, float& value);
00086 
00093   bool getParam(const std::string&name, int& value);
00094 
00101   bool getParam(const std::string& name, bool& value);
00102 
00104   ros::NodeHandle& nodeHandle_;
00105 
00107   std::string name_;
00108 
00110   StringMap parameters_;
00111 
00113   ros::Publisher publisher_;
00114 };
00115 
00116 } /* namespace */


grid_map_visualization
Author(s): Péter Fankhauser
autogenerated on Tue Jul 9 2019 05:06:50