        output_steer = 0.0
        pid_log.active = False
        self.pid.reset()
      else:
        self.angle_steers_des = lat_plan.steeringAngleDeg # get from MPC/LateralPlanner
  
        steers_max = get_steer_max(CP, CS.vEgo)
        self.pid.pos_limit = steers_max
        self.pid.neg_limit = -steers_max
        steer_feedforward = self.angle_steers_des   # feedforward desired angle
        if CP.steerControlType == car.CarParams.SteerControlType.torque:
 
</s> remove     steering_angle = CS.steeringAngleDeg

 </s> add  </s> remove         error = self.angle_steers_des - angle_steers_k
 </s> add         error = desired_angle - angle_steers_k </s> remove     self.angle_steers_des = lat_plan.steeringAngleDeg - lat_plan.angleOffsetDeg
    steering_angle -= lat_plan.angleOffsetDeg
 </s> add     steering_angle_no_offset = CS.steeringAngleDeg - params.angleOffsetAverageDeg

    desired_angle = math.degrees(VM.get_steer_from_curvature(-lat_plan.curvature, CS.vEgo))

    instant_offset = params.angleOffsetDeg - params.angleOffsetAverageDeg
    desired_angle += instant_offset  # Only add offset that originates from vehicle model errors
        output_steer = 0.0
        pid_log.active = False
        self.pid.reset()
      else:


        steers_max = get_steer_max(CP, CS.vEgo)
        self.pid.pos_limit = steers_max
        self.pid.neg_limit = -steers_max
        steer_feedforward = self.angle_steers_des   # feedforward desired angle
        if CP.steerControlType == car.CarParams.SteerControlType.torque:
keep keep keep keep 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/lib/latcontrol_pid.py