Fawkes API  Fawkes Development Version
fawkes::AbstractSearch Class Referenceabstract

This is the abstract search interpretation class for an arbitrary search algorithm to find its way through an Occupancy grid from a robopos to a targetpos. More...

#include <>>

Inheritance diagram for fawkes::AbstractSearch:

Public Member Functions

 AbstractSearch (LaserOccupancyGrid *occ_grid, Logger *logger)
 Constructor. More...
 
virtual ~AbstractSearch ()
 Destructor. More...
 
virtual void update (int robo_x, int robo_y, int target_x, int target_y)=0
 update complete plan things precondition: the occupancy grid has to be updated previously! More...
 
virtual bool updated_successful ()=0
 Checks if the update was successful. More...
 
const point_tget_local_target ()
 return pointer to the local target. More...
 
const point_tget_local_trajec ()
 return pointer to the local trajectory point. More...
 

Protected Attributes

LaserOccupancyGridocc_grid_
 The occupancy grid. More...
 
point_t local_target_
 the calculated target where to drive to More...
 
point_t local_trajec_
 the calculated trajectory where to drive to More...
 
colli_cell_cost_t cell_costs_
 The costs for cells in occupancy grid. More...
 

Detailed Description

This is the abstract search interpretation class for an arbitrary search algorithm to find its way through an Occupancy grid from a robopos to a targetpos.

Definition at line 44 of file abstract_search.h.

Constructor & Destructor Documentation

◆ AbstractSearch()

fawkes::AbstractSearch::AbstractSearch ( LaserOccupancyGrid occ_grid,
Logger logger 
)
inline

Constructor.

Parameters
occ_gridThe laser occupancy-grid
loggerThe fawkes logger

Definition at line 90 of file abstract_search.h.

References cell_costs_, fawkes::LaserOccupancyGrid::get_cell_costs(), fawkes::Logger::log_debug(), and occ_grid_.

◆ ~AbstractSearch()

fawkes::AbstractSearch::~AbstractSearch ( )
inlinevirtual

Destructor.

Definition at line 100 of file abstract_search.h.

Member Function Documentation

◆ get_local_target()

const point_t & fawkes::AbstractSearch::get_local_target ( )
inline

return pointer to the local target.

Get the local target in the grid.

do not modify afterwards precondition: update has to be called before this is ok here

Returns
The local target in grid as a point_t struct

Definition at line 108 of file abstract_search.h.

References local_target_.

Referenced by ColliThread::loop().

◆ get_local_trajec()

const point_t & fawkes::AbstractSearch::get_local_trajec ( )
inline

return pointer to the local trajectory point.

Get the local trajectory in the grid.

do not modify afterwards precondition: update has to be called before this is ok here

Returns
The local trajectory in grid as a point_t struct

Definition at line 117 of file abstract_search.h.

References local_trajec_.

Referenced by ColliThread::loop().

◆ update()

virtual void fawkes::AbstractSearch::update ( int  robo_x,
int  robo_y,
int  target_x,
int  target_y 
)
pure virtual

update complete plan things precondition: the occupancy grid has to be updated previously!

Parameters
robo_xRobot x position in grid
robo_yRobot y position in grid
target_xTarget x position in grid
target_yTarget y position in grid

Implemented in fawkes::Search.

◆ updated_successful()

virtual bool fawkes::AbstractSearch::updated_successful ( )
pure virtual

Checks if the update was successful.

Returns
true if "update(...)" was successful, fals otherwise.

Implemented in fawkes::Search.

Member Data Documentation

◆ cell_costs_

colli_cell_cost_t fawkes::AbstractSearch::cell_costs_
protected

The costs for cells in occupancy grid.

Definition at line 80 of file abstract_search.h.

Referenced by AbstractSearch(), fawkes::Search::get_robot_position(), and fawkes::Search::update().

◆ local_target_

point_t fawkes::AbstractSearch::local_target_
protected

the calculated target where to drive to

Definition at line 77 of file abstract_search.h.

Referenced by get_local_target(), fawkes::Search::get_robot_position(), and fawkes::Search::update().

◆ local_trajec_

point_t fawkes::AbstractSearch::local_trajec_
protected

the calculated trajectory where to drive to

Definition at line 78 of file abstract_search.h.

Referenced by get_local_trajec(), and fawkes::Search::update().

◆ occ_grid_

LaserOccupancyGrid* fawkes::AbstractSearch::occ_grid_
protected

The occupancy grid.

Definition at line 75 of file abstract_search.h.

Referenced by AbstractSearch(), fawkes::Search::get_robot_position(), and fawkes::Search::update().


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