22 #ifndef __NAVGRAPH_CONSTRAINTS_STATIC_LIST_EDGE_COST_CONSTRAINT_H_ 23 #define __NAVGRAPH_CONSTRAINTS_STATIC_LIST_EDGE_COST_CONSTRAINT_H_ 25 #include <navgraph/constraints/edge_cost_constraint.h> 26 #include <core/utils/lock_vector.h> 31 #include <navgraph/navgraph.h> 45 const std::vector<std::pair<fawkes::NavGraphEdge, float>> &
edge_cost_list()
const;
48 void add_edges(
const std::vector<std::pair<fawkes::NavGraphEdge, float>> &edge_costs);
53 virtual bool compute(
void)
throw();
59 std::vector<std::pair<fawkes::NavGraphEdge, float>> edge_cost_list_;
void add_edge(const fawkes::NavGraphEdge &edge, const float cost_factor)
Add a single edge to constraint list.
Fawkes library namespace.
bool has_edge(const fawkes::NavGraphEdge &edge)
Check if constraint has a specific edge.
Constraint that hold cost factors for a static list of edges.
virtual bool compute(void)
Perform compuations before graph search and to indicate re-planning.
NavGraphStaticListEdgeCostConstraint(std::string name)
Constructor.
Constraint that can be queried for an edge cost factor.
virtual float cost_factor(const fawkes::NavGraphNode &from, const fawkes::NavGraphNode &to)
Get cost factor for given edge.
virtual ~NavGraphStaticListEdgeCostConstraint()
Virtual empty destructor.
const std::vector< std::pair< fawkes::NavGraphEdge, float > > & edge_cost_list() const
Get list of blocked edges.
void add_edges(const std::vector< std::pair< fawkes::NavGraphEdge, float >> &edge_costs)
Add multiple edges to constraint list.
void clear_edges()
Remove all edges.
void remove_edge(const fawkes::NavGraphEdge &edge)
Remove a single edge from the constraint list.
std::string name()
Get name of constraint.