How to Create a Network and Simulation in SUMO Using OpenStreetMap - Sottotitoli bilingue

Hi everybody in this video, we're going to learn how to take a map from OpenStreetMap and turn it into a sumo simulation.
So right now I am on OpenStreetMap.org and I'm actually right in, I went straight to downtown Orlando.
I chose Orlando because one,
I here and two this is actually a very very complete map and I don't want to spend
a lot of time in this video processing the map for sumo so this is actually a
very good map so what I want to do is I want to click
and I am going to manually select an area and I'm gonna go from Robinson Street all the way down to South Street and if you can see here you'll notice like these are one-way
streets so South Street is actually a-way street.
Rosalinds a one-way street.
This is south orange blossom.
So this is actually nice because it's actually going to Mess with the flow.
So it's not going to be just a really simple Everything's a grid.
So this is actually a nice map here.
So after I've selected the area that I want I am going to click export.
So what will happen is you get to download the OSM file.
So this is downtown Orlando.
I have it downloaded here.
So we'll just download read over it.
So now the OSM file has been downloaded.
loaded.
So the data sometimes in OpenStreetMap is not completely ready for traffic simulation.
And in this case, this actually has a lot of the information that we need, but you can enhance that information.
So you can do this by using JOSM,
which is a Java,
it's a Java tool for editing So you can open your open street map file and then the data sent will be rendered and if you had any warnings
You can see the warnings around it.
You can also just see all the information here So we click into one of those one-way roads that I was pointing at so this is south orange blossom
the south orange blossom you can see that I want it to highway its value is a
primary highway it has three lanes it has the speed limit on it and you can
see that it is
it actually holds information around like what asphalt type is and this has all actually been
provided by users so people go in and they provide this information so depending on where
you're hoping to export that data if it's a less popular area you probably aren't going to have
as much contributions to it so maybe you will have to contribute to it and I would suggest just going to
OpenStreetMap and reading about how you can contribute to these maps.
If we open up the OSM file and view it in Notepad...
You can see that it's an XML file and it holds all the nodes and coordinates and information about it.
Naturally, within here you can actually see the users who contributed to that node information.
So this is really nice.
If you wanted to, you could remove unnecessary objects like this is the fountain in Lake Yola.
We don't really need it for our simulation, so we could remove it.
But a lot of this information will actually be deleted for us when we are running NetConvert in summa.
So let's run NetConvert.
So we're going to open up the command line right here and we're going to run our NetConvert operator.
Now we're going to do the portion of this.
We're just going to use the OSM file,
but you can use different options and specify specific rules around the highways and motorways and how the speed limit would be
different for if it's primary versus secondary, just how the speed limits may be or number of lanes.
We're going to just use this OSM file.
So we are going to type net convert dash dash OSM dash files and then the file name
in this kit is going to be downtown dot OSM.
And then we need to give an output file.
So this will be dash dash output file and it will be, let's call it down town.net.xml.
And then you can tell different options for it.
So in this case, we're going to say geometry dot remove.
And I don't think there are any roundabouts, but if there is, we're gonna write roundabouts.
Don't guess.
It's just guessing on how the And if there's ramps,
I selected specifically areas that were not part of the ramps,
but just in case, if there's ramps, we're going to tell it to guess as well.
And then rules around the junction.
So let's say junctions are going to join, and we'll let it guess our traffic light signal.
So that's TLS dot guess.
signals.
And then we'll say traffic like signals, discard the simple ones.
and with also join our traffic light signals.
Now, these are a lot of options and you can read up on everyone and there's even more to it.
These are just the ones that I think of as standard when I am converting an OSM file to a sumo network file.
So we have a lot of warnings but it is successful at the end.
So let's open up our sumo GUI and see what this network is.
So here is the generated network file and actually some of the footpaths, the information within OSM went beyond our line, but that's okay.
So this is overall Orlando, downtown Orlando map.
You can even see the outline because these are the footpaths, the sidewalks around the lake that we captured.
So we can see all this information and this is now the network for our sumo map.
Now if you want it to, you can read through all of these warnings and I actually suggest that you do read through these warnings.
so that you can understand them.
It gives you an idea how you can improve this map to make it more suitable for a sumo.
So, for instance, if we go up here, it didn't know what a cycle wave was.
So, it had this cycle wave which was the bike path.
So, there was a bike path and had rules around it so it didn't understand what those compounds meant.
There a warning where they weren't able to find a way to get from one reference to another
in relation to each other so there was a path that didn't they didn't know how to create.
The junctions weren't able to join.
We have to ambiguity with turnarounds and then there's some very sharp turns.
But you can see there's some paths that have extremely sharp turns because those are more of a walk.
way.
So they found some sharp turns or angles that were strange.
All these things you can look at and you can slowly clean it up especially it labels the edges so you can know how to clean up
how to make it a better file for Sumo.
So now that we've created the Sumo network based on OpenStreetMap let's create some trips on it.
So we're going to use Sumo's random trips Python script.
So here I'm going to write random And then I'm going to pass in the network file, in this case this is downtown.com.
dot XML.
So make this a rather large trip because we might lose a lot to invalid roots So I'm gonna actually make this about a thousand and then I am going to do our output to
be Downtown
dot trips
dot XML So after we've created these trips we need to convert them to roots so we're gonna do that with the do a router.
We're going to take in our network file again, which is downtown dot net dot XML.
And then our root file, which will be down town dot trips dot XML.
and then our output will be our root file,
so that will be downtown.ru.xml and we have a little bit of errors because we're gonna actually have some roots that aren't good,
so I just forgot to add which a flag to ignore errors.
So now we have built a root file for our network,
and a few of the vehicles did not actually have a valid root,
so we have a few that didn't have a connection, and that's fine.
So finally, we have the last part of our tutorial is to create our sumo configuration.
So let's go to our file here and we're going to make a new document and this will be downtown.com.
sumo.c of g.
And we're going to add the XML in this, need it to configure our simulation.
In this case, this will be our configuration.
And I made this be 1000 seconds.
So I'm going to just make our end time be 1000.
So we're going to save this and then let's open up this simulation in sumo.
open this sumo simulation.
So here is our sumo file.
Let's zoom in a little bit and we can watch our vehicles and they're moving very very quickly but you could see the vehicles
going there.
Zoom in a little bit.
You can see The vehicles that were traveling along.
So congratulations You have just learned how to take a map from OpenStreetMap and turn it into a sumo simulation
With this tiny tutorial you should be able to go forward and make some more complex simulation
Lingua di traduzione
Seleziona la lingua di traduzione

Sblocca altre funzionalità

Installa l'estensione Trancy per sbloccare altre funzionalità, tra cui sottotitoli AI, definizioni di parole AI, analisi grammaticale AI, parlato AI, ecc.

feature cover

Compatibile con le principali piattaforme video

Trancy non fornisce solo supporto per sottotitoli bilingue su piattaforme come YouTube, Netflix, Udemy, Disney+, TED, edX, Kehan, Coursera, ma offre anche traduzione di parole/frasi AI, traduzione immersiva a tutto testo e altre funzionalità per pagine web regolari. È un vero assistente per l'apprendimento delle lingue tutto in uno.

Tutti i browser delle piattaforme

Trancy supporta tutti i browser delle piattaforme, inclusa l'estensione per il browser iOS Safari.

Modalità di visualizzazione multiple

Supporta modalità teatro, lettura, mista e altre modalità di visualizzazione per un'esperienza bilingue completa.

Modalità di pratica multiple

Supporta dettatura di frasi, valutazione orale, scelta multipla, dettatura e altre modalità di pratica.

Sommario video AI

Utilizza OpenAI per riassumere i video e comprendere rapidamente i contenuti chiave.

Sottotitoli AI

Genera sottotitoli AI precisi e veloci per YouTube in soli 3-5 minuti.

Definizioni di parole AI

Tocca le parole nei sottotitoli per cercarne le definizioni, con definizioni alimentate da AI.

Analisi grammaticale AI

Analizza la grammatica delle frasi per comprendere rapidamente il significato delle frasi e padroneggiare punti grammaticali difficili.

Altre funzionalità web

Oltre ai sottotitoli video bilingue, Trancy fornisce anche traduzione di parole e traduzione a tutto testo per pagine web.

Pronto per iniziare

Prova Trancy oggi e scopri le sue funzionalità uniche

Scarica