CMapMerger.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2016, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
15 
16 #include <ros/ros.h>
17 #include <nav_msgs/OccupancyGrid.h>
18 #include <nav_msgs/Path.h>
19 #include <mrpt_msgs/GraphSlamAgents.h>
20 #include <mrpt/maps/COccupancyGridMap2D.h>
21 #include <mrpt/maps/CSimplePointsMap.h>
23 #include <mrpt_bridge/map.h>
24 #include <mrpt/system/filesystem.h>
25 #include <mrpt/system/os.h>
26 #include <mrpt/math/utils.h>
28 #include <mrpt/opengl/CAxis.h>
31 
32 #include <mrpt/version.h>
33 #if MRPT_VERSION>=0x199
34 #include <mrpt/system/COutputLogger.h>
35 #include <mrpt/img/TColorManager.h>
36 using namespace mrpt::system;
37 using namespace mrpt::img;
38 #else
41 using namespace mrpt::utils;
42 #endif
43 
44 
45 
46 #include <iterator>
47 
49 
50 namespace mrpt { namespace graphslam {
51 
59 {
60 public:
61  typedef std::map<TNeighborAgentMapProps*, COccupancyGridMap2D::Ptr> maps_t;
62  typedef std::map<TNeighborAgentMapProps*, bool> neighbor_to_is_used_t;
63  typedef std::map<TNeighborAgentMapProps*, mrpt::poses::CPose2D> neighbor_to_rel_pose_t;
64 
66  typedef std::map<
68  mrpt::opengl::CSetOfLines::Ptr> trajectories_t;
69  typedef std::vector<TNeighborAgentMapProps*> neighbors_t;
70  CMapMerger(
71  mrpt::utils::COutputLogger* logger_in,
72  ros::NodeHandle* nh_in);
73  ~CMapMerger();
74  void mergeMaps();
79  bool updateState();
80 private:
84  void monitorKeystrokes(mrpt::graphslam::CWindowObserver* win_observer);
85  void initWindowVisuals(mrpt::graphslam::CWindowManager* win_manager);
86  mrpt::graphslam::CWindowManager* initWindowVisuals();
87 
91  neighbors_t m_neighbors;
92  std::map<TNeighborAgentMapProps*, CWindowManager*> m_neighbors_to_windows;
93  mrpt::utils::COutputLogger* m_logger;
96 
99  std::string m_global_ns;
103  std::string m_options_ns;
104  std::string m_feedback_ns;
105  size_t m_queue_size;
107 
108  std::string quit_keypress1;
109  std::string quit_keypress2;
110  std::string map_merge_keypress;
111 
113 
115 
116 }; // end of CMapMerger
117 
118 } } // end of namespaces
119 
std::vector< TNeighborAgentMapProps * > neighbors_t
Definition: CMapMerger.h:69
Class responsible of the execution of the map_merger_node.
Definition: CMapMerger.h:58
std::map< TNeighborAgentMapProps *, CWindowManager * > m_neighbors_to_windows
Definition: CMapMerger.h:92
const mrpt::poses::CPose3D EMPTY_POSE
Definition: CMapMerger.h:48
std::string map_merge_keypress
Definition: CMapMerger.h:110
mrpt::slam::CGridMapAligner::TConfigParams m_alignment_options
Definition: CMapMerger.h:106
mrpt::graphslam::detail::CConnectionManager m_conn_manager
Definition: CMapMerger.h:95
std::map< TNeighborAgentMapProps *, COccupancyGridMap2D::Ptr > maps_t
Definition: CMapMerger.h:61
std::string m_global_ns
Topic namespace under which current node is going to be publishing.
Definition: CMapMerger.h:99
mrpt::graphslam::CWindowManager * m_fused_map_win_manager
Definition: CMapMerger.h:114
neighbors_t m_neighbors
CConnectionManager instance for fetching the running graphSLAM agents.
Definition: CMapMerger.h:91
std::map< TNeighborAgentMapProps *, mrpt::opengl::CSetOfLines::Ptr > trajectories_t
Robot trajectory visual object type.
Definition: CMapMerger.h:68
Struct holding a COccupancyGridMap2D (as well as subscribers for updating it) for a specific running ...
ros::NodeHandle * m_nh
Definition: CMapMerger.h:94
std::map< TNeighborAgentMapProps *, mrpt::poses::CPose2D > neighbor_to_rel_pose_t
Definition: CMapMerger.h:63
mrpt::utils::COutputLogger * m_logger
Definition: CMapMerger.h:93
std::map< TNeighborAgentMapProps *, bool > neighbor_to_is_used_t
Definition: CMapMerger.h:62
std::string m_options_ns
Topic namespace under which, options that are used during the map alignment procedure are fetched fro...
Definition: CMapMerger.h:103
Class responsible of handling the network communication between SLAM agents in the Multi-Robot graphS...


mrpt_graphslam_2d
Author(s): Nikos Koukis
autogenerated on Sat May 2 2020 03:44:17