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