Fawkes API
Fawkes Development Version
|
This is the plan class. More...
#include <astar_search.h>
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... | |
![]() | |
AbstractSearch (LaserOccupancyGrid *occ_grid, Logger *logger) | |
Constructor. More... | |
virtual | ~AbstractSearch () |
Destructor. More... | |
const point_t & | get_local_target () |
return pointer to the local target. More... | |
const point_t & | get_local_trajec () |
return pointer to the local trajectory point. More... | |
Additional Inherited Members | |
![]() | |
LaserOccupancyGrid * | occ_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... | |
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.
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.
occ_grid | The laser occupancy-grid |
logger | The fawkes logger |
config | The fawkes configuration. |
Definition at line 48 of file astar_search.cpp.
References fawkes::Configuration::get_int(), and fawkes::Logger::log_debug().
|
virtual |
Destructor.
Definition at line 60 of file astar_search.cpp.
std::vector< point_t > * fawkes::Search::get_plan | ( | ) |
Get the current plan.
Definition at line 122 of file astar_search.cpp.
point_t fawkes::Search::get_robot_position | ( | ) |
Get the robot's position in the grid, used for the plan.
Definition at line 131 of file astar_search.cpp.
References fawkes::AbstractSearch::cell_costs_, fawkes::colli_cell_cost_t::far, fawkes::colli_cell_cost_t::free, fawkes::OccupancyGrid::get_height(), fawkes::OccupancyGrid::get_prob(), fawkes::OccupancyGrid::get_width(), fawkes::AbstractSearch::local_target_, fawkes::Logger::log_warn(), fawkes::colli_cell_cost_t::mid, fawkes::colli_cell_cost_t::near, fawkes::colli_cell_cost_t::occ, fawkes::AbstractSearch::occ_grid_, fawkes::point_struct::x, and fawkes::point_struct::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!
robo_x | Robot x position in grid |
robo_y | Robot y position in grid |
target_x | Target x position in grid |
target_y | Target 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().
|
virtual |
returns, if the update was successful or not.
Check, if the update was successful or not.
precondition: update had to be called.
Implements fawkes::AbstractSearch.
Definition at line 113 of file astar_search.cpp.
Referenced by ColliThread::loop().