Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Lane change overtaking

Hello Mr. Erdmann,

Goodmorning,

I am a beginner with SUMO and i have tried the runner.py trafficlights example. I have created a basic scenario and when i try to run that there is no response on the screen. SUMO doesn't open at all and the terminal is blank. I have pasted a screenshot of it here and the .py program file. Please kindly help me to solve this.

image.png


Mit freundlichen Grüßen / Best Regards, 
Vasudhashri Vijayaragavan
(pronoun: she/her)
Mob: +49 176 2111 2718


On Tue, Nov 26, 2019 at 8:58 PM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
Bikes are allowed on regular roads by default. If the simulation does not load there is probably an error message that sheds light on the issue....

Am Di., 26. Nov. 2019 um 09:35 Uhr schrieb Vasudhashri Vijayaragavan <mail.vasudhashri@xxxxxxxxx>:
Hello all,

Goodday!
I have to create a scenario in SUMO with a lane change attribute to do car overtaking a bicycle. But when i input the parameters for bike without restricted lane, the simulation does not load. Are bikes not allowed on regular roads in SUMO? Please advise.


Mit freundlichen Grüßen / Best Regards, 
Vasudhashri Vijayaragavan

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
#!/usr/bin/env python

import os
import sys
import optparse
import subprocess
import random


os.system("export SUMO_HOME=/home/z-fcc//Documents/libraries/sumo-src-1.2.0/sumo-1.2.0")
if 'SUMO_HOME' in os.environ:
    tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
    sys.path.append(tools)
else:
    sys.exit("please declare enironment variable 'SUMO_HOME'")

from sumolib import checkBinary
import traci
import traci.constants as tc

def get_options():
    opt_parser = optparse.Optionparser()
    opt_parser.add_option("--nogui", action="store_true",
                          default=false, help="run the commandline version of sumo")
    options, args = opt_parser.parse_args()
    return options

# TraCI control loop

def run():

    step = 0
    while traci.simulation.getMinExpectedNumber() > 0:
        traci.simulationStep()
        print(step)
        step += 1
        
    traci.close()
    sys.stdout.flush()

#main entry point

    if __name__ == "__main__":
        options = get_options()

        if options.nogui:
            sumoBinary = checkBinary('sumo')
        else:
            sumoBinary = checkBinary('sumo-gui')

            traci.start([sumoBinary, "-c", "intersection.sumocfg",
                         "--tripinfo-output", "tripinfo.xml"])
            run()

Back to the top