Version urban lidar horizon and retain measured crossing exits
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user