map_server.h
Go to the documentation of this file.
1 /******************************************************************************
2  STDR Simulator - Simple Two DImensional Robot Simulator
3  Copyright (C) 2013 STDR Simulator
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 3 of the License, or
7  (at your option) any later version.
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software Foundation,
14  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 
16  Authors :
17  * Manos Tsardoulias, etsardou@gmail.com
18  * Aris Thallas, aris.thallas@gmail.com
19  * Chris Zalidis, zalidis@gmail.com
20 ******************************************************************************/
21 
22 #include "ros/ros.h"
23 #include "tf/tf.h"
25 #include "nav_msgs/MapMetaData.h"
26 #include "nav_msgs/OccupancyGrid.h"
27 #include "stdr_server/map_loader.h"
28 
33 namespace stdr_server {
34 
39  class MapServer
40  {
41  public:
42 
48  explicit MapServer(const std::string& fname);
49 
55  explicit MapServer(const nav_msgs::OccupancyGrid& map);
56 
57  private:
58 
63  void publishData();
64 
70  void publishTransform(const ros::TimerEvent& ev);
71 
72  private:
73 
85  nav_msgs::MapMetaData meta_data_message_;
87  nav_msgs::OccupancyGrid map_;
88 
89  };
90 } // namespace stdr_server
Implements the STDR map server functionalities.
Definition: map_server.h:39
ros::Timer tfTimer
ROS tf broadcaster.
Definition: map_server.h:81
ros::NodeHandle n
< The ROS node handle
Definition: map_server.h:75
MapServer(const std::string &fname)
Constructor by filename.
Definition: map_server.cpp:31
The main namespace for STDR Server.
void publishTransform(const ros::TimerEvent &ev)
Publishes the map to map_static transform.
Definition: map_server.cpp:80
nav_msgs::MapMetaData meta_data_message_
ROS occupancy grid message.
Definition: map_server.h:85
void publishData()
Publishes the map data and metadata.
Definition: map_server.cpp:60
tf::TransformBroadcaster tfBroadcaster
ROS map metadata message.
Definition: map_server.h:83
nav_msgs::OccupancyGrid map_
Definition: map_server.h:87
ros::Publisher map_pub
ROS publisher for posting the map metadata.
Definition: map_server.h:77
ros::Publisher metadata_pub
ROS timer for tf posting.
Definition: map_server.h:79


stdr_server
Author(s): Chris Zalidis
autogenerated on Mon Jun 10 2019 15:15:07