22 #ifndef __LIBS_NAVGRAPH_SEARCH_STATE_H_ 23 #define __LIBS_NAVGRAPH_SEARCH_STATE_H_ 25 #include <utils/search/astar_state.h> 26 #include <navgraph/constraints/constraint_repo.h> 27 #include <navgraph/navgraph.h> 28 #include <core/utils/lockptr.h> 47 navgraph::EstimateFunction estimate_func,
55 virtual size_t key() {
return key_; }
69 return sqrtf(powf(to.
x() - from.
x(), 2) +
70 powf(to.
y() - from.
y(), 2) );
82 return sqrtf(powf(goal.
x() - node.
x(), 2) +
83 powf(goal.
y() - node.
y(), 2) );
90 navgraph::EstimateFunction estimate_func,
91 navgraph::CostFunction cost_func,
95 std::vector<AStarState *> children();
109 navgraph::EstimateFunction estimate_func_;
110 navgraph::CostFunction cost_func_;
This is the abstract(!) class for an A* State.
~NavGraphSearchState()
Destructor.
Fawkes library namespace.
Graph-based path planner A* search state.
static float straight_line_estimate(const fawkes::NavGraphNode &node, const fawkes::NavGraphNode &goal)
Determine straight line estimate between two nodes.
virtual bool is_goal()
Check, wether we reached a goal or not.
virtual float estimate()
Estimate the heuristic cost to the goal.
NavGraphSearchState(fawkes::NavGraphNode node, fawkes::NavGraphNode goal, fawkes::NavGraph *map_graph, fawkes::NavGraphConstraintRepo *constraint_repo=NULL)
Constructor.
virtual size_t key()
Generates a unique key for this state.
Constraint repository to maintain blocks on nodes.
float y() const
Get Y coordinate in global frame.
static float euclidean_cost(const fawkes::NavGraphNode &from, const fawkes::NavGraphNode &to)
Determine euclidean cost between two nodes.
fawkes::NavGraphNode & node()
Get graph node corresponding to this search state.
float x() const
Get X coordinate in global frame.