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,
48 navgraph::CostFunction cost_func = NavGraphSearchState::euclidean_cost,
55 virtual size_t key() {
return key_; }
56 virtual float estimate();
57 virtual bool is_goal();
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.
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 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.
float x() const
Get X coordinate in global frame.