Repository navigation
nav: belief (observed) material kernels and golden (B1) - #742
Merged
Merged
Conversation
belief_material.h holds the pieces that build material planes from what a belief plane has seen (docs/roadmap/NAV-BELIEF-MATERIAL-ROADMAP.md, B1): - belief_material_params: the pinned unseen values (risk 0, hard 0), whether an unseen cell blocks the witness gate (yes), the seen rule and the material range; - belief_material_inputs: the truth rasters where seen, the pins elsewhere; - belief_gate_surface: hard_b | occ | unseen and its metres clearance, the chain set_material uses; - seen_disc: the optional range-disc rule, in numpy linspace arithmetic. material_build and witness_gate run unchanged on their output. sense_batch keeps an optional material-range mask (belief_planes::material_seen / material_changed, sense_agents::material_range_m); left null, every output is byte-identical. pycvc: nav_belief_material_inputs, nav_belief_gate_surface, nav_seen_disc and nav_sense_batch_material, all new symbols. nav_sense_batch now shares its implementation and is unchanged. Tests: nav_belief_material_test (11 cases). NavBeliefMaterial.Golden writes src/cvc/tests/data/belief_material_golden.json: four cases (the defaults, a 7 m material range, the disc, pessimistic pins with unseen cells open to the gate), three sense ticks, two planes, the SHA-256 of every raster and the gate's outputs. GRL-SNAM's numpy references (BeliefGrid.sense, MaterialGrid, MaterialRuntime, witness_gate_batch) reproduce all 432 values bit for bit. test_pycvc_nav_belief reproduces the golden through pycvc.
This was referenced Oct 20, 2026
transfix
added a commit
that referenced
this pull request
Oct 20, 2026
# Conflicts: # docs/NAV_MATERIAL.md
transfix
added a commit
that referenced
this pull request
Oct 21, 2026
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.
This is B1 of
docs/roadmap/NAV-BELIEF-MATERIAL-ROADMAP.md: the kernels that build material planes from what a belief plane has seen, plus the golden that GRL-SNAM's numpy twin is held to. It follows §9's recommended column. It is additive and off by default.inc/cvc/nav/belief_material.hbelief_material_params: the pinned unseen values (unknown_risk0,unknown_hard0),unknown_gate_hard(on), the seen rule (ray-cast by default, or a range disc) and an optional shorter material range.belief_material_inputs: the truth rasters where seen, the pinned values elsewhere.material_buildruns unchanged on the result.belief_gate_surface:hard_b | occ | (unknown_gate_hard & !seen), plus its metres clearance through the same chainset_materialandMaterialRuntimeuse.witness_gateruns unchanged on it.seen_disc: the optional disc rule, with the arithmetic of anp.linspacescan.belief_material.cppis built with-ffp-contract=off, likematerial.cpp.sense_batch(grid_nav.h)belief_planes::material_seen/material_changedandsense_agents::material_range_m.ever_seendoes.nav_testsuite passes unchanged (61/61).pycvc (new symbols only)
nav_belief_material_inputsnav_belief_gate_surfacenav_seen_discnav_sense_batch_material: the sense plus the material mask.nav_sense_batchnow shares its implementation and keeps its signature and behaviour.Tests
nav_belief_material_testhas 11 cases:ever_seen;material_changedper plane;NavBeliefMaterial.Golden.Golden 1 is
src/cvc/tests/data/belief_material_golden.json(110 KB). It runs four cases over three sense ticks and two planes:For each case, tick and plane it records the SHA-256 of 12 rasters (the material mask, the planning occupancy,
risk_b,hard_b, the 6 material planes, the gate surface and its clearance) and the gate's outputs. The inputs are in the file, and so are the full arrays of one plane.CVC_BELIEF_MATERIAL_GOLDEN_WRITE=1rewrites it.Measured:
BeliefGrid.sense,to_occupancy,MaterialGrid,MaterialRuntimeandwitness_gate_batch.test_pycvc_nav_beliefreproduces the golden through the pycvc bindings.nav_material_testpasses (29/29).Next is B2:
sim_world::set_material_belief, which uses these kernels.