21 #ifndef __PLUGINS_NAVGRAPH_GENERATOR_NAVGRAPH_GENERATOR_THREAD_H_ 22 #define __PLUGINS_NAVGRAPH_GENERATOR_NAVGRAPH_GENERATOR_THREAD_H_ 24 #include <core/threading/thread.h> 25 #include <aspect/configurable.h> 26 #include <aspect/logging.h> 27 #include <aspect/blackboard.h> 28 #include <navgraph/aspect/navgraph.h> 29 #include <navgraph/navgraph.h> 30 #include <blackboard/interface_listener.h> 31 #include <utils/math/types.h> 32 #include <plugins/amcl/map/map.h> 34 #include <interfaces/NavGraphGeneratorInterface.h> 36 #ifdef HAVE_VISUALIZATION 51 #ifdef HAVE_VISUALIZATION 61 protected:
virtual void run() { Thread::run();}
67 std::map<std::string, std::string> properties;
77 typedef std::map<std::string, PointOfInterest> PoiMap;
78 typedef std::map<std::string, fawkes::cart_coord_2d_t> ObstacleMap;
79 typedef std::list<Edge> EdgeList;
84 ObstacleMap map_obstacles(
float line_max_dist);
85 map_t * load_map(std::vector<std::pair<int, int>> &free_space_indices);
87 void filter_edges_from_map(
float max_dist);
88 void filter_nodes_orphans();
89 void filter_multi_graph();
91 #ifdef HAVE_VISUALIZATION 92 void publish_visualization();
96 std::string cfg_global_frame_;
97 unsigned int cfg_map_line_segm_max_iterations_;
98 float cfg_map_line_min_length_;
99 unsigned int cfg_map_line_segm_min_inliers_;
100 float cfg_map_line_cluster_tolerance_;
101 float cfg_map_line_cluster_quota_;
102 bool cfg_visualization_;
107 ObstacleMap obstacles_;
108 ObstacleMap map_obstacles_;
111 bool copy_default_properties_;
112 std::map<std::string, std::string> default_properties_;
114 std::map<std::string, bool> filter_;
115 std::map<std::string, std::map<std::string, float>> filter_params_float_;
116 std::map<std::string, std::map<std::string, float>> filter_params_float_defaults_;
122 #ifdef HAVE_VISUALIZATION Thread to perform graph-based path planning.
EdgeMode
When adding edges, the mode defines how to add edges.
Thread aspect to access to BlackBoard.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Cartesian coordinates (2D).
virtual ~NavGraphGeneratorThread()
Destructor.
ConnectionMode
Drive modes enum.
Thread class encapsulation of pthreads.
Base class for all Fawkes BlackBoard interfaces.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual void loop()
Code to execute in the thread.
NavGraphGeneratorInterface Fawkes BlackBoard Interface.
virtual void finalize()
Finalize the thread.
NavGraphGeneratorThread()
Constructor.
virtual void init()
Initialize the thread.
Thread aspect to log output.
Send Marker messages to rviz to show navgraph-generator info.
Thread aspect to access configuration data.
BlackBoard interface listener.
Thread aspect to access NavGraph.