#create subject in SUMO traci.person.add("subject", "CL", 80) traci.person.appendWalkingStage("subject", ["CL", "RC"], 60) #new iteration in SUMO traci.simulationStep() while traci.simulation.getMinExpectedNumber() > 0: #receive subject position from Unity message = socket.recv() subject = json.loads(message) #move subject to new position traci.person.moveToXY("subject", subject.edge, subject.x, subject.y, angle=subject.angle, keepRoute=3) #send position information of other pedestrians and vehicles to Unity send = sumoDataToUnity() socket.send_string(send) #new iteration in SUMO traci.simulationStep()