Visualization function

Dear community!
I wonder if there is a visualization function, that plots the driven trajectories in a single plot, e.g. in a 3plot with a third axis as time dimension?

Best regards and thank you,
Rudolf

Hi,

unfortunately, commonroad-io does not support 3D plots.
However, it should be possible to visualize the different states of a trajectory in the same plot by iterating over the time steps.

Best,
Sebastian

1 Like

I got a similar question. I was following the visualization tutorial, which has code to iterate every timestep of a scenario. However, for a scenario of 40 timestamps, I’m ending up with 40 plots stacked on top of each other. Is there a way to reuse a single plot and get a “video” of the scenario? Preferably with pure Matplotlib, without requiring bokeh or so.

The MPRenderer class has a function create_video which you can use.
The only requirement is that ffmpeg is installed on your operating system.