Reputation: 31
When I run vanet_sumo.py downloaded from https://github.com/intrig-unicamp/mininet-wifi, it doesn't find SUMO and traCI connection fails.
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.
Ubuntu 22.04
Thank you.
Upvotes: 1
Views: 198
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.
Thank you.
Upvotes: 1