      self.ts = 1. / self.rate
      time.sleep(1)
      self.sm = messaging.SubMaster(['longitudinalPlan'])
  
      # make sure planner has time to be fully initialized
      # TODO planner should just be explicitly initialized
      for i in range(10000):
        assert i < 10000
        radar = messaging.new_message('radarState')
        control = messaging.new_message('controlsState')
        car_state = messaging.new_message('carState')
        control.controlsState.longControlState = LongCtrlState.pid
        control.controlsState.vCruise = speed*3.6
        car_state.carState.vEgo = self.speed
        Plant.radar.send(radar.to_bytes())
        Plant.controls_state.send(control.to_bytes())
        Plant.car_state.send(car_state.to_bytes())
  
    def current_time(self):
      return float(self.rk.frame) / self.rate
  
    def step(self, v_lead=0.0):
 
</s> remove     car_state.carState.vEgo = self.speed
    Plant.radar.send(radar.to_bytes())
    Plant.controls_state.send(control.to_bytes())
    Plant.car_state.send(car_state.to_bytes())
 </s> add     car_state.carState.vEgo = float(self.speed) </s> remove     self.sm.update()
    while True:
      time.sleep(0.01)
      if self.sm.updated['longitudinalPlan']:
        plan = self.sm['longitudinalPlan']
        self.speed = plan.speeds[5]
        self.acceleration = plan.accels[5]
        fcw = plan.fcw
        break
 </s> add     sm = {'radarState': radar.radarState,
          'carState': car_state.carState,
          'controlsState': control.controlsState}
    self.planner.update(sm, self.CP)
    self.speed = self.planner.v_desired
    self.acceleration = self.planner.a_desired
    fcw = self.planner.fcw </s> remove     put_default_car_params()
    managed_processes['plannerd'].start()

    valid = man.evaluate()

    managed_processes['plannerd'].stop()
 </s> add     valid, _ = man.evaluate() </s> remove   def __init__(self, CP):
 </s> add   def __init__(self, CP, init_v=0.0, init_a=0.0): </s> remove from selfdrive.manager.process_config import managed_processes


def put_default_car_params():
  from selfdrive.car.honda.values import CAR
  from selfdrive.car.honda.interface import CarInterface
  cp = CarInterface.get_params(CAR.CIVIC)
  Params().put("CarParams", cp.to_bytes())
 </s> add 
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
      self.ts = 1. / self.rate
      time.sleep(1)
      self.sm = messaging.SubMaster(['longitudinalPlan'])
  
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
    from selfdrive.car.honda.values import CAR
    from selfdrive.car.honda.interface import CarInterface
    self.CP = CarInterface.get_params(CAR.CIVIC)
    self.planner = Planner(self.CP, init_v=self.speed)
  
    def current_time(self):
      return float(self.rk.frame) / self.rate
  
    def step(self, v_lead=0.0):
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Dont run plannerd for long tests (#22260) 
selfdrive/test/longitudinal_maneuvers/plant.py