Repository navigation
nav: slopes are material risk, not walls; terrain risk joins the material risk - #785
Merged
Merged
Conversation
…rial risk terrain_config's defaults make slope a soft material risk: block_infeasible is off, so infeasible slope no longer joins the occupancy as a wall, and the grade cost and the infeasible cells act through the material channel's soft force (lam_grade 0.5) and barrier (lam_grade_hard 3). A vehicle the planner sends over a steep cell it can physically drive is no longer pinned there as against a building. The hard weight is three times the material channel's: in cvcdbg's Jolt Humvee convoy on Austin (8 paired seeds), walls pinned the lead for the last 90 s of a 4-minute run; soft slopes cut the time spent wall-following by about a quarter and widened the spacing, and at 3 the lead never rolled on Austin's twisted ramps, where at 1 it rolled in most runs. block_infeasible = true restores the walls. The terrain's risk is material risk where the drive reports and reads it: - drive_telemetry.mrisk is the worse of the material's risk and the grade cost (the terrain's alone, with its weights, when there is no material stack), so the nav ledger's mrisk_mean/mrisk_max see slopes; - a risk net's look-ahead takes the worse of the two at each probe point (coef_feats' new trailing terrain_risk; null leaves the column exactly as before), and drive_step / drive_step_ext run a risk net on a terrain alone. Tests: SteepSlopeIsARiskNotAWall (a wall stops the agent at a ramp with no way round, the risk lets it cross), TerrainRiskIsMaterialRisk (the probe column, the telemetry and a risk net on terrain alone); InfeasibleSlopeIsNeverEntered opts into block_infeasible.
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.
Slopes are a soft material risk by default. In
terrain_config:block_infeasibleis nowfalse, so infeasible slope no longer joins the occupancy as a wall.lam_grade0.5).lam_grade_hard3).A vehicle the planner sends over a steep cell it can physically drive is no longer pinned there as against a building. Setting
block_infeasible = truerestores the walls.Terrain risk is material risk wherever the drive reports or reads it:
drive_telemetry.mriskis the worse of the material's risk and the grade cost. With no material stack it's the terrain's alone, reported with the terrain's weights. So the nav ledger'smrisk_mean/mrisk_maxnow see slopes; before this they read 0 on terrain.kFlagFeatRisk) takes the worse of the two at each probe point, via a new trailingcoef_feats(..., terrain_risk). A nullterrain_riskleaves the column exactly as before, so grl_snam parity is unchanged.drive_stepanddrive_step_extrun a risk net on a terrain alone instead of throwing.Why. In cvcdbg's Jolt Humvee convoy on Austin, the slope walls (
max_grade0.2) pinned the lead for the last 90 s of a 4-minute run. It sat against a ~19% downhill it could physically drive, held there by the barrier while its route sent it on. A/B over 8 paired jam seeds (2100 ticks; * = paired 95% CI excludes 0):At hard weight 1 (the material channel's own
lam_hard), the Humvee lead rolled on Austin's twisted ramps in most runs; at 3 it never did. That's why the default is three times the material channel's. Followers still roll more often than with walls (with righting on in cvcdbg). Feeding the plant's tip risk into the barrier (hard_scale) is the next lever.Tests
SteepSlopeIsARiskNotAWall: a ramp steeper than the limit, with no way round. As a wall, the agent never passes x = -3.5. As a risk, it crosses.TerrainRiskIsMaterialRisk: the probe column on terrain alone and over a riskless material, the telemetry'smriskandlam_hard, and a risk net on terrain alone.InfeasibleSlopeIsNeverEnterednow opts intoblock_infeasible.Results locally (Windows, RelWithDebInfo): nav_terrain_test 8/8, nav_binding_test 4/4, nav_material_test 29/29, nav_test 64/64. nav_plant_test (Jolt) 23/23, including NeverEntersInfeasibleSlope (0 ticks on infeasible slope under the soft defaults, on a route that goes round the ridge) and the climbing-energy gate.
Found along the way (not changed here): a kinematic agent driving straight at its initial goal, with no route follower, never stops at it. Parking brakes it by
a_max·dteach tick, but the drive re-accelerates toward the parked carrot, which sits 2·v ahead, and the two settle at about 6.2 m/s. It happens with no terrain set too.