Fawkes API  Fawkes Development Version
fawkes::Search Class Reference

This is the plan class. More...

#include <astar_search.h>

Inheritance diagram for fawkes::Search:

Public Member Functions

 Search (LaserOccupancyGrid *occ_grid, Logger *logger, Configuration *config)
 Constructor. More...
 
virtual ~Search ()
 Destructor. More...
 
void update (int robo_x, int robo_y, int target_x, int target_y)
 update complete plan things More...
 
bool updated_successful ()
 returns, if the update was successful or not. More...
 
std::vector< point_t > * get_plan ()
 Get the current plan. More...
 
point_t get_robot_position ()
 Get the robot's position in the grid, used for the plan. More...
 
- Public Member Functions inherited from fawkes::AbstractSearch
 AbstractSearch (LaserOccupancyGrid *occ_grid, Logger *logger)
 Constructor. More...
 
virtual ~AbstractSearch ()
 Destructor. 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...
 

Additional Inherited Members

- Protected Attributes inherited from fawkes::AbstractSearch
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 plan class.

Here the plan from A* is managed and cut into small pieces. Also usable methods for managing the plan are implemented here.

Definition at line 47 of file astar_search.h.

Constructor & Destructor Documentation

◆ Search()

fawkes::Search::Search ( LaserOccupancyGrid occ_grid,
Logger logger,
Configuration config 
)

Constructor.

Constructs the plan, initializes an A* Object and makes a reference to the OccupancyGrid.

Parameters
occ_gridThe laser occupancy-grid
loggerThe fawkes logger
configThe fawkes configuration.

Definition at line 48 of file astar_search.cpp.

References fawkes::Configuration::get_int(), and fawkes::Logger::log_debug().

◆ ~Search()

fawkes::Search::~Search ( )
virtual

Destructor.

Definition at line 60 of file astar_search.cpp.

Member Function Documentation

◆ get_plan()

std::vector< point_t > * fawkes::Search::get_plan ( )

Get the current plan.

Returns
vector containing all the points in the grid along the plan

Definition at line 122 of file astar_search.cpp.

◆ get_robot_position()

◆ update()

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

update complete plan things

Perform an update by searching in the occgrid for a plan from robopos to targetpos.

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

Implements fawkes::AbstractSearch.

Definition at line 73 of file astar_search.cpp.

References fawkes::AbstractSearch::cell_costs_, fawkes::OccupancyGrid::get_prob(), fawkes::AbstractSearch::local_target_, fawkes::AbstractSearch::local_trajec_, fawkes::colli_cell_cost_t::occ, fawkes::AbstractSearch::occ_grid_, fawkes::AStar::remove_target_from_obstacle(), and fawkes::AStar::solve().

Referenced by ColliThread::loop().

◆ updated_successful()

bool fawkes::Search::updated_successful ( )
virtual

returns, if the update was successful or not.

Check, if the update was successful or not.

precondition: update had to be called.

Returns
true, if update was successfule.

Implements fawkes::AbstractSearch.

Definition at line 113 of file astar_search.cpp.

Referenced by ColliThread::loop().


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