mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-06 20:43:46 +08:00
Load live FLM trial validation before the driving loop
This commit is contained in:
Executable → Regular
+2
-2
@@ -137,11 +137,11 @@ class Controls:
|
||||
|
||||
from openpilot.starpilot.flm.live_trial_store import load_confirmed_history
|
||||
self.global_learning = GlobalRuntime(self.CP, self.CI, self.LaC, confirmed_live_history=load_confirmed_history(self.params))
|
||||
# Load optional capture code before publishing the first control command.
|
||||
# Load optional capture and live-trial code before the first control command.
|
||||
# Engagement must not compile/import replay and feedback modules in the loop.
|
||||
if self.global_learning.descriptor is not None:
|
||||
try:
|
||||
for module in ('controller_replay', 'physical_input_observation', 'feedback_wire'):
|
||||
for module in ('controller_replay', 'physical_input_observation', 'feedback_wire', 'live_trial_wire', 'live_tracking_response'):
|
||||
importlib.import_module('openpilot.starpilot.flm.' + module)
|
||||
except Exception:
|
||||
self._discard_global_learning()
|
||||
|
||||
@@ -18,6 +18,8 @@ identity = sys.argv[1]
|
||||
cp = interfaces[identity].get_non_essential_params(identity)
|
||||
with controls_for(cp, 'standard', True) as controls:
|
||||
before = set(sys.modules)
|
||||
assert {'openpilot.starpilot.flm.' + name for name in
|
||||
('live_trial_wire', 'live_tracking_response')} <= before, 'cold trial dependency left for active Controls'
|
||||
for tick in range(30):
|
||||
command, state = frame(controls, 400_000_000_000 + tick * 10_000_000, tick)
|
||||
controls.publish(command, state)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "3859ba9b1e2e03ab97c992fb59a88cb029558b0d3374fcf72fa4949260cd0b53", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "0cd90e4360c4ac51d61657f8ab32b534523b33df9481485c739f8c79fdb2c878", "schema_version": 1}
|
||||
|
||||
Reference in New Issue
Block a user