Fawkes API  Fawkes Development Version
fawkes::NavGraphGeneratorGrid Class Reference

#include <>>

Inheritance diagram for fawkes::NavGraphGeneratorGrid:

Public Member Functions

 NavGraphGeneratorGrid (const std::map< std::string, std::string > &params)
 Constructor. More...
 
virtual ~NavGraphGeneratorGrid ()
 Destructor. More...
 
virtual void compute (fawkes::LockPtr< fawkes::NavGraph > graph)
 
- Public Member Functions inherited from fawkes::NavGraphGenerator
 NavGraphGenerator ()
 Default constructor. More...
 
 NavGraphGenerator (std::map< std::string, std::string > params)
 Parametrized constructor. More...
 
virtual ~NavGraphGenerator ()
 Destructor. 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 Public Member Functions inherited from fawkes::NavGraphGenerator
static std::string genname (unsigned int &i)
 Generate a new name. More...
 
- Protected Attributes inherited from fawkes::NavGraphGenerator
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...
 

Detailed Description

Generate navgraph using a Grid diagram.

Author
Tim Niemueller

Definition at line 37 of file grid.h.

Constructor & Destructor Documentation

◆ NavGraphGeneratorGrid()

fawkes::NavGraphGeneratorGrid::NavGraphGeneratorGrid ( const std::map< std::string, std::string > &  params)

Constructor.

Parameters
paramsalgorithm parameters. Valid parameters are:
  • spacing (float): inter-cell midpoint spacing (required).

Definition at line 61 of file grid.cpp.

◆ ~NavGraphGeneratorGrid()

fawkes::NavGraphGeneratorGrid::~NavGraphGeneratorGrid ( )
virtual

Destructor.

Definition at line 99 of file grid.cpp.

Member Function Documentation

◆ compute()

void fawkes::NavGraphGeneratorGrid::compute ( fawkes::LockPtr< fawkes::NavGraph graph)
virtual

Compute graph.

Parameters
graphthe resulting nodes and edges will be added to this graph. The graph shall not be cleared automatically. The generator shall lock the graph as necessary.
Author
Tim Niemueller

Implements fawkes::NavGraphGenerator.

Definition at line 104 of file grid.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::EDGE_SPLIT_INTERSECTION, fawkes::NavGraph::edges(), fawkes::LockPtr< T_CppObject >::objmutex_ptr(), and fawkes::NavGraphGenerator::obstacles_.


The documentation for this class was generated from the following files: