[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[sumo-dev] Sumo not opening properly while using python, please help :(
|
import osimport sysimport traciimport matplotlib.pyplot as pltfrom sumolib import checkBinaryimport datetime
# Path to the SUMO tools (change this according to your setup)sumo_tools_path = "C:/Program Files (x86)/Eclipse/Sumo/bin"
# Path to the SUMO simulation files (change this according to your setup)sumo_simulation_path = "C:/Users/Dani/Desktop/sumo_test1/try"
gui = Truemax_steps = 2500
# sumo things - we need to import python modules from the $SUMO_HOME/tools directoryif 'SUMO_HOME' in os.environ: tools = os.path.join(os.environ['SUMO_HOME'], 'tools') sys.path.append(tools)else: sys.exit("please declare environment variable 'SUMO_HOME'")
# setting the cmd mode or the visual mode if gui == False: sumoBinary = checkBinary('sumo')else: sumoBinary = checkBinary('sumo-gui') # setting the cmd command to run sumo at simulation timesumo_cmd = [sumoBinary, "-c", os.path.join(sumo_simulation_path, "sumocfg1.sumocfg"), "--no-step-log", "true", "--waiting-time-memory", str(max_steps)]
# Start the SUMO simulation#sumo_cmd = [os.path.join(sumo_tools_path, "sumo-gui"), "--remote-port", "0", "--start", "-c", os.path.join(sumo_simulation_path, "sumocfg1.sumocfg")]traci.start(sumo_cmd)
I tried both of the sumo_cmd commands from above, but the same results.
The sumo-gui opened but when i press start, i got this and nothing happens afterwards.
Can you please help me to find the problem and how to solve it?Thank you for your time and have a nice day,
A worried student.