Repository navigation
NavMap A*: terrain costs and limits, and links between surfaces - #130
Merged
Merged
Conversation
All off by default. terrain.slope_weight adds slope_weight * tan^2 of the slope of each NavCel per meter: gentle slopes cost little and steep ones a lot, up, down or across, so a gentle ramp is preferred to a steep one to the same height. The line-of-sight shortcut never replaces part of the path by a steeper or costlier segment. terrain.max_slope_deg, max_step, max_roughness and min_clearance make the NavCels beyond the robot's limits untraversable, from the NavMap descriptors computed once per geometry. Links between surfaces of the allowed kinds (links.types, generic, ramp and door by default) are search edges, and the path keeps their two ends. The graph cache now tells a new map by its geometry id. Signed-off-by: Francisco Martín Rico <fmrico@gmail.com>
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.
Closes #129
All options are off by default, so existing configurations plan as before.
terrain.slope_weightaddsslope_weight × tan²(slope)per meter on each NavCel. Gentle slopes cost little and steep ones a lot, whether the robot goes up, down or across them. A gentle ramp is therefore preferred to a steep one that reaches the same height. With100, 5° adds 0.8 per meter, 10° adds 3 and 20° adds 13; flat ground costscost_factor(2).terrain.max_slope_deg,max_step,max_roughnessandmin_clearancemake the NavCels beyond the robot's limits untraversable. They are computed from the NavMap descriptors once per map geometry.links.types, by defaultgeneric,rampanddoor). The path keeps the two ends of a link, with no waypoints in the air and no shortcut across it.Planning time on real maps is unchanged, about 1 ms on the excavation (30 000 NavCels) and on the parking garage (38 000). The first plan after a map loads takes 6–35 ms, depending on the limits enabled. On the excavation, with
slope_weight 100, the steepest NavCel on a 20 m path drops from 21.6° to 9.1°, at the cost of a 3 m detour.Nine new tests cover: