riebl / artery

OMNeT++ V2X simulation framework for ETSI ITS-G5
GNU General Public License v2.0
203 stars 129 forks source link

Sumo not found when running run_example #265

Closed MartinaBarbiFivecomm closed 1 year ago

MartinaBarbiFivecomm commented 1 year ago

Hi all, I have installed all the required packages and built correctly Omnetpp, artery and sumo. I have added the Omnetpp directory as well as the sumo one to the path in the .bashrc but then when I run make run_example from Artery build folder I get sumo not found as you can see in the attached capture.

So should I set the path somewhere in one of the artery file? Where is Artery looking for sumo? I have it installed in /home/martina.

Thanks in advance,

Martina Screenshot from 2022-11-21 16-16-38

kenog commented 1 year ago

Hi @MartinaBarbiFivecomm,

setting the PATH variable correctly should be fine. You need to add the bin folder inside SUMO's main directory. Did you do that? It should look something like /home/martina/sumo/bin. If you set it in your .bashrc you also need to restart your terminal for it to become effective.

Best regards Keno

MartinaBarbiFivecomm commented 1 year ago

Thank you for replying. Yes I had already set the path in the bashrc (see the attached pic, I tried with both commands on line 119 and 121) restarted the terminal, restarted the virtual machine, reinstalled sumo and artery but still getting the same error sh: 1: sumo not found. I`m not sure what I am doing wrong, as artery is able to find omnetpp but not sumo. Any help is appreciated.

Thank you very much,

Martina

Bashrc_file

hagau commented 1 year ago

@MartinaBarbiFivecomm Did you compile SUMO in release mode? If one compiles SUMO in debug mode, the binary is named sumoD, thus leading to this error message.

This happened to me more than once, by the way :smiley:

MartinaBarbiFivecomm commented 1 year ago

No, I compiled it using cmake ../.. not the debug mode

kenog commented 1 year ago

You set SUMO_HOME to the bin directory but not the PATH. I think your config should be:

export SUMO_HOME="/home/martina/sumo"
export PATH="$HOME/omnetpp-5.6.2/bin:$SUMO_HOME/bin:$PATH"
MartinaBarbiFivecomm commented 1 year ago

Thank you very much, that worked.! :) Sorry but it is the very first time for me working with Omnetpp and SUMO.

Thank you.!

riebl commented 1 year ago

For future reference: If you type which sumo in your terminal and it shows you the full path to your SUMO installation, then Artery can find the executable without any further hints too. If you have a very unusual setup and cannot modify the PATH variable for some reason, you may want to set the sumo parameter of the PosixLauncher module. That said, I never had a reason to do so.

PS: Thanks @kenog and @hagau for supporting @MartinaBarbiFivecomm so competently.