Search code examples
omnet++veinssumo

New map in veins example does not start automatically with QTenv launch, how to do that?


I created a map with osmWebWizard.py and that's working well in Sumo. When importing it in veins example and hit "Play/Start" on the simulation nothing happens until I also hit the Start button in Sumo-gui as well. If I never hit it in Sumo, QTenv is going to "Not respond" or crash. Why is this happening? Can it be changed manually?

Also obstacles are not being recognized as expected, although the *.poly.xml file exists and also I've built myself with polyconvert function. That's why I also tried GatcomSUMO but on my system is not working very well, I'm on Linux, while in the video Windows is being used and the process seems pretty straight forward. After a series of warnings I'm getting an error. Here is the log:

    Creating network ...
$ /usr/share/sumo/bin/netconvert --osm-files erlangen.osm.xml --output-file erlangen.net.xml --type-files /usr/share/sumo/data/typemap/osmNetconvert.typ.xml --geometry.remove --roundabouts.guess --ramps.guess --junctions.join --tls.guess-signals --tls.discard-simple --tls.join --no-internal-links --remove-edges.by-type rail,rail_urban,rail_electric,railway.tram,railway.subway --remove-edges.by-vclass rail,rail_electric,bicycle,pedestrian
Warning: Discarding unknown compound 'cycleway.track' in type 'cycleway.track|highway.tertiary' (first occurence for edge '3013106').
Warning: Discarding unknown compound 'cycleway.track' in type 'cycleway.track|highway.primary' (first occurence for edge '3168871').
Warning: Discarding unknown compound 'cycleway.track' in type 'cycleway.track|highway.residential' (first occurence for edge '3998612').
Warning: Discarding unknown compound 'cycleway.opposite' in type 'cycleway.opposite|highway.residential' (first occurence for edge '4006673').
Warning: Discarding unknown compound 'cycleway.lane' in type 'cycleway.lane|highway.tertiary' (first occurence for edge '4006703').
Warning: Discarding unusable type 'waterway.stream' (first occurence for edge '28632099').
Warning: Discarding unusable type 'waterway.drain' (first occurence for edge '136977169').
Warning: Ambiguous railway kilometrage direction for way '217862938' (assuming forward)
Warning: Discarding unusable type 'waterway.ditch' (first occurence for edge '220796507').
Warning: Ambiguous railway kilometrage direction for way '318769938' (assuming forward)
Warning: Discarding unusable type 'railway.platform' (first occurence for edge '318770835').
Warning: Ambiguous railway kilometrage direction for way '318771692' (assuming forward)
Warning: Discarding unusable type 'highway.road' (first occurence for edge '801917256').
Warning: Invalid color value 'maroon' in relation 77908
Warning: No way found for reference '52907459' in relation '457145'
Warning: No way found for reference '237465867' in relation '457145'
Warning: Ignoring restriction relation '457145' with unknown from-way.
Warning: Ignoring restriction relation '457145' with unknown to-way.
Warning: Invalid color value 'maroon' in relation 539311
Warning: Invalid color value 'maroon' in relation 539312
Warning: direction of restriction relation could not be determined
Warning: Ignoring restriction relation '1670008'.
Warning: No way found for reference '226761695' in relation '3465387'
Warning: No way found for reference '15259223' in relation '3465387'
Warning: Ignoring restriction relation '3465387' with unknown from-way.
Warning: Ignoring restriction relation '3465387' with unknown to-way.
Warning: No way found for reference '32322083' in relation '4605132'
Warning: No node found for reference '277349616' in relation '4605132'.
Warning: Ignoring restriction relation '5271289' with unknown from-way.
Warning: Ignoring restriction relation '5271289' with unknown to-way.
Warning: direction of restriction relation could not be determined
Warning: Ignoring restriction relation '5493089'.
Warning: Invalid color value 'maroon' in relation 10452312
Warning: Invalid color value 'maroon' in relation 10452313
Warning: direction of restriction relation could not be determined
Warning: Ignoring restriction relation '10792693'.
Warning: Ignoring restriction relation '12631516' with unknown from-way.
Warning: Ignoring restriction relation '12631516' with unknown to-way.
Warning: Ignoring restriction relation '12631517' with unknown from-way.
Warning: Ignoring restriction relation '12631517' with unknown to-way.
Warning: Not joining junctions 1391319807,8202614797 (only 1 edge within and no cross-traffic).
Warning: Not joining junctions 2734068873,4362487943,8786465551 (not compact (maxEdge=437892677 length=6.33)).
Warning: Not joining junctions 8202614798,8202614802 (only 1 edge within and no cross-traffic).
Warning: Ambiguity in turnarounds computation at junction '2522148710'.
Warning: Ambiguity in turnarounds computation at junction '3243159704'.
Warning: Ambiguity in turnarounds computation at junction '3382948452'.
Warning: Ambiguity in turnarounds computation at junction '347788385'.
Warning: Ambiguity in turnarounds computation at junction '399712470'.
Warning: Found sharp turn with radius 7.54 at the end of edge '-1006523085'.
Warning: Found sharp turn with radius 4.10 at the start of edge '-147640263'.
Warning: Found sharp turn with radius 8.96 at the start of edge '-147640276#1'.
Warning: Found sharp turn with radius 3.85 at the end of edge '-225465769'.
Warning: Found angle of 130.08 degrees at edge '-244945463#2', segment 1.
Warning: Found sharp turn with radius 3.56 at the end of edge '-244945463#2'.
Warning: Found sharp turn with radius 3.85 at the start of edge '-257301058#0'.
Warning: Found sharp turn with radius 5.59 at the start of edge '-298083052#1'.
Warning: Found sharp turn with radius 8.90 at the end of edge '-3013107#1'.
Warning: Found sharp turn with radius 7.12 at the end of edge '-31309439#0'.
Warning: Found angle of 113.73 degrees at edge '-32611578#0', segment 0.
Warning: Found sharp turn with radius 7.85 at the start of edge '-32611578#0'.
Warning: Found angle of 113.90 degrees at edge '-331643070#0', segment 1.
Warning: Found angle of 119.35 degrees at edge '-530255016', segment 1.
Warning: Found angle of 100.11 degrees at edge '-777352091', segment 0.
Warning: Lane '-831711750_0' is not connected from any incoming edge at junction '3596313357'.
Warning: The traffic light 'joinedS_0' cannot be adapted to a cycle time of 90.00.
Warning: The traffic light 'joinedS_0' has a high cycle time of 280.00.
Warning: 13 total messages of type: Ambiguity in turnarounds computation at junction '%'.
Warning: 15 total messages of type: Discarding unknown compound '%' in type '%' (first occurence for edge '%').
Warning: 7 total messages of type: Discarding unusable type '%' (first occurence for edge '%').
Warning: 12 total messages of type: Found angle of % degrees at edge '%', segment %.
Warning: 14 total messages of type: Found sharp turn with radius % at the end of edge '%'.
Warning: 25 total messages of type: Found sharp turn with radius % at the start of edge '%'.
Warning: 6 total messages of type: Ignoring restriction relation '%' with unknown from-way.
Warning: 6 total messages of type: Ignoring restriction relation '%' with unknown to-way.
Warning: 14 total messages of type: Invalid color value '%' in relation %
Warning: 14 total messages of type: No way found for reference '%' in relation '%'
free(): invalid pointer
Success.
Failed (1529 ms.)

Solution

  • To allow QTenv to run both Omnet++ simulation and SUMO it's important to set the <gui_only> parameters in the *.sumo.cfg file. By default osmWebWizard tool is pointing to the *.view.xml file, which is left to be modified by the user.

    The solution is to add the following lines in the sumocfg file:

    <gui_only>
            <start value="true"/>
    </gui_only>
    

    For those who want to give a try to GatcomSUMO, you have this parameter in the OMNeT++ tab, check the following screen: GatcomSUMO Omnet++ tab

    Here is a video showing how to use GatcomSUMO in Linux. It's important to copy .jar and src sumo folder in the same directory, this is what I was missing.