  
    VM = VehicleModel(CP)
  
    if sm is None:
      sm = messaging.SubMaster(['carState', 'controlsState', 'radarState', 'modelV2', 'liveParameters'],
                               poll=['radarState', 'modelV2'])
  
    if pm is None:
      pm = messaging.PubMaster(['longitudinalPlan', 'liveLongitudinalMpc', 'lateralPlan', 'liveMpc'])
  
 
</s> remove   PL = Planner(CP)
  PP = LateralPlanner(CP)

  VM = VehicleModel(CP)
 </s> add   longitudinal_planner = Planner(CP)
  lateral_planner = LateralPlanner(CP) </s> remove   sm['liveParameters'].valid = True
  sm['liveParameters'].sensorValid = True
  sm['liveParameters'].steerRatio = CP.steerRatio
  sm['liveParameters'].stiffnessFactor = 1.0

 </s> add  </s> remove     plan_send.valid = sm.all_alive_and_valid(service_list=['carState', 'controlsState', 'liveParameters', 'modelV2'])
 </s> add     plan_send.valid = sm.all_alive_and_valid(service_list=['carState', 'controlsState', 'modelV2']) </s> remove       solution->tire_angle_rate[i] = acadoVariables.u[i];
 </s> add       solution->curvature_rate[i] = acadoVariables.u[i]; </s> remove   def update(self, sm, CP, VM, PP):
 </s> add   def update(self, sm, CP):
    sm = messaging.SubMaster(['carState', 'controlsState', 'radarState', 'modelV2'],
  
    VM = VehicleModel(CP)
  
    if sm is None:
    sm = messaging.SubMaster(['carState', 'controlsState', 'radarState', 'modelV2'],
                               poll=['radarState', 'modelV2'])
  
    if pm is None:
      pm = messaging.PubMaster(['longitudinalPlan', 'liveLongitudinalMpc', 'lateralPlan', 'liveMpc'])
  
keep keep keep keep 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