mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
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 old-commit-hash: 72579a0e1081ecec5c414250831bedcecdc3bdc4
This commit is contained in:
+1
-1
Submodule cereal updated: c94c7c61cc...a2f1f0cb8d
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user