controlsd: support for SIMULATION mode for process replay (#28895)

* Support for simulation flag while replay

* Update cereal

* Enable simulation for controlsd

* Update ref commit

* Update cereal
pull/28909/head
Kacper Rączy 2 years ago committed by GitHub
parent 80eff1b6ce
commit 72579a0e10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cereal
  2. 6
      selfdrive/controls/controlsd.py
  3. 1
      selfdrive/test/process_replay/process_replay.py
  4. 2
      selfdrive/test/process_replay/ref_commit

@ -1 +1 @@
Subproject commit c94c7c61cc576e950a1604e1a3c9a91b1f86964c
Subproject commit a2f1f0cb8dd45ea4265255855da7de8fd89156ed

@ -373,7 +373,7 @@ class Controls:
else:
self.logged_comm_issue = None
if not self.sm['liveParameters'].valid and not TESTING_CLOSET and not SIMULATION:
if not self.sm['liveParameters'].valid and not TESTING_CLOSET and (not SIMULATION or REPLAY):
self.events.add(EventName.vehicleModelInvalid)
if not self.sm['lateralPlan'].mpcSolutionValid:
self.events.add(EventName.plannerError)
@ -411,7 +411,7 @@ class Controls:
pass
# TODO: fix simulator
if not SIMULATION:
if not SIMULATION or REPLAY:
if not NOSENSOR:
if not self.sm['liveLocationKalman'].gpsOK and self.sm['liveLocationKalman'].inputsOK and (self.distance_traveled > 1000):
# Not show in first 1 km to allow for driving out of garage. This event shows after 5 minutes
@ -436,7 +436,7 @@ class Controls:
if not self.initialized:
all_valid = CS.canValid and self.sm.all_checks()
timed_out = self.sm.frame * DT_CTRL > (6. if REPLAY else 3.5)
if all_valid or timed_out or SIMULATION:
if all_valid or timed_out or (SIMULATION and not REPLAY):
available_streams = VisionIpcClient.available_streams("camerad", block=False)
if VisionStreamType.VISION_STREAM_ROAD not in available_streams:
self.sm.ignore_alive.append('roadCameraState')

@ -273,7 +273,6 @@ CONFIGS = [
init_callback=controlsd_fingerprint_callback,
should_recv_callback=controlsd_rcv_callback,
tolerance=NUMPY_TOLERANCE,
simulation=False,
main_pub="can",
),
ProcessConfig(

@ -1 +1 @@
a683d689bd74ba5ba7c10bfad237aacc04b978c3
219a815856d8984cb4933d83db9a15bf7cd09f16

Loading…
Cancel
Save