Keep passage clearance tied to observed spatial geometry

This commit is contained in:
DCCONSTRUCTIONS
2026-10-10 00:12:01 +03:00
parent 8bd2a9967a
commit daabdb9450
3 changed files with 66 additions and 9 deletions
@@ -395,7 +395,21 @@ class ObservedGoals:
observed = self.clearance_observation
obstacles = (observed[1] if observed is not None and 0 <= now-observed[0] <= .8
else np.empty((0, 2)))
for passages in passage_centres(permitted, pose, target, geometry, obstacles):
# A sensor crop edge is not a passage boundary. Preserve the spatial
# extent of still-positive measured surface cells when choosing intent.
# Current range above still owns candidate selection/lateral support;
# this memory cannot certify a drive goal or admit any motion.
remembered = np.array([point for key, point in self.measured.items()
if key in allowed], dtype=float).reshape(-1, 3)
if len(remembered):
distance = np.linalg.norm(remembered[:, :2]-pose[:2], axis=1)
remembered = remembered[(distance <= 6.) & (np.abs(remembered[:, 2] -
(pose[2]-geometry['body_contact_height_m'])) <= geometry.get('max_step_m', .1)
+ distance*math.tan(math.radians(geometry['max_slope_degrees'])))]
if candidate_mask is not None:
remembered = remembered[candidate_mask(remembered)]
passage_points = np.concatenate((permitted, remembered))
for passages in passage_centres(passage_points, pose, target, geometry, obstacles):
for passage in passages:
distance = np.linalg.norm(candidates[:, :2]-passage['xy'], axis=1)
for index in np.argsort(distance, kind="stable"):