      solution->y[i] = acadoVariables.x[i*NX+1];
      solution->psi[i] = acadoVariables.x[i*NX+2];
      solution->tire_angle[i] = acadoVariables.x[i*NX+3];
      if (i < N){
        solution->tire_angle_rate[i] = acadoVariables.u[i];
      }
    }
    solution->cost = acado_getObjective();
  
    // Dont shift states here. Current solution is closer to next timestep than if
 
</s> remove     # reset to current steer angle if not active or overriding
    if active:
      curvature_desired = next_curvature
      desired_curvature_rate = next_curvature_rate
    else:
      curvature_desired = measured_curvature
      desired_curvature_rate = 0.0

    # negative sign, controls uses different convention
    self.desired_steering_wheel_angle_deg = -float(math.degrees(curvature_desired * VM.sR)/curvature_factor) + steering_wheel_angle_offset_deg
    self.desired_steering_wheel_angle_rate_deg = -float(math.degrees(desired_curvature_rate * VM.sR)/curvature_factor)
 </s> add     self.desired_curvature = next_curvature
    self.desired_curvature_rate = next_curvature_rate </s> remove     sm = messaging.SubMaster(['carState', 'controlsState', 'radarState', 'modelV2', 'liveParameters'],
 </s> add     sm = messaging.SubMaster(['carState', 'controlsState', 'radarState', 'modelV2'], </s> remove   sm['liveParameters'].valid = True
  sm['liveParameters'].sensorValid = True
  sm['liveParameters'].steerRatio = CP.steerRatio
  sm['liveParameters'].stiffnessFactor = 1.0

 </s> add  </s> remove   PL = Planner(CP)
  PP = LateralPlanner(CP)

  VM = VehicleModel(CP)
 </s> add   longitudinal_planner = Planner(CP)
  lateral_planner = LateralPlanner(CP) </s> remove     self.cur_state.curvature = interp(DT_MDL, self.t_idxs[:MPC_N+1], self.mpc_solution.curvature)
 </s> add     self.cur_state.curvature = interp(DT_MDL, self.t_idxs[:MPC_N + 1], self.mpc_solution.curvature)
      solution->curvature_rate[i] = acadoVariables.u[i];
      solution->y[i] = acadoVariables.x[i*NX+1];
      solution->psi[i] = acadoVariables.x[i*NX+2];
      solution->tire_angle[i] = acadoVariables.x[i*NX+3];
      if (i < N){
      solution->curvature_rate[i] = acadoVariables.u[i];
      }
    }
    solution->cost = acado_getObjective();
  
    // Dont shift states here. Current solution is closer to next timestep than if
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/lateral_mpc/lateral_mpc.c