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:
@@ -241,20 +241,23 @@ def main(demo=False):
|
||||
|
||||
sm.update(0)
|
||||
|
||||
# CLEARPILOT: two-state modeld — 0fps only when parked (ignition-on means
|
||||
# engine running in park; ignition-off stops modeld at the manager level).
|
||||
# Standstill in drive (red light) keeps running so lateral stays responsive
|
||||
# and liveCalibration/paramsd observations continue.
|
||||
parked = sm['carState'].gearShifter == car.CarState.GearShifter.park
|
||||
should_standby = parked
|
||||
# CLEARPILOT: power saving — three modes based on driving state
|
||||
# Full 20fps: lat active or lane changing
|
||||
# Reduced 4fps: not lat active, not standstill (driving without cruise)
|
||||
# Standby 0fps: standstill
|
||||
lat_active = sm['carControl'].latActive
|
||||
lane_changing = params_memory.get_bool("no_lat_lane_change")
|
||||
standstill = sm['carState'].standstill
|
||||
full_rate = lat_active or lane_changing
|
||||
|
||||
# Standby transitions (standstill only)
|
||||
should_standby = standstill and not full_rate
|
||||
if should_standby and not model_standby:
|
||||
params_memory.put_bool("ModelStandby", True)
|
||||
params_memory.put("ModelFps", "0")
|
||||
model_standby = True
|
||||
cloudlog.warning("modeld: standby ON")
|
||||
cloudlog.warning("modeld: standby ON (standstill)")
|
||||
elif not should_standby and model_standby:
|
||||
params_memory.put_bool("ModelStandby", False)
|
||||
params_memory.put("ModelFps", "20")
|
||||
model_standby = False
|
||||
run_count = 0
|
||||
frame_dropped_filter.x = 0.
|
||||
@@ -267,6 +270,19 @@ def main(demo=False):
|
||||
last_vipc_frame_id = meta_main.frame_id
|
||||
continue
|
||||
|
||||
# Reduced framerate: 4fps when not lat active and not standstill
|
||||
# Skip 4 out of every 5 frames (20fps -> 4fps)
|
||||
# Write standby timestamp so controlsd suppresses transient errors
|
||||
if not full_rate:
|
||||
now = _time.monotonic()
|
||||
if now - last_standby_ts_write > 1.0:
|
||||
params_memory.put("ModelStandbyTs", str(now))
|
||||
last_standby_ts_write = now
|
||||
if run_count % 5 != 0:
|
||||
last_vipc_frame_id = meta_main.frame_id
|
||||
run_count += 1
|
||||
continue
|
||||
|
||||
desire = DH.desire
|
||||
is_rhd = sm["driverMonitoringState"].isRHD
|
||||
frame_id = sm["roadCameraState"].frameId
|
||||
|
||||
Reference in New Issue
Block a user