sumocr.visualization package

Submodules

sumocr.visualization.video module

sumocr.visualization.video.create_video(scenario, output_folder, planning_problem_set=None, trajectory_pred=None, follow_ego=False, suffix='', file_type='mp4')[source]

Create video for a simulated scenario and the list of ego vehicles.

Parameters:
  • scenario (Scenario) – Final commonroad scenario

  • output_folder (str) – path to output folder

  • planning_problem_set (Optional[PlanningProblemSet]) – possibility to plot a Commonroad planning problem

  • trajectory_pred (Union[Dict[int, EgoVehicle], List[TrajectoryPrediction], None]) – list of one or more ego vehicles or their trajectory predictions

  • follow_ego (bool) – focus video on the ego vehicle(s)

  • suffix (str) – possibility to add suffix to file name

  • file_type (str) – mp4 or gif files supported

Return type:

str

Returns:

sumocr.visualization.video.get_dynamic_plot_limits(trajectories, frame_count, area_size=120)[source]

The plot limits track the center of the ego vehicles.

sumocr.visualization.video.get_plot_limits(scenario, frame_count)[source]

The plot limits track the center of the ego vehicle.

sumocr.visualization.video.get_state_list_of_trajectories(time_step, trajectories)[source]

Returns the list of states of trajectories at the specified time step.

Module contents