Version urban lidar horizon and retain measured crossing exits

This commit is contained in:
DCCONSTRUCTIONS
2026-10-10 03:50:39 +03:00
parent 857bd1fc7b
commit 18e6a0e971
8 changed files with 95 additions and 15 deletions
+3 -2
View File
@@ -279,7 +279,7 @@ def mounted_range_returns(query, origin, directions, key, spec, forward, *,
itself is scalar, avoiding thousands of tiny NumPy allocations per frame.
"""
count = len(directions)
maximum = np.full(count, 8.0) if key == "k1" else np.minimum(8.0, 6.0 / forward)
maximum = np.full(count, spec["range_m"][1]) if key == "k1" else np.minimum(8.0, 6.0 / forward)
# PhysX consumes Float3 internally. Native callers avoid repeated pybind
# sequence conversion; portable checks can use the identical tuple contract.
mount = query_vector(origin)
@@ -304,7 +304,8 @@ def mounted_range_returns(query, origin, directions, key, spec, forward, *,
distances = np.linalg.norm(positions - origin, axis=1)
depth = np.full(count, np.nan, np.float32)
if key == "k1":
valid = np.isfinite(distances) & (distances >= spec["range_m"][0])
valid = (np.isfinite(distances) & (distances >= spec["range_m"][0])
& (distances <= spec["range_m"][1]))
positions[no_hit] = origin + directions[no_hit] * maximum[no_hit, None]
clear = valid | no_hit
else: