BMEAutomatedDrive / SUMO-Unity3D-connection

This example demonstrates real-time communication between the microscopic traffic simulator SUMO and the 3D game engine Unity 3D with Python 3.7 based TCP/IP server. Video about the example: https://www.youtube.com/watch?v=4RiJyDnm41Q
Other
97 stars 29 forks source link

Cannot run Main.exe #2

Open Ma-Pe-Ma opened 4 years ago

Ma-Pe-Ma commented 4 years ago

I cannot run the MAIN.exe which starts the Sumo simulation. I got the following message: "C:\Users...\AppData\Local\Temp_MEI125042\sumolib__init__.py:28: UserWarning: No module named 'matplotlib'".

So I installed Python (ver. 3.7.9) and matplotlib (with pip) but I get the same error message and I cannot figure it out what causes this problem.

BMEAutomatedDrive commented 3 years ago

Dear Péter,

I could reproduce the error and it seems that it is related to python version and interpreter. Matplotlib shouldn't be necessary for this program. Try running the program not from the prebuilt exe but the source from command window.

rafalimaz commented 3 years ago

@Ma-Pe-Ma ,

I could reproduce the error. So I did what @BMEAutomatedDrive suggested but I could not execute SUMO from source code. Than I figured out that the problem was related to SumoBinary path. In order to make it to work it is necessary to put SUMO Instalation folder on path C:/Sumo as already mentioned on https://github.com/BMEAutomatedDrive/SUMO-Unity3D-connection#sumo

In summary, the steps to execute the simulation are: 1) Make sure SUMO Instalation path is on C:/Sumo 2) Execute Main.py script (can be either via command line or PyCharm, for instance via command line is "python Main.py"). If it is correct, SUMO will open running the scenario "Network_01.sumocfg" 3) Unzip Unity Executables folder 4) Run Unity_Sumo_Python_Demo.exe file

msnir009 commented 2 years ago

Hi, nice work! and i also have the same problem that the main.exe file simply crashes upon clicking and i have no error messages. i have my SUMO installed in a different directory. will this mean that I will need to reinstall SUMO on C or can I just move the folders to the intended directory? thank you.