mani varma
mani varma

Reputation: 31

Unable to connect SUMO with Mininet-wifi

When I run vanet_sumo.py downloaded from https://github.com/intrig-unicamp/mininet-wifi, it doesn't find SUMO and traCI connection fails.

enter image description here

I can run run sumo configuration file successfully using sumo-gui -c 'cfg_file.sumocfg' command in command line. I imported sumo class and the error happens here in the code.

enter image description here

enter image description here

Sumo version: v1.5 enter image description here

Ubuntu 22.04

Thank you.

Upvotes: 1

Views: 198

Answers (1)

mani varma
mani varma

Reputation: 31

Yes, we need to be root to run vanet_sumo.py. I understood the issue in my case.

Actually, the problem is when I print os.environ in checkBinary() method from mininet-wifi/mn-wifi/sumo/sumolib/sumolib.py file, it doesn't show up SUMO_HOME variable. It shows a few env variables but not SUMO_HOME env. However, when I print os.environ in general python3 command line, I see SUMO_HOME. This looked strange to me. I couldn't find reason for this.

Solution :

So, I added SUMO_HOME variable i.e sumo path using Python3 os library in the code itself before searching for sumo binary in the code. The code change is shared below. This way, I resolved the issue.

enter image description here

Thank you.

Upvotes: 1

Related Questions