23 #include <navgraph/constraints/static_list_edge_constraint.h>
50 std::vector<fawkes::NavGraphEdge> &edge_list)
81 edge_list_.push_back(edge);
102 std::vector<NavGraphEdge>::iterator e = std::find(edge_list_.begin(), edge_list_.end(), edge);
103 if (e != edge_list_.end()) {
116 return (std::find(edge_list_.begin(), edge_list_.end(), edge) != edge_list_.end());
122 const std::vector<fawkes::NavGraphEdge> &
132 if (!edge_list_.empty()) {
143 if ((e.from() == from.name() && e.to() == to.name())
144 || (e.from() == to.name() && e.to() == from.name())) {
Constraint that can be queried to check if an edge is blocked.
void add_edges(const std::vector< fawkes::NavGraphEdge > &edges)
Add multiple edges to constraint list.
void add_edge(const fawkes::NavGraphEdge &edge)
Add a single edge to constraint list.
NavGraphStaticListEdgeConstraint(std::string name)
Constructor.
virtual bool blocks(const fawkes::NavGraphNode &from, const fawkes::NavGraphNode &to)
Check if constraint blocks an edge.
void remove_edge(const fawkes::NavGraphEdge &edge)
Remove a single edge from the constraint list.
void clear_edges()
Remove all edges.
bool has_edge(const fawkes::NavGraphEdge &edge)
Check if constraint has a specific edge.
const std::vector< fawkes::NavGraphEdge > & edge_list() const
Get list of blocked edges.
virtual bool compute(void)
Perform compuations before graph search and to indicate re-planning.
virtual ~NavGraphStaticListEdgeConstraint()
Virtual empty destructor.
Fawkes library namespace.