Version urban lidar horizon and retain measured crossing exits
This commit is contained in:
@@ -300,7 +300,7 @@ def mounted_sensor_rig(robot, camera_height, *, legacy=False, continuous=False):
|
||||
camera_forward_m=0.665,
|
||||
camera_pitch_degrees=-30.0,
|
||||
focal_length_mm=13.0,
|
||||
mounts=rover_mounts(camera_height),
|
||||
mounts=rover_mounts(camera_height, urban_range=continuous),
|
||||
)
|
||||
if continuous:
|
||||
if legacy:
|
||||
|
||||
@@ -8,11 +8,12 @@ import copy
|
||||
import math
|
||||
|
||||
SCHEMA = "missioncore.rover-sensor-mounts/v1"
|
||||
URBAN_SCHEMA = "missioncore.rover-sensor-mounts/v2"
|
||||
|
||||
|
||||
def rover_mounts(height=0.8):
|
||||
def rover_mounts(height=0.8, *, urban_range=False):
|
||||
return {
|
||||
"schema_version": SCHEMA,
|
||||
"schema_version": URBAN_SCHEMA if urban_range else SCHEMA,
|
||||
"frame": "body-x-forward-y-left-z-up-from-ground-contact",
|
||||
"calibration_status": "engineering-approximation-not-device-calibration",
|
||||
"insta360": {
|
||||
@@ -47,10 +48,14 @@ def rover_mounts(height=0.8):
|
||||
"tilt_forward_degrees": 15.0,
|
||||
"body_size_m": [0.11, 0.11, 0.20],
|
||||
"elevation_degrees": [-7.0, 52.0],
|
||||
"range_m": [0.3, 8.0],
|
||||
# K1 publishes 40m @10% reflectivity. This ideal first-hit
|
||||
# surrogate uses a bounded 20m urban horizon, not a guarantee of
|
||||
# real-device range/reflectivity or its native sampling pattern.
|
||||
"range_m": [0.3, 20.0 if urban_range else 8.0],
|
||||
"scope": (
|
||||
"MID360-published-FOV; mount-assumed; "
|
||||
"bounded-uniform-sampling-not-vendor-scan-pattern; 8m-lab-horizon"
|
||||
"bounded-uniform-sampling-not-vendor-scan-pattern; "
|
||||
+ ("20m-urban-horizon" if urban_range else "8m-lab-horizon")
|
||||
),
|
||||
},
|
||||
}
|
||||
@@ -63,7 +68,10 @@ def validate_mounts(value):
|
||||
height = value["insta360"]["body_center_m"][2]
|
||||
if type(height) not in (int, float) or not math.isfinite(height) or not 0.78 <= height <= 2:
|
||||
raise ValueError("Invalid sensor mounting height")
|
||||
if value != rover_mounts(height):
|
||||
schema = value.get("schema_version")
|
||||
if schema not in (SCHEMA, URBAN_SCHEMA):
|
||||
raise ValueError("Unsupported sensor mount version")
|
||||
if value != rover_mounts(height, urban_range=schema == URBAN_SCHEMA):
|
||||
raise ValueError("Unsupported or changed sensor mount calibration")
|
||||
except (KeyError, TypeError, IndexError) as exc:
|
||||
raise ValueError("Invalid sensor mounts") from exc
|
||||
|
||||
Reference in New Issue
Block a user