revert modeld/controlsd/plannerd/locationd to first-commit baseline
Starting point for rebuilding self-drive from a known-good baseline.
Reverts the following to their state at f46339c:
- selfdrive/modeld/modeld.py (constant 20fps, no variable-rate / standby skip)
- selfdrive/modeld/dmonitoringmodeld.py (no carState sub, no standstill skip)
- selfdrive/controls/controlsd.py (no parked-cycle skip, no FPCC hoisting, no MDPS split)
- selfdrive/controls/lib/longitudinal_planner.py
- selfdrive/locationd/calibrationd.py (valid = sm.all_checks again)
- selfdrive/locationd/paramsd.py
- selfdrive/locationd/torqued.py
All non-self-drive features (thermald fan control, speed limit controller,
cruise warning signs, UI state transitions, GPS fixes, ClearPilot menu,
dashcamd, telemetry, etc.) remain as-is on this branch — only the 4 core
self-drive processes are reverted.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -128,14 +128,10 @@ def main():
|
||||
assert vipc_client.is_connected()
|
||||
cloudlog.warning(f"connected with buffer size: {vipc_client.buffer_len}")
|
||||
|
||||
sm = SubMaster(["liveCalibration", "carState"])
|
||||
sm = SubMaster(["liveCalibration"])
|
||||
pm = PubMaster(["driverStateV2"])
|
||||
|
||||
calib = np.zeros(CALIB_LEN, dtype=np.float32)
|
||||
# CLEARPILOT: cache last model output so we can republish (not re-infer) at standstill.
|
||||
# Saves ~7% CPU; downstream dmonitoringd sees a steady 10Hz stream with known-good
|
||||
# last readings (driver can't become distracted relative to a stopped car).
|
||||
last_model_output = None
|
||||
# last = 0
|
||||
|
||||
while True:
|
||||
@@ -147,16 +143,8 @@ def main():
|
||||
if sm.updated["liveCalibration"]:
|
||||
calib[:] = np.array(sm["liveCalibration"].rpyCalib)
|
||||
|
||||
standstill = sm["carState"].standstill
|
||||
|
||||
t1 = time.perf_counter()
|
||||
if standstill and last_model_output is not None:
|
||||
# CLEARPILOT: reuse last inference at standstill
|
||||
model_output = last_model_output
|
||||
dsp_execution_time = 0.0
|
||||
else:
|
||||
model_output, dsp_execution_time = model.run(buf, calib)
|
||||
last_model_output = model_output
|
||||
model_output, dsp_execution_time = model.run(buf, calib)
|
||||
t2 = time.perf_counter()
|
||||
|
||||
pm.send("driverStateV2", get_driverstate_packet(model_output, vipc_client.frame_id, vipc_client.timestamp_sof, t2 - t1, dsp_execution_time))
|
||||
|
||||
Reference in New Issue
Block a user