  
    if pm is None:
      pm = messaging.PubMaster(['longitudinalPlan', 'liveLongitudinalMpc', 'lateralPlan', 'liveMpc'])
  
    sm['liveParameters'].valid = True
    sm['liveParameters'].sensorValid = True
    sm['liveParameters'].steerRatio = CP.steerRatio
    sm['liveParameters'].stiffnessFactor = 1.0
  
    while True:
      sm.update()
  
      if sm.updated['modelV2']:
        PP.update(sm, CP, VM)
 
</s> remove     sm = messaging.SubMaster(['carState', 'controlsState', 'radarState', 'modelV2', 'liveParameters'],
 </s> add     sm = messaging.SubMaster(['carState', 'controlsState', 'radarState', 'modelV2'], </s> remove       PP.update(sm, CP, VM)
      PP.publish(sm, pm)
 </s> add       lateral_planner.update(sm, CP)
      lateral_planner.publish(sm, pm) </s> remove   PL = Planner(CP)
  PP = LateralPlanner(CP)

  VM = VehicleModel(CP)
 </s> add   longitudinal_planner = Planner(CP)
  lateral_planner = LateralPlanner(CP) </s> remove       PL.update(sm, CP, VM, PP)
      PL.publish(sm, pm)
 </s> add       longitudinal_planner.update(sm, CP)
      longitudinal_planner.publish(sm, pm)
  
    if pm is None:
      pm = messaging.PubMaster(['longitudinalPlan', 'liveLongitudinalMpc', 'lateralPlan', 'liveMpc'])
  





    while True:
      sm.update()
  
      if sm.updated['modelV2']:
        PP.update(sm, CP, VM)
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 LateralPlanner should only compute curvature (#20289)

* get curvature from planner

* no need to check active

* remove that

* remove self

* liveParams not needed

* cast

* fix test bug

* fixes

* fix ui.py

* fix radians

* update refs

* update refs

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> 
selfdrive/controls/plannerd.py