      self.pid = PIController((CP.lateralTuning.pid.kpBP, CP.lateralTuning.pid.kpV),
                              (CP.lateralTuning.pid.kiBP, CP.lateralTuning.pid.kiV),
                              k_f=CP.lateralTuning.pid.kf, pos_limit=1.0, neg_limit=-1.0,
                              sat_limit=CP.steerLimitTimer)
      self.angle_steers_des = 0.
  
    def reset(self):
      self.pid.reset()
  
    def update(self, active, CS, CP, lat_plan):
 
</s> remove   def update(self, active, CS, CP, lat_plan):
 </s> add   def update(self, active, CS, CP, VM, params, lat_plan): </s> remove   def update(self, sm, CP, VM):
 </s> add   def update(self, sm, CP): </s> remove     self.angle_steers_des = 0.0
    self.angle_steers_des_mpc = 0.0
    self.angle_steers_des_time = 0.0
 </s> add     self.desired_curvature = 0.0
    self.desired_curvature_rate = 0.0 </s> remove   def update(self, sm, CP, VM, PP):
 </s> add   def update(self, sm, CP): </s> remove       self.angle_steers_des = lat_plan.steeringAngleDeg # get from MPC/LateralPlanner

 </s> add 
      self.pid = PIController((CP.lateralTuning.pid.kpBP, CP.lateralTuning.pid.kpV),
                              (CP.lateralTuning.pid.kiBP, CP.lateralTuning.pid.kiV),
                              k_f=CP.lateralTuning.pid.kf, pos_limit=1.0, neg_limit=-1.0,
                              sat_limit=CP.steerLimitTimer)

  
    def reset(self):
      self.pid.reset()
  
    def update(self, active, CS, CP, lat_plan):
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/lib/latcontrol_pid.py