Module Visualization
This module implements functions to visualize all kind of objects from CommonRoad scenarios. Please refer to the Visualization Manual for detailed instructions and examples for using the API.
Drawing interface
Drawing parameters
- class commonroad.visualization.draw_params.BaseParam(time_begin=0, time_end=200, antialiased=True)[source]
-
time_begin:
int
= 0 First time step of the visualized time interval.
-
time_end:
int
= 200 Last time step of the visualized time interval.
-
antialiased:
bool
= True Use anti-aliasing.
-
time_begin:
- class commonroad.visualization.draw_params.ShapeParams(time_begin=0, time_end=200, antialiased=True, opacity=1.0, facecolor='#1d7eea', edgecolor='#00478f', linewidth=0.5, zorder=20, draw_mesh=False)[source]
-
opacity:
float
= 1.0
-
facecolor:
str
= '#1d7eea'
-
edgecolor:
str
= '#00478f'
-
linewidth:
float
= 0.5
-
zorder:
float
= 20
-
draw_mesh:
bool
= False
-
opacity:
- class commonroad.visualization.draw_params.VehicleSignalParams(time_begin=0, time_end=200, antialiased=True, signal_radius=0.5, indicator=<factory>, braking=<factory>, horn=<factory>, bluelight=<factory>)[source]
-
signal_radius:
float
= 0.5
-
indicator:
ShapeParams
-
braking:
ShapeParams
-
horn:
ShapeParams
-
bluelight:
ShapeParams
-
signal_radius:
- class commonroad.visualization.draw_params.ArrowParams(time_begin=0, time_end=200, antialiased=True, linewidth=1.5, edgecolor='black', facecolor='black', width=0.8)[source]
-
linewidth:
float
= 1.5
-
edgecolor:
str
= 'black'
-
facecolor:
str
= 'black'
-
width:
float
= 0.8
-
linewidth:
- class commonroad.visualization.draw_params.StateParams(time_begin=0, time_end=200, antialiased=True, draw_arrow=False, radius=0.5, scale_factor=0.3, linewidth=None, edgecolor='black', facecolor='black', zorder=25, arrow=<factory>)[source]
-
draw_arrow:
bool
= False
-
radius:
float
= 0.5
-
scale_factor:
float
= 0.3
-
linewidth:
Optional
[float
] = None
-
edgecolor:
Optional
[str
] = 'black'
-
facecolor:
Optional
[str
] = 'black'
-
zorder:
float
= 25
-
arrow:
ArrowParams
-
draw_arrow:
- class commonroad.visualization.draw_params.OccupancyParams(time_begin=0, time_end=200, antialiased=True, draw_occupancies=False, shape=<factory>, uncertain_position=<factory>)[source]
-
draw_occupancies:
bool
= False
-
shape:
ShapeParams
-
uncertain_position:
ShapeParams
-
draw_occupancies:
- class commonroad.visualization.draw_params.HistoryParams(time_begin=0, time_end=200, antialiased=True, draw_history=False, steps=5, step_size=1, fade_color=0.1, basecolor='#ffe119', occupancy=<factory>)[source]
Draw the history of an object with fading colors.
-
draw_history:
bool
= False
-
steps:
int
= 5
-
step_size:
int
= 1
-
fade_color:
float
= 0.1
-
basecolor:
str
= '#ffe119'
-
occupancy:
ShapeParams
-
draw_history:
- class commonroad.visualization.draw_params.StaticObstacleParams(time_begin=0, time_end=200, antialiased=True, occupancy=<factory>)[source]
-
occupancy:
OccupancyParams
-
occupancy:
- class commonroad.visualization.draw_params.EnvironmentObstacleParams(time_begin=0, time_end=200, antialiased=True, occupancy=<factory>)[source]
-
occupancy:
OccupancyParams
-
occupancy:
- class commonroad.visualization.draw_params.TrafficLightParams(time_begin=0, time_end=200, antialiased=True, draw_traffic_lights=True, red_color='red', yellow_color='#feb609', green_color='#00aa16', red_yellow_color='#fe4009ff', show_label=False, scale_factor=1.0, zorder=30)[source]
-
draw_traffic_lights:
bool
= True
-
red_color:
str
= 'red' Color of the red phase
-
yellow_color:
str
= '#feb609' Color of the yellow phase
-
green_color:
str
= '#00aa16' Color of the green phase
-
red_yellow_color:
str
= '#fe4009ff' Color of the red-yellow phase
-
show_label:
bool
= False Show id of the traffic light
-
scale_factor:
float
= 1.0
-
zorder:
float
= 30
-
draw_traffic_lights:
- class commonroad.visualization.draw_params.TrafficSignParams(time_begin=0, time_end=200, antialiased=True, draw_traffic_signs=False, show_traffic_signs=None, speed_limit_unit='auto', show_label=False, scale_factor=1.0, zorder=30)[source]
-
draw_traffic_signs:
bool
= False Enable drawing of traffic signs
-
show_traffic_signs:
Optional
[List
[int
]] = None Limit traffic signs to a list of IDs, or None to include all IDs.
-
speed_limit_unit:
str
= 'auto' Select mph or kmh as unit of the speed limit. Choose “auto” to determine based on the country.
-
show_label:
bool
= False Show id of the traffic sign
-
scale_factor:
float
= 1.0
-
zorder:
float
= 30
-
draw_traffic_signs:
- class commonroad.visualization.draw_params.IntersectionParams(time_begin=0, time_end=200, antialiased=True, draw_intersections=False, draw_incoming_lanelets=True, incoming_lanelets_color='#3ecbcf', draw_crossings=True, crossings_color='#b62a55', draw_successors=True, successors_left_color='#ff00ff', successors_straight_color='blue', successors_right_color='#ccff00', show_label=False)[source]
-
draw_intersections:
bool
= False
-
draw_incoming_lanelets:
bool
= True
-
incoming_lanelets_color:
str
= '#3ecbcf'
-
draw_crossings:
bool
= True
-
crossings_color:
str
= '#b62a55'
-
draw_successors:
bool
= True
-
successors_left_color:
str
= '#ff00ff'
-
successors_straight_color:
str
= 'blue'
-
successors_right_color:
str
= '#ccff00'
-
show_label:
bool
= False Show the ID of the intersection
-
draw_intersections:
- class commonroad.visualization.draw_params.LaneletParams(time_begin=0, time_end=200, antialiased=True, left_bound_color='#555555', right_bound_color='#555555', center_bound_color='#dddddd', unique_colors=False, draw_stop_line=True, stop_line_color='#ffffff', draw_line_markings=True, draw_left_bound=True, draw_right_bound=True, draw_center_bound=True, draw_border_vertices=False, draw_start_and_direction=True, colormap_tangent=False, show_label=False, draw_linewidth=0.5, fill_lanelet=True, facecolor='#c7c7c7')[source]
-
left_bound_color:
str
= '#555555'
-
right_bound_color:
str
= '#555555'
-
center_bound_color:
str
= '#dddddd'
-
unique_colors:
bool
= False
-
draw_stop_line:
bool
= True
-
stop_line_color:
str
= '#ffffff'
-
draw_line_markings:
bool
= True
-
draw_left_bound:
bool
= True
-
draw_right_bound:
bool
= True
-
draw_center_bound:
bool
= True
-
draw_border_vertices:
bool
= False
-
draw_start_and_direction:
bool
= True Show a triangle at the beginning of the lanelet, pointing in the driving direction.
-
colormap_tangent:
bool
= False Apply a colormap to the center line of the lanelet, according the tangent angle.
-
show_label:
bool
= False Show the ID of the lanelet.
-
draw_linewidth:
float
= 0.5
-
fill_lanelet:
bool
= True Fill the lanelet with a solid color.
-
facecolor:
str
= '#c7c7c7' Fill color of the lanelet.
-
left_bound_color:
- class commonroad.visualization.draw_params.LaneletNetworkParams(time_begin=0, time_end=200, antialiased=True, kwargs_traffic_light_signs=<factory>, draw_ids=None, lanelet=<factory>, intersection=<factory>, relative_angle=0.0, traffic_sign=<factory>, traffic_light=<factory>)[source]
-
kwargs_traffic_light_signs:
Dict
[str
,Any
]
-
draw_ids:
Optional
[List
[int
]] = None Limit lanelets to a list of IDs, or None to include all IDs.
-
lanelet:
LaneletParams
Options for lanelet drawing.
-
intersection:
IntersectionParams
Options for intersection drawing.
-
relative_angle:
float
= 0.0 Offset angle for tangent colormap. See LaneletParams.colormap_tangent
-
traffic_sign:
TrafficSignParams
Options for traffic sign drawing.
-
traffic_light:
TrafficLightParams
Options for traffic light drawing.
-
kwargs_traffic_light_signs:
- class commonroad.visualization.draw_params.TrajectoryParams(time_begin=0, time_end=200, antialiased=True, draw_trajectory=True, facecolor='k', draw_continuous=False, line_width=0.17, unique_colors=False, shape=<factory>, zorder=24)[source]
-
draw_trajectory:
bool
= True
-
facecolor:
str
= 'k'
-
draw_continuous:
bool
= False Draw trajectories as a continuous line instead of dots.
-
line_width:
float
= 0.17
-
unique_colors:
bool
= False Use unique colors for each of the trajectories points.
-
shape:
ShapeParams
Parameters for shapes of uncertain position.
-
zorder:
float
= 24
-
draw_trajectory:
- class commonroad.visualization.draw_params.InitialStateParams(time_begin=0, time_end=200, antialiased=True, label_zorder=35, label='', state=<factory>)[source]
-
label_zorder:
float
= 35
-
label:
str
= ''
-
state:
StateParams
-
label_zorder:
- class commonroad.visualization.draw_params.PlanningProblemParams(time_begin=0, time_end=200, antialiased=True, initial_state=<factory>, goal_region=<factory>, lanelet=<factory>)[source]
-
initial_state:
InitialStateParams
-
goal_region:
OccupancyParams
-
lanelet:
LaneletParams
Goal lanelet parameters
-
initial_state:
- class commonroad.visualization.draw_params.PlanningProblemSetParams(time_begin=0, time_end=200, antialiased=True, draw_ids=None, planning_problem=<factory>)[source]
-
draw_ids:
Optional
[List
[int
]] = None Limit planning problems to a list of IDs, or None to include all IDs.
-
planning_problem:
PlanningProblemParams
-
draw_ids:
- class commonroad.visualization.draw_params.VehicleShapeParams(time_begin=0, time_end=200, antialiased=True, direction=<factory>, occupancy=<factory>)[source]
-
direction:
ShapeParams
Options for visualizing the direction indicator of the vehicle shape.
-
occupancy:
OccupancyParams
Options for visualizing the vehicle’s occupancy in the current time step.
-
direction:
- class commonroad.visualization.draw_params.DynamicObstacleParams(time_begin=0, time_end=200, antialiased=True, draw_shape=True, draw_icon=False, draw_direction=False, draw_bounding_box=True, show_label=False, draw_signals=True, draw_initial_state=False, vehicle_shape=<factory>, signals=<factory>, state=<factory>, history=<factory>, occupancy=<factory>, trajectory=<factory>)[source]
-
draw_shape:
bool
= True
-
draw_icon:
bool
= False Draw a type-dependent icon (if available) instead of the primitive geometric shape.
-
draw_direction:
bool
= False Draw the direction indicator of the dynamic obstacle.
-
draw_bounding_box:
bool
= True
-
show_label:
bool
= False Show the ID of the dynamic obstacle.
-
draw_signals:
bool
= True Visualize the dynamic obstacle signals like indicator or braking lights.
-
draw_initial_state:
bool
= False Draw the initial state of the dynamic obstacle.
-
vehicle_shape:
VehicleShapeParams
Options for visualizing the vehicle in the current time step.
-
signals:
VehicleSignalParams
Options for visualizing the vehicle signals.
-
state:
StateParams
Options for visualizing the vehicle states within [time_begin, time_end].
-
history:
HistoryParams
Options for visualizing the vehicle occupancy history with fading colors.
-
occupancy:
OccupancyParams
Options for visualizing the vehicle occupancy in future time steps.
-
trajectory:
TrajectoryParams
Options for visualizing the vehicle trajectory in future time steps.
-
draw_shape:
- class commonroad.visualization.draw_params.PhantomObstacleParams(time_begin=0, time_end=200, antialiased=True, draw_shape=True, draw_icon=False, draw_direction=False, draw_bounding_box=True, show_label=False, zorder=20, draw_signals=True, vehicle_shape=<factory>, signals=<factory>, draw_initial_state=False, state=<factory>, history=<factory>, occupancy=<factory>, trajectory=<factory>)[source]
-
draw_shape:
bool
= True
-
draw_icon:
bool
= False
-
draw_direction:
bool
= False
-
draw_bounding_box:
bool
= True
-
show_label:
bool
= False
-
zorder:
float
= 20
-
draw_signals:
bool
= True
-
vehicle_shape:
VehicleShapeParams
-
signals:
VehicleSignalParams
-
draw_initial_state:
bool
= False
-
state:
StateParams
-
history:
HistoryParams
-
occupancy:
OccupancyParams
-
trajectory:
TrajectoryParams
-
draw_shape:
- class commonroad.visualization.draw_params.MPDrawParams(time_begin=0, time_end=200, antialiased=True, axis_visible=True, shape=<factory>, dynamic_obstacle=<factory>, static_obstacle=<factory>, phantom_obstacle=<factory>, environment_obstacle=<factory>, trajectory=<factory>, lanelet_network=<factory>, traffic_light=<factory>, traffic_sign=<factory>, occupancy=<factory>, state=<factory>, planning_problem=<factory>, planning_problem_set=<factory>, initial_state=<factory>, goal_region=<factory>)[source]
-
axis_visible:
bool
= True Enable axes for matplotlib.
-
shape:
ShapeParams
-
dynamic_obstacle:
DynamicObstacleParams
-
static_obstacle:
StaticObstacleParams
-
phantom_obstacle:
PhantomObstacleParams
-
environment_obstacle:
EnvironmentObstacleParams
-
trajectory:
TrajectoryParams
-
lanelet_network:
LaneletNetworkParams
-
traffic_light:
TrafficLightParams
-
traffic_sign:
TrafficSignParams
-
occupancy:
OccupancyParams
-
state:
StateParams
-
planning_problem:
PlanningProblemParams
-
planning_problem_set:
PlanningProblemSetParams
-
initial_state:
InitialStateParams
-
goal_region:
OccupancyParams
-
axis_visible:
Renderers
IRenderer
provides the interface that all renderer implementations must adhere to.
Currently, the following renderers are implemented:
MPRenderer
: A renderer usingmatplotlib
as backend
IRenderer
class
- class commonroad.visualization.renderer.IRenderer[source]
Interface for renderers
- abstract draw_scenario(obj, draw_params=None)[source]
- Parameters:
obj – object to be plotted
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
- abstract draw_static_obstacle(obj, draw_params=None)[source]
- Parameters:
obj – object to be plotted
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
- abstract draw_dynamic_obstacle(obj, draw_params=None)[source]
- Parameters:
obj – object to be plotted
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
- abstract draw_phantom_obstacle(obj, draw_params=None)[source]
- Parameters:
obj – object to be plotted
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
- abstract draw_environment_obstacle(obj, draw_params=None)[source]
- Parameters:
obj – object to be plotted
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
- abstract draw_trajectory(obj, draw_params=None)[source]
- Parameters:
obj – object to be plotted
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
- abstract draw_polygon(vertices, draw_params=None)[source]
Draws a polygon shape
- Parameters:
vertices – vertices of the polygon
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
- abstract draw_rectangle(vertices, draw_params=None)[source]
Draws a rectangle shape
- Parameters:
vertices – vertices of the rectangle
draw_params – parameters for plotting given by a nested dict that recreates the structure of an object, which allows for differentiation of plotting styles depending on the call stack
- Returns:
None
- abstract draw_ellipse(center, radius_x, radius_yt, draw_params=None)[source]
Draws a circle shape
- Parameters:
ellipse – center position of the ellipse
radius_x – radius of the ellipse along the x-axis
radius_y – radius of the ellipse along the y-axis
draw_params – parameters for plotting given by a nested dict that recreates the structure of an object, which allows for differentiation of plotting styles depending on the call stack
- Returns:
None
- abstract draw_state(state, draw_params=None)[source]
Draws a state as an arrow of its velocity vector
- Parameters:
state – state to be plotted
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
- abstract draw_lanelet_network(obj, draw_params=None)[source]
Draws a lanelet network
- Parameters:
obj – object to be plotted
draw_params – parameters for plotting given by a nested dict that recreates the structure of an object, which allows for differentiation of plotting styles depending on the call stack
- Returns:
None
- abstract draw_goal_region(obj, draw_params=None)[source]
Draw goal states from goal region
- Parameters:
obj – object to be plotted
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
- abstract draw_planning_problem(obj, draw_params=None)[source]
Draw initial state and goal region of the planning problem
- Parameters:
obj – object to be plotted
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
- abstract draw_planning_problem_set(obj, draw_params=None)[source]
Draws all or selected planning problems from the planning problem set. Planning problems can be selected by providing IDs in drawing_params[planning_problem_set][draw_ids]
- Parameters:
obj – object to be plotted
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
- abstract draw_initital_state(obj, draw_params=None)[source]
Draw initial state with label
- Parameters:
obj – object to be plotted
draw_params – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None
MPRenderer
class
- class commonroad.visualization.mp_renderer.MPRenderer(draw_params=None, plot_limits=None, ax=None, figsize=None, focus_obstacle=None)[source]
Renderer with matplotlib backend
- property plot_limits
- property plot_limits_focused
plot limits centered around focus_obstacle_id defined in draw_params
- draw_list(drawable_list, draw_params=None)[source]
Simple wrapper to draw a list of drawable objects
- Parameters:
drawable_list (
List
[IDrawable
]) – Objects to drawdraw_params (
Union
[MPDrawParams
,List
[Optional
[BaseParam
]],None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- clear(keep_static_artists=False)[source]
Clears the internal drawing buffer
- Return type:
None
- Returns:
None
- remove_dynamic()[source]
Remove the dynamic objects from their current axis
- Return type:
None
- Returns:
None
- render_dynamic()[source]
Only render dynamic objects from buffer
- Return type:
List
[Artist
]- Returns:
List of drawn object’s artists
- render_static()[source]
Only render static objects from buffer
- Return type:
List
[Artist
]- Returns:
List of drawn object’s artists
- render(show=False, filename=None, keep_static_artists=False)[source]
Render all objects from buffer
- Parameters:
show (
bool
) – Show the resulting figurefilename (
str
) – If provided, saves the figure to the provided file
- Return type:
List
[Artist
]- Returns:
List of drawn object’s artists
- create_video(obj_lists, file_path, delta_time_steps=1, plotting_horizon=0, draw_params=None, fig_size=None, dt=None, dpi=120, progress=True, callback=None)[source]
Creates a video of one or multiple CommonRoad objects in mp4, gif, or avi format.
- Parameters:
obj_lists (
List
[IDrawable
]) – list of objects to be plotted.file_path (
str
) – filename of generated video (ends on .mp4/.gif/.avi, default mp4, when nothing is specified)delta_time_steps (
int
) – plot every delta_time_steps time steps of scenarioplotting_horizon (
int
) – time steps of prediction plotted in each framedraw_params (
Union
[List
[Optional
[BaseParam
]],BaseParam
,None
]) – optional parameters for plotting, overriding the parameters of the rendererfig_size (
Optional
[list
]) – size of the videodt (
Optional
[int
]) – time step between frames in msdpi (
int
) – resolution of the videoprogress (
bool
) – Show a progress bar.callback (
Optional
[Callable
[[Figure
,Axes
,int
],None
]]) – Callback called after drawing each frame. Parameters passed to the callback are the matplotlib figure and axes object, and the frame number.
- Return type:
None
- Returns:
None
- draw_scenario(obj, draw_params=None)[source]
- Parameters:
obj (
Scenario
) – object to be plotteddraw_params (
Optional
[MPDrawParams
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_static_obstacle(obj, draw_params=None)[source]
- Parameters:
obj (
StaticObstacle
) – object to be plotteddraw_params (
Union
[StaticObstacleParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_dynamic_obstacle(obj, draw_params)[source]
- Parameters:
obj (
DynamicObstacle
) – object to be plotteddraw_params (
Union
[DynamicObstacleParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_phantom_obstacle(obj, draw_params=None)[source]
- Parameters:
obj (
PhantomObstacle
) – object to be plotteddraw_params (
Union
[PhantomObstacleParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_environment_obstacle(obj, draw_params=None)[source]
- Parameters:
obj (
EnvironmentObstacle
) – object to be plotteddraw_params (
Union
[EnvironmentObstacleParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_trajectory(obj, draw_params=None)[source]
- Parameters:
obj (
Trajectory
) – object to be plotteddraw_params (
Union
[TrajectoryParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_polygon(vertices, draw_params=None)[source]
Draws a polygon shape
- Parameters:
vertices – vertices of the polygon
draw_params (
Union
[ShapeParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_rectangle(vertices, draw_params=None)[source]
Draws a rectangle shape
- Parameters:
vertices (
ndarray
) – vertices of the rectangledraw_params (
Union
[ShapeParams
,MPDrawParams
,None
]) – parameters for plotting given by a nested dict that recreates the structure of an object,
- Return type:
None
- Returns:
None
- draw_ellipse(center, radius_x, radius_y, draw_params)[source]
Draws a circle shape
- Parameters:
ellipse – center position of the ellipse
radius_x (
float
) – radius of the ellipse along the x-axisdraw_params (
Union
[ShapeParams
,MPDrawParams
,None
]) – parameters for plotting given by a nested dict that recreates the structure of an object,
- Return type:
None
- Returns:
None
- draw_state(state, draw_params=None)[source]
Draws a state as an arrow of its velocity vector
- Parameters:
state (
Union
[State
,InitialState
,PMState
,KSState
,KSTState
,STState
,STDState
,MBState
,InputState
,PMInputState
,LateralState
,LongitudinalState
,CustomState
,ExtendedPMState
]) – state to be plotteddraw_params (
Union
[StateParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_lanelet_network(obj, draw_params=None)[source]
Draws a lanelet network
- Parameters:
obj (
LaneletNetwork
) – object to be plotteddraw_params (
Union
[LaneletNetworkParams
,MPDrawParams
,None
]) – parameters for plotting given by a nested dict that recreates the structure of an object,
- Return type:
None
- Returns:
None
- draw_planning_problem_set(obj, draw_params=None)[source]
Draws all or selected planning problems from the planning problem set. Planning problems can be selected by providing IDs in`drawing_params[planning_problem_set][draw_ids]`
- Parameters:
obj (
PlanningProblemSet
) – object to be plotteddraw_params (
Union
[PlanningProblemSetParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_planning_problem(obj, draw_params=None)[source]
Draw initial state and goal region of the planning problem
- Parameters:
obj (
PlanningProblem
) – object to be plotteddraw_params (
Union
[PlanningProblemParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_initital_state(obj, draw_params=None)[source]
Draw initial state with label
- Parameters:
obj (
Union
[State
,InitialState
,PMState
,KSState
,KSTState
,STState
,STDState
,MBState
,InputState
,PMInputState
,LateralState
,LongitudinalState
,CustomState
,ExtendedPMState
]) – object to be plotteddraw_params (
Union
[InitialStateParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_goal_region(obj, draw_params=None)[source]
Draw goal states from goal region
- Parameters:
obj (
GoalRegion
) – object to be plotteddraw_params (
Union
[OccupancyParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_goal_state(obj, draw_params=None)[source]
Draw goal states
- Parameters:
obj (
Union
[State
,InitialState
,PMState
,KSState
,KSTState
,STState
,STDState
,MBState
,InputState
,PMInputState
,LateralState
,LongitudinalState
,CustomState
,ExtendedPMState
]) – object to be plotteddraw_params (
Union
[OccupancyParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Return type:
None
- Returns:
None
- draw_traffic_light_sign(obj, draw_params=None)[source]
Draw traffic sings and lights
- Parameters:
obj (
Union
[TrafficLight
,TrafficSign
]) – object to be plotteddraw_params (
Union
[TrafficLightParams
,MPDrawParams
,None
]) – optional parameters for plotting, overriding the parameters of the renderer
- Returns:
None