map_server_node.h
Go to the documentation of this file.
1 /***********************************************************************************
2  * Revised BSD License *
3  * Copyright (c) 2014, Markus Bader <markus.bader@tuwien.ac.at> *
4  * All rights reserved. *
5  * *
6  * Redistribution and use in source and binary forms, with or without *
7  * modification, are permitted provided that the following conditions are met: *
8  * * Redistributions of source code must retain the above copyright *
9  * notice, this list of conditions and the following disclaimer. *
10  * * Redistributions in binary form must reproduce the above copyright *
11  * notice, this list of conditions and the following disclaimer in the *
12  * documentation and/or other materials provided with the distribution. *
13  * * Neither the name of the Vienna University of Technology nor the *
14  * names of its contributors may be used to endorse or promote products *
15  * derived from this software without specific prior written permission. *
16  * *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  *AND *
19  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20  **
21  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
22  * DISCLAIMED. IN NO EVENT SHALL Markus Bader BE LIABLE FOR ANY *
23  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
24  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25  **
26  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
27  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
28  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29  **
30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  ** *
32  ***********************************************************************************/
33 
34 #ifndef MRPT_MAP_SERVER_NODE_H
35 #define MRPT_MAP_SERVER_NODE_H
36 
37 #include "ros/ros.h"
38 #include "nav_msgs/MapMetaData.h"
39 #include "nav_msgs/GetMap.h"
40 #include "boost/smart_ptr.hpp"
41 
42 #include <mrpt/version.h>
43 #if MRPT_VERSION >= 0x199
44 #include <mrpt/config/CConfigFile.h>
45 using namespace mrpt::config;
46 #else
47 #include <mrpt/utils/CConfigFile.h>
48 using namespace mrpt::utils;
49 #endif
50 
51 #include <mrpt/maps/CMultiMetricMap.h>
53 
54 class MapServer
55 {
56  public:
58  ~MapServer();
59  void init();
60  void loop();
61 
62  private:
64  ros::NodeHandle n_param_{"~"};
65  double frequency_{0};
66  unsigned long loop_count_{0};
67  bool debug_{true};
71  nav_msgs::GetMap::Response resp_ros_;
73  void publishMap();
74  bool mapCallback(
75  nav_msgs::GetMap::Request& req, nav_msgs::GetMap::Response& res);
76 };
77 
78 #endif // MRPT_MAP_SERVER_NODE_H
nav_msgs::GetMap::Response resp_ros_
ros::NodeHandle n_
GLsizei n
GLuint res
boost::shared_ptr< CMultiMetricMap > metric_map_
ros::ServiceServer service_map_
ros::Publisher pub_map_ros_
ros::Publisher pub_metadata_


mrpt_map
Author(s):
autogenerated on Thu Mar 12 2020 03:21:56