21 #include <navgraph/constraints/polygon_edge_constraint.h> 39 NavGraphPolygonEdgeConstraint::NavGraphPolygonEdgeConstraint(
const std::string &name)
65 if (! polygons_.empty()) {
76 for (
auto p : polygons_) {
77 Point from_p(from.x(), from.y());
78 Point to_p(to.x(), to.y());
79 if (on_poly(from_p, to_p, p.second)) {
NavGraphPolygonEdgeConstraint(const std::string &name)
Constructor.
Constraint that can be queried to check if an edge is blocked.
virtual bool compute(void)
Perform compuations before graph search and to indicate re-planning.
Simple point representation for polygon.
virtual bool blocks(const fawkes::NavGraphNode &from, const fawkes::NavGraphNode &to)
Check if constraint blocks an edge.
Fawkes library namespace.
Constraint that blocks nodes within and edges touching a polygon.
virtual ~NavGraphPolygonEdgeConstraint()
Virtual empty destructor.
std::vector< Point > Polygon
A vector of points makes a polygon.