Traffic Simulation with SUMO, NETEDIT, and TraCI
Vložit
- čas přidán 24. 07. 2024
- This video assumes you have a working SUMO installation but assumes no other prior experience with the SUMO toolkit. It covers how to build a simple network in Netedit, how to define vehicles and routes and configure a simple SUMO simulation, and then finally how to make dynamic changes to a running SUMO simulation via TraCI.
Note: I think this video may have been uploaded with only the left channel audio. To fix this, set your audio settings on your machine to Mono. Easy enough to do on Windows, Mac, Linux.
CODE ====== github.com/avcourt/traci-demo
SUMO ===== sumo.dlr.de/
NETEDIT === sumo.dlr.de/wiki/NETEDIT
TraCI ====== sumo.dlr.de/wiki/TraCI
Have any questions? Join my Discord server.
Discord ===== / discord
Follow me on Twitter ===== / avcourt - Věda a technologie
I think this video may have been uploaded with only the left channel audio. To fix this, set your audio settings on your machine to Mono. Easy enough to do on Windows, Mac, Linux. Don't think I can fix this on my end, at least without some more investigation into YT studio.
Thankyou that helped!
The best Sumo tutorial I found, I was really helpful for me. Thank you.
You are most welcome my dude! Glad you found it helpful!
Very informative tutorial! Thanks!
Glad to hear it!
This helped me so much. Thanks a lot!
Thanks for this video!!
thank you bro. this video is very helpful
Glad you found it useful bro!
One of the best SUMO tutorials! I have a doubt how to define the routes in when it is large network that is where I have downloaded from open street map. Please provide with your feedback
Kshama Ramesh hello Ramesh ... did you get to figure how to work on this please ... even I have same doubt kindly reply
thank you thank you thank you , you saved my life !!!
Hi Your video was very helpful to me..
Can you simulate a two vehicles collision and other vehicles receive message about collision occurred and change lane / re-route ..
Thank You
how did you run the control loop?
what shortcut was it?
Thanks for this video. I want your help. I have a long route for a vehicle. Can i set a travel time for each edge in this route?
Hey there! Join the Discord server. discord.gg/aw65dCf Myself or someone else would be happy to help!
can you make a video showing how we can add RSU on the road ?
Can we simulate communication between vehicle and cloud computing i n sumo
how do you create the diferent files like .rou.xml or .sumocfg when you save the network in .net.xml? Thanks!
Hey BIGROLDAN. These are all separate files. Netedit creates the .net.xml file and routes are specified manually in a .rou.xml. The SUMO simulator itself expects a .sumo.cfg file which is where the user specifies the names of network, additionals, and route files. See my Github repo ( github.com/avcourt/traci-demo) of this tutorial for a typical SUMO/TraCI project structure. Also, I have set up a Discord server dedicated to SUMO/TraCI. Feel free to join and ask questions! discord.gg/aw65dCf
Thank you, really useful!
can I ask something please
Hi Avcourt, Your tutorial helped me start my project but I am kinda stuck in the middle of nowhere. I am working with an intersection. I added some vehicles and routes using TraCI but I want to full control their speeds and not the car-following model. I want to set desired speeds, before the intersection and at the intersection (slower here), based on some conditions. Can you please guide me?
Thanks.
can you able to do it
Can you show EV implementation Charge Stations an Electronic Vehicles etc. on SUMO
Hi, I want to open my network (I created manually via netconvert) in pycharm. How can I do that? and how to open my my_config.sumocfg file? that you do at the beginning of the video?
You can open networks for editing in NETEDIT. sumocfg files are what you load into SUMO itself. Feel free to join my Discord server to continue this discussion. discord.gg/aw65dCf
when I save net edit file it says permission denied, help me what to do??
Hi, I am currently working on intelligent traffic signal optimization by using PSO. could you please help me regarding, how could we compute PSO code in SUMO for simulations???
i'd love to continue this discussion. Please feel free to join the discord server I have set up for SUMO. discord.gg/aw65dCf
Keep up the good work. I am currently trying to implement a neural network model with genetic learning to control individual vehicles. What are your thoughts on implementing such a system? Thanks!
certainly possible. Implement the GA algo in a TraCI program and once paths have been calculated for vehicles, have them rerouted via the TraCI change vehicle state API calls.
Hi Mohit, what you want to do seems very interesting, can you please let me know more about it? did you run your idea/
I cannot change the lane, I write 3 but it's getting back to 1 again if I select next edge?
If you'd like some help troubleshooting, join my Discord server. Myself or one of the active members would be happy to lend a hand! discord.gg/aw65dCf
I am starting a project and you have literally made my life easier! thanks alot!
but what exactly is this black window where you set the env. variables? and do I need it every time I create a project? Cheers!
Hi WeesH, In this example I am running SUMO in a Linux environment.If you are developing on Windows with SUMO 0.1.23 or later there is a file called ''start-command-line.bat' in the /bin folder of the installation that sets up your environment and allows you to execute programs from the cmd window. I have a Discord server set up. Feel free to join and ask questions! discord.gg/sfQsNW
@@avcourt3154got it, thanks!
@@avcourt3154 Hello, great video.
i could not find out the file called ''start-command-line.bat''. Could u give the path to try more one time, thanks for evrething...
Hi. thanks for your great video. when I wrote this code:
"if step == 100:
traci.vehicle.changeTarget("1", "e9")
traci.vehicle.changeTarget("3", "e9")"
just veh1 goes to e9. where's the problem?
could you please help me?
moreover, when I use induction loop that according to your code, is on lane e4_0, by using this code: "traci.vehicle.changeLane(veh, 2, 25)" the vehicle goes to lane 3 instead of 2. is it right?
thank you very much
can i ask something
The audio is available only on the left speaker
Hello, thank you for this video. It's very clearly and helpful. I have an error when I try to launch the simulation with TRACI. here is the error: AttributeError: module 'traci' has no attribute 'start'. Any idea? Thanks...
I have set up a discord server to help troubleshoot with anyone who encounters issues
discord.gg/aw65dCf
I found the error. It's crazy, when I name the TRACI file tracy.py, I got this error. But if I change the name to testTraci.py for example, it's works!!!
@@diallitoz5763 Glad you solved it! If your first file was named 'traci.py', that sounds like a name collision to me.
how to Adaptive traffic light control? with sumo
if you found out e-mail me johncir at outlook dot com we can discuss further studies
Hey, seems like a really great video, however it would be really helpful in future videos to increase the font size on your screen. All your terminal commands and XML are unreadable on my 13.5" screen
First video. I have since learned to increase the font. Especially when capping a 2k screen. Appreciate the feedback.
ıt really helps thank you s much
no more video ?
At 4:55, what does the values in "shape" parameter represent to.
Hi there. See sumo.dlr.de/docs/Definition_of_Vehicles,_Vehicle_Types,_and_Routes.html#visualization
@@avcourt3154 Thanks for the response. Actually I am interested to understand the "shape" parameter, as it is used in below syntax:
Here shape property is assigned a list. What that list represent to? I tried to delete a few points from the list but didn't see any change in the lane gui.
@@osmankhalid2005 Oh okay yes you're referring to the lane geometry that was auto-generated for the network file by netedit.
from sumo.dlr.de/docs/Networks/PlainXML.html :
"List of positions; each position is encoded in x,y or x,y,z in meters (do not separate the numbers with a space!)."
from sumo.dlr.de/docs/Networks/SUMO_Road_Networks.html:
"The geometry of the lane, given by a polyline that describes the lane's center line; must not be empty or have less than two positions"
My left ear got a lot of information.
I think this video may have been uploaded with only the left channel audio. To fix this, set your audio settings on your machine to Mono. Easy enough to do on Windows, Mac, Linux. Don't think I can fix this on my end, at least without some more investigation into YT studio. Apologies. This was my first video upload ever.
TracI based python programming starts at 15:23