Repository navigation
navmap_planner: no step through the corner of a hole, no graph for degenerate NavCels - #182
Open
jmguerreroh wants to merge 1 commit into
Open
jmguerreroh wants to merge 1 commit into
jmguerreroh wants to merge 1 commit into
Conversation
…generate NavCels - A step from one NavCel to another that only shares a vertex with it is not taken when that vertex is on the border of the map (an edge at it belongs to one NavCel only): the corner of a hole, e.g. a building cut out of the map. Two holes touching at a corner left the free NavCels on both sides as neighbours through that point, and the path went through the wall. - Degenerate NavCels (a repeated vertex: no area) are left out of the graph. Many of them on one vertex (NavCels a filter removed by collapsing them) made each a neighbour of all the others: quadratic time and memory in their number.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two fixes in the graph
AStarPlannerbuilds from the NavMap (ensure_graph_cache) and walks(
a_star_path), found while planning on large maps of a city with the buildings cut out as holes.No step through the corner of a hole
A NavCel's neighbours include the NavCels that only share a vertex with it; such a step is taken
when every NavCel around that vertex is passable. At the corner of a hole there is no NavCel on
the hole's side, so nothing stopped it: two holes touching at a corner (two buildings, a
building's corner on the map's edge) left the free NavCels on both sides as neighbours through
that point, and the path went through the wall.
Now a vertex on the border of the map (an edge at it belongs to one NavCel only) is computed once
per graph (
border_vertex_), and no step goes through one. Steps through a shared edge are asbefore.
No graph for degenerate NavCels
NavCels with a repeated vertex (no area) are left out of the graph: they have no neighbours and
are nobody's neighbour. A map can have many on one vertex (e.g. NavCels a filter removed by
collapsing them onto it), and each one was a neighbour of all the others: quadratic time and
memory in their number when the graph is built.
Tests
New cases in
navmap_planner_tests.cpp, both failing before this change:HolesTouchingAtACornerAreAWall: a diagonal line of holes across the map, each touching thenext at a corner, both ways: no path across it (a path on the same side still exists).
DegenerateNavCelsAreLeftOutOfTheGraph: 2000 degenerate NavCels on one vertex have noneighbours, no NavCel has them as neighbours, and a plan from that vertex still works.
colcon test --packages-select easynav_navmap_planner: 82 tests (with the linters), no failures.