Advance passed advisory route joints from observed body progress

This commit is contained in:
DCCONSTRUCTIONS
2026-10-10 06:48:19 +03:00
parent 621023380a
commit 670e8047b3
5 changed files with 98 additions and 18 deletions
+3 -3
View File
@@ -1,6 +1,4 @@
"""Current observed body support for an intent transition, never a drive goal."""
import math
import numpy as np
@@ -11,9 +9,11 @@ def route_support(monitor, observed, value, inputs):
pose = np.asarray(value["pose"], dtype=float)
target = np.asarray(target, dtype=float)
if (target.shape != (2,) or not np.isfinite(target).all()
or math.dist(pose[:2], target) > 3.5
or value["execution_inputs_sha256"] != inputs["sha256"]):
raise ValueError("Invalid route transition observation")
# The target binds the receipt to an itinerary joint; no terrain near that
# target is queried or admitted. Assess only the actual observed body here.
# Ordered longitudinal progress belongs to RoutedMission, not this sensor.
support = observed["permitted_terrain"]
receipt = monitor.assess_pose(observed["terrain"], pose,
value["body_contact_height_m"], support_terrain=support)
+3 -3
View File
@@ -708,9 +708,9 @@ class ComposedInference:
and self.mission.can_query_arrival(pose)
and np.linalg.norm(np.asarray(pose[:2]) - arrival_target) <= 3.5
)
route_transition_nearby = bool(not recovering and arrival_target is not None
route_transition_query = bool(not recovering and arrival_target is not None
and isinstance(self.mission, RoutedMission)
and math.dist(pose[:2], arrival_target) <= 3.5)
and self.mission.can_query_route_transition(pose))
terminal_region = bool(
nearby
and math.dist(pose[:2], arrival_target)
@@ -844,7 +844,7 @@ class ComposedInference:
if arrival_candidate or body_goal_query
else None,
"route_transition_target": arrival_target
if route_transition_nearby else None,
if route_transition_query else None,
"max_speed_mps": min(self.max_speed, 0.1)
if intent["state"] == "reversing" or intent.get("corner_approach")
else min(self.max_speed, inputs.get("source.crossing-admission", {}).get("speed_limit_mps") or self.max_speed),