Files
DCCONSTRUCTIONS d0e5f90952 Preserve installed operator workspace before consolidation
Local preservation snapshot, not a new deployment or simulation acceptance.
2026-10-08 09:59:51 +03:00

22 lines
935 B
Python

"""Small bound observation receipt, including early body-goal rejections."""
import numpy as np
def route_observation(terrain, pose, value, max_step):
# Caller owns the same-stamp terrain/path/command transaction. This payload
# grants no motion and contains no scene truth; consumers must also match
# these candidates to the current range returns before excluding a route.
terrain = np.asarray(terrain)
obstacles = terrain[terrain[:, 3] > max_step + 1e-4]
order = np.argsort(np.linalg.norm(obstacles[:, :2] - pose[:2], axis=1), kind="stable")[:12]
return {
"schema_version": "missioncore.local-route-observation/v1",
"observation": {
"pose": list(pose),
"simulation_time_seconds": value.get("simulation_time_seconds"),
"execution_inputs_sha256": value["execution_inputs_sha256"],
},
"near_obstacles": obstacles[order].tolist(),
}