Fawkes API Fawkes Development Version
|
Generate navgraph using a Voronoi diagram. More...
#include <>>
Public Member Functions | |
NavGraphGeneratorVoronoi () | |
Default constructor. More... | |
virtual | ~NavGraphGeneratorVoronoi () |
Destructor. More... | |
virtual void | compute (fawkes::LockPtr< fawkes::NavGraph > graph) |
Compute graph. More... | |
const std::list< Polygon2D > & | face_polygons () const |
Get list of polygons. More... | |
![]() | |
NavGraphGenerator () | |
Default constructor. More... | |
NavGraphGenerator (std::map< std::string, std::string > params) | |
Parametrized constructor. More... | |
virtual | ~NavGraphGenerator () |
Destructor. More... | |
virtual void | compute (fawkes::LockPtr< fawkes::NavGraph > graph)=0 |
Compute graph. More... | |
virtual void | set_bounding_box (float bbox_p1_x, float bbox_p1_y, float bbox_p2_x, float bbox_p2_y) |
Set bounding box. More... | |
virtual void | set_near_threshold (float near_threshold) |
Set distance threshold for considering nodes to be the same. More... | |
virtual void | add_obstacle (float x, float y) |
Add an obstacle point. More... | |
Additional Inherited Members | |
![]() | |
static std::string | genname (unsigned int &i) |
Generate a new name. More... | |
![]() | |
bool | bbox_enabled_ |
True if bounding box requested, false otherwise. More... | |
float | bbox_p1_x_ |
X part of P1 for bounding box. More... | |
float | bbox_p1_y_ |
Y part of P1 for bounding box. More... | |
float | bbox_p2_x_ |
X part of P2 for bounding box. More... | |
float | bbox_p2_y_ |
Y part of P2 for bounding box. More... | |
float | near_threshold_ |
distance threshold when to consider two nodes to be the same More... | |
std::list< std::pair< float, float > > | obstacles_ |
Obstacles to consider during navgraph generation. More... | |
std::map< std::string, std::string > | params_ |
Parameters specific to the actual generator in a generic format. More... | |
fawkes::NavGraphGeneratorVoronoi::NavGraphGeneratorVoronoi | ( | ) |
Default constructor.
Definition at line 64 of file voronoi.cpp.
|
virtual |
Destructor.
Definition at line 69 of file voronoi.cpp.
|
virtual |
Compute graph.
graph | the resulting nodes and edges will be added to this graph. The graph will not be cleared automatically. The graph will be locked while adding nodes. |
Implements fawkes::NavGraphGenerator.
Definition at line 102 of file voronoi.cpp.
References fawkes::NavGraph::add_edge(), fawkes::NavGraph::add_node(), fawkes::NavGraphGenerator::bbox_enabled_, fawkes::NavGraphGenerator::bbox_p1_x_, fawkes::NavGraphGenerator::bbox_p1_y_, fawkes::NavGraphGenerator::bbox_p2_x_, fawkes::NavGraphGenerator::bbox_p2_y_, fawkes::NavGraph::calc_reachability(), fawkes::contains(), fawkes::NavGraphGenerator::genname(), fawkes::LockPtr< T_CppObject >::lock(), fawkes::NavGraphGenerator::near_threshold_, fawkes::NavGraph::nodes(), fawkes::NavGraphGenerator::obstacles_, fawkes::polygon_area(), fawkes::polygon_contains(), and fawkes::LockPtr< T_CppObject >::unlock().
|
inline |