Tutorial: Interactive Scenario Simulation

Dear all,

I followed the latest tutorial. But I could not see the visualized videos but only an image.
How can I see the generated video?

And how to visualize it in SUMO-GUI?

Thank you!

You can activate the video generation by setting create_video=True when calling simulate_with_planner and find it in the path that is mentioned in the tutorial.

Visualizing the scenarios in sumo-gui is not supported currently. We recommend to use commonroad-io to either visualize the complete scenario after the simulation or to visualize the current states of the scenario obtained at every time step during the simulation. At that point, you can also visualize your current prediction of other vehicles and the planned trajectory for the ego vehicle, which would not be possible in Sumo GUI.

Thank you very much. The generated video looks awesome.

And how can I visualize this?

current_scenario = sumo_sim.commonroad_scenario_at_time_step(sumo_sim.current_time_step)

You can visualize it using the visualization functions from commonroad-io https://commonroad-io.readthedocs.io/en/latest/user/visualization/#visualization-manual. Note, that this scenario only contains the current state of the simulation, so only a single time step.

Hi :slight_smile: I would like to know the visualizing the scenarios in Sumo-gui is supported already or not? I set the cmd of traci with SUMO_GUI_BINARY, but I still didn’t see the scenario running in SUMO, only now a video being generated at the end.

I saw in the README, “If you would like to build the SUMO-GUI, you can follow the procedure in the install script”, can you explain this a bit more?

Thank you!

No it’s not supported until this problem is not fixed: GUI support for libsumo · Issue #6663 · eclipse/sumo · GitHub

You can try to implement it on your own, but in that case you would need to replace libsumo with traci, which would increase the execution time significantly.

We will remove the sentence in the readme mentioning the GUI option.

Thank you so much for the quick reply! Now things are clearer!!!