Separate forbidden ground from body collision and retain capture phase

This commit is contained in:
DCCONSTRUCTIONS
2026-10-09 11:39:34 +03:00
parent f449caa6e0
commit 39dd3bb551
10 changed files with 227 additions and 17 deletions
@@ -45,6 +45,22 @@ class Footprint:
else None
)
def ground_envelope(self):
"""Conservative origin-centred enclosure of all validated contact bands.
Surface exclusions constrain ground contacts, not mounted overhangs.
Keep the gap between tracks and the same reserve, braking and motion
discrepancy bounds. Legacy geometry retains the full collision body.
"""
if self.contacts is None:
return self
extent = np.max([np.maximum(np.abs(low), np.abs(high))
for low, high in self.contacts.bands], axis=0)
return Footprint(dict(length_m=float(2*extent[0]), width_m=float(2*extent[1]),
max_step_m=self.max_step,
max_slope_degrees=math.degrees(math.atan(self.max_slope))),
deceleration=self.deceleration, clearance_m=self.clearance_m)
def classify_contacts(self, surface, offsets):
if self.contacts is None:
return surface.classify(offsets)