Reconstruct crossing permission from observed approach geometry
This commit is contained in:
@@ -87,8 +87,21 @@ class ContinuousComposition(ComposedInference):
|
||||
allowed = permissions[indices]
|
||||
known = (values["segmentation.known"][indices] | crossing_mask[indices]) & (permitted[indices] | ~allowed)
|
||||
known &= self.camera_source.semantic_pixels(u[visible], v[visible])
|
||||
samples = np.column_stack((points[visible][known], allowed[known].astype(int)))
|
||||
if crossing.get("admitted"):
|
||||
# The observed crossing AREA owns this semantic exception, including
|
||||
# current range in the camera's near blind strip. Waiting for that
|
||||
# ground to reappear in the image leaves old road prohibitions under
|
||||
# the rover. No new points/support or traffic permission are created.
|
||||
crossing_ground = self.crossing.ground_mask(points)
|
||||
visible_indices = np.flatnonzero(visible)
|
||||
crossing_ground[visible_indices[known]] = False # already classified
|
||||
classes = values["segmentation.labels"][indices]
|
||||
crossing_ground[visible_indices[~np.isin(classes, (0, 1, 2, 3))]] = False
|
||||
samples = np.concatenate((samples, np.column_stack((
|
||||
points[crossing_ground], np.ones(int(crossing_ground.sum()))))))
|
||||
sample = {
|
||||
"samples": np.column_stack((points[visible][known], allowed[known].astype(int))).tolist(),
|
||||
"samples": samples.tolist(),
|
||||
"captured_at": observation["captured_at"], "pose": observation["pose"],
|
||||
"frame_id": f"{frame_id}:{yaw}:{pitch}", "capture_id": str(frame_id),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user