MCPcopy Create free account
hub / github.com/PJLab-ADG/OASim / startSimulate

Method startSimulate

hmi/routeEdit/gui.py:211–227  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

209 CHOOSE_STATE = chooseType.Normal
210
211 def startSimulate(self):
212 self.centralWidget().isSimulation = True
213 self.startBtn.setEnabled(False)
214 self.destBtn.setEnabled(False)
215 self.okBtn.setEnabled(False)
216 global START_LANE, ARRIVAL_LANE
217 startEdge = START_LANE.split("_")[0]
218 startLane = START_LANE.split("_")[1]
219 endEdge = ARRIVAL_LANE.split("_")[0]
220 endLane = ARRIVAL_LANE.split("_")[1]
221 self.model.ego.end_lane = ARRIVAL_LANE
222 self.model.findNewRoute(startEdge, startLane, endEdge, endLane)
223 self.centralWidget().selectableLanes.clear()
224 self.timer = QTimer()
225 self.timer.timeout.connect(self.model_move_step)
226 self.model.start()
227 self.timer.start(10)
228
229 def model_move_step(self):
230 if not self.model.tpEnd and self.model.is_gui_running:

Callers

nothing calls this directly

Calls 2

findNewRouteMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected