PDDLViz.colorschemes
— ConstantA dictionary of ColorScheme
s provided by PDDLViz.
PDDLViz.AnimSolveCallback
— TypeAnimSolveCallback{R <: Renderer}
A callback for anim_solve
that animates the solving process of a SymbolicPlanners.jl [Planner
]. The behavior of this callback can be customized on a per-renderer and per-planner
basis by defining a new method for
(cb::AnimSolveCallback{R <: Renderer)(planner::Planner, args...)`.
PDDLViz.Animation
— TypeAnimation
Displayable animation which wraps a VideoStream
object. Can be displayed with show(io, MIME"text/html"(), anim)
, or saved with save(path, anim)
.
PDDLViz.BasicGraphic
— TypeBasicGraphic(shape; attributes...)
Basic graphic type, containing a primitive shape and a dictionary of attributes.
PDDLViz.Canvas
— TypePDDLViz.Controller
— TypeController
Abstract supertype for all controllers. When attached to a canvas, a controller interprets user input as PDDL actions and updates the canvas accordingly.
Can be attached to a canvas using add_controller!
, and removed using remove_controller
.
PDDLViz.GraphworldRenderer
— TypeGraphworldRenderer(; options...)
Customizable renderer for domains with fixed locations and movable objects connected in a graph. The layout of the graph can be controlled with the graph_layout
option, which takes a function that returns an AbstractLayout
given the number of locations.
By default, the graph is laid out using the StressLocSpringMov
layout, which arranges the first n_locs
nodes via stress minimization, and uses spring/repulsion for the remaining nodes.
General options
resolution::Tuple{Int64, Int64}
: Default figure resolution, in pixels.graph_layout::Function
: Functionn_locs -> (graph -> positions)
that returns an AbstractLayout.is_loc_directed::Bool
: Whether the edges between locations are directed.is_mov_directed::Bool
: Whether the edges between movable objects are directed.has_mov_edges::Bool
: Whether there are edges between movable objects.locations::Vector{Julog.Const}
: PDDL objects that correspond to fixed locations.location_types::Vector{Symbol}
: PDDL object types that correspond to fixed locations.movables::Vector{Julog.Const}
: PDDL objects that correspond to movable objects.movable_types::Vector{Symbol}
: PDDL object types that correspond to movable objects.loc_edge_fn::Function
: Function(dom, s, l1, l2) -> Bool
that checks ifl1
connects tol2
.loc_edge_label_fn::Function
: Function(dom, s, l1, l2) -> String
that labels edge(l1, l2)
.mov_loc_edge_fn::Function
: Function(dom, s, obj, loc) -> Bool
that checks ifmov
is atloc
.mov_loc_edge_label_fn::Function
: Function(dom, s, obj, loc) -> String
that labels edge(mov, loc)
.mov_edge_fn::Function
: Function(dom, s, m1, m2) -> Bool
that checks ifm1
connects tom2
.mov_edge_label_fn::Function
: Function(dom, s, m1, m2) -> String
that labels edge(m1, m2)
.loc_renderers::Dict{Julog.Const, Function}
: Location object renderers, of the form(domain, state, loc) -> Graphic
.mov_renderers::Dict{Julog.Const, Function}
: Movable object renderers, of the form(domain, state, obj) -> Graphic
.loc_type_renderers::Dict{Symbol, Function}
: Per-type location renderers, of the form(domain, state, loc) -> Graphic
.mov_type_renderers::Dict{Symbol, Function}
: Per-type movable renderers, of the form(domain, state, obj) -> Graphic
.graph_options::Dict{Symbol, Any}
: Default options for graph rendering, passed to thegraphplot
recipe.axis_options::Dict{Symbol, Any}
: Default display options for axis.state_options::Dict{Symbol, Any}
: Default options for state rendering.anim_options::Dict{Symbol, Any}
: Default options for animation rendering.
State options
These options can be passed as keyword arguments to render_state
:
show_location_graphics = true
: Whether to show location graphics.show_location_labels = true
: Whether to show location labels.show_movable_graphics = true
: Whether to show movable object graphics.show_movable_labels = true
: Whether to show movable object labels.show_edge_labels = false
: Whether to show edge labels.location_node_color = :black
: Color of location nodes.location_edge_color = :black
: Color of edges between locations.movable_node_color = :gray
: Color of movable object nodes.movable_edge_color = (:mediumpurple, 0.75)
: Color of edges between locations and movable objects.label_offset = 0.15
: How much labels are offset from the center of their corresponding objects. Larger values move the labels further away.
PDDLViz.GridworldRenderer
— TypeGridworldRenderer(; options...)
Customizable renderer for 2D gridworld domains.
General options
resolution::Tuple{Int64, Int64}
: Default figure resolution, in pixels.grid_fluents::Vector{Julog.Term}
: PDDL fluents that represent the grid layers (walls, etc).grid_colors::Vector
: Colors for each grid layer.has_agent::Bool
: Whether the domain has an agent not associated with a PDDL object.get_agent_x::Function
: Function that returns the PDDL fluent for the agent's x position.get_agent_y::Function
: Function that returns the PDDL fluent for the agent's y position.get_obj_x::Function
: Takes an object constant and returns the PDDL fluent for its x position.get_obj_y::Function
: Takes an object constant and returns the PDDL fluent for its y position.agent_renderer::Function
: Agent renderer, of the form(domain, state) -> Graphic
.obj_renderers::Dict{Symbol, Function}
: Per-type object renderers, of the form(domain, state, obj) -> Graphic
.obj_type_z_order::Vector{Symbol}
: Z-order for object types, from bottom to top.locations::Vector{Tuple}
: List of(x, y, label, color)
tuples to label locations on the grid.show_inventory::Bool
: Whether to show an object inventory for each function ininventory_fns
.inventory_fns::Vector{Function}
: Inventory indicator functions of the form(domain, state, obj) -> Bool
.inventory_types::Vector{Symbol}
: Types of objects that can be each inventory.inventory_labels::Vector{String}
: Axis titles / labels for each inventory.state_options::Dict{Symbol, Any}
: Default options for state rendering.trajectory_options::Dict{Symbol, Any}
: Default options for trajectory rendering.anim_options::Dict{Symbol, Any}
: Default options for animation rendering.
State options
These options can be passed as keyword arguments to render_state
:
show_grid::Bool = true
: Whether to show grid variables (walls, etc).show_agent::Bool = true
: Whether to show the agent.show_objects::Bool = true
: Whether to show objects.show_locations::Bool = true
: Whether to show locations.show_inventory::Bool = true
: Whether to show inventories.caption = nothing
: Caption to display below the figure.caption_font = :regular
: Font for the caption.caption_size = 24
: Font size for the caption.caption_color = :black
: Font color for the caption.caption_padding = 12
: Padding for the caption.caption_rotation = 0
: Rotation for the caption.
Trajectory options
These options can be passed as keyword arguments to render_trajectory
:
:agent_color = black
: Marker color of agent tracks.:agent_start_color = agent_color
: Marker color of agent tracks at the start of the trajectory, which fade into the main color.:tracked_objects = Const[]
: Moving objects to plot marker tracks for.:object_colors = Symbol[]
: Marker colors to use for tracked objects.:object_start_colors = object_colors
: Marker colors to use for tracked objects at the start of the trajectory, which fade into the main color.:tracked_types = Symbol[]
: Types of objects to track.:type_colors = Symbol[]
: Marker colors to use for tracked object types.:type_start_colors = type_colors
: Marker colors to use for tracked object types at the start of the trajectory, which fade into the main color.:track_arrowmarker = '▶'
: Marker to use for directed tracks.:track_stopmarker = '⦿'
: Marker to use for stationary tracks.:track_markersize = 0.3
: Size of track markers.
Animation options
These options can be passed as keyword arguments to animation functions:
captions = nothing
: Captions to display for each timestep, e.g.,["t=1", "t=2", ...]
. Can be provided as a vector of strings, or a dictionary mapping timesteps to strings. Ifnothing
, no captions are displayed.trail_length = 0
: Length of trail tracks to display for each agent or tracked object. If0
, no trail tracks are displayed.
PDDLViz.KeyboardController
— TypeKeyboardController(options...)
KeyboardController(
key1 => act1, key2 => act2, ...,
extra_key1, extra_key2, ...;
exclusive=true, callback=nothing
)
A controller that maps keyboard input to PDDL actions.
Options
keymap
: A dictionary mapping keyboard keys to PDDL actions.extrakeys
: Keys mapped to remaining available actions (default: number keys).extraprocess
: Function(state, acts) -> acts
that filters/processes remaining actions.restart_key
: Restart button if an initial state is specified.exclusive
: Whether an action is executed only if no other keys are pressed.callback
: Post-action callbackf(canvas, domain, state, act, next_state)
.obsfunc
PDDLViz.LinearTransition
— TypeLinearTransition
Transition that linearly interpolates between node positions.
PDDLViz.ManhattanTransition
— TypeManhattanTransition(;
order = [:up, :horizontal, :down],
stop_early = [true, false, false]
)
Transition that interpolates between node positions by moving horizontally and vertically.
Arguments
order::Vector{Symbol} = [:up, :horizontal, :down]
: Order in which to interpolate between node positions. Valid values are:up
,:down
,:left
,:right
,:horizontal
, and:vertical
.stop_early::Vector{Bool} = [true, false, false]
: Whether to stop interpolating early for each direction. Iftrue
, then the transition will stop once that direction is done. If no nodes have moved in that direction, then the transition will continue to the next direction.
PDDLViz.MarkerGraphic
— TypeMarkerGraphic(marker, x, y, [w=1.0, h=w]; attributes...)
A marker graphic with a given position and size, rendered using scatter
with the corresponding marker type.
PDDLViz.MultiGraphic
— TypeMultiGraphic(graphics; attributes...)
Composite graphic type, containing a tuple of graphics in depth-order and a dictionary of attributes.
PDDLViz.Renderer
— TypeRenderer
A Renderer
defines how a PDDL State
for a specific Domain
should be rendered. A concrete sub-type of Renderer
should be implemented for a PDDL domain (or family of PDDL domains, e.g. 2D gridworlds) for users who wish to visualize that domain.
(r::Renderer)(domain::Domain, args...; options...)
(r::Renderer)(canvas::Canvas, domain::Domain, args...; options...)
Once a Renderer
has been constructed, it can be used to render PDDL states and other entities by calling it with the appropriate arguments.
PDDLViz.StepTransition
— TypeStepTransition
Transition that immediately steps to the next state.
PDDLViz.StressLocSpringMov
— TypeStressLocSpringMov(; kwargs...)(adj_matrix)
Returns a layout that first places the first n_locs
nodes using stress minimization, then places the remaining nodes using spring/repulsion.
Keyword Arguments
dim = 2
,Ptype = Float64
: Dimension and output type.n_locs = 0
: Number of nodes to place using stress minimization.stress_kwargs = Dict{Symbol, Any}()
: Keyword arguments forStress
.spring_kwargs = Dict{Symbol, Any}(:C => 0.3)
: Keyword arguments forSpring
.
PDDLViz.TextGraphic
— TypeTextGraphic(str, x, y, [fontsize]; attributes...)
A text graphic with a given position and [fontsize], rendered using the text
plotting command.
PDDLViz.Transition
— TypeTransition
Abstract animation transition type.
GeometryBasics.coordinates
— MethodReturn the coordinates of a graphic.
PDDLViz.BlocksworldRenderer
— MethodBlocksworldRenderer(; options...)
Specialization of GraphworldRenderer
for the blocksworld domain, which uses a custom BlocksworldLayout
and default renderers for blocks and tables. The following blocksworld-specific options are supported:
Options
block_type::Symbol
: PDDL type of blocks, defaults to:block
block_width::Real
: Width of blocks, defaults to1.0
block_height::Real
: Height of blocks, defaults to1.0
block_gap::Real
: Gap between blocks, defaults to0.5
table_height::Real
: Height of table, defaults toblock_height
gripper_height::Real
: Height of blocks when they are picked up. Defaults totable_height + (n_locs - 2 + 1) * block_height
.block_colors
: Colorscheme for blocks, defaults to a discretization of theplasma
colorscheme.block_renderer
: Renderer for blocks, defaults to a colored square with the block name as white text in the center.
PDDLViz.BoxGraphic
— FunctionBoxGraphic(x=0.0, y=0.0, size=1.0;
color=:burlywood3, is_open=false, kwargs...)
Cardboard box graphic, consisting of a box with a lid.
PDDLViz.CircleShape
— MethodConstruct a circle centered at x
and y
with radius r
.
PDDLViz.CityGraphic
— FunctionCityGraphic(x=0.0, y=0.0, size=1.0;
color=:grey, kwargs...)
City graphic, made of three rectangles with slightly different shading.
PDDLViz.GemGraphic
— FunctionGemGraphic(x=0.0, y=0.0, size=1.0, sides=6, aspect=0.75;
color=:royalblue, strokewidth=1.0, kwargs...)
Gem graphic, consisting of a N-gon and a smaller N-gon inside it.
PDDLViz.HeptagonShape
— MethodConstruct a heptagon centered at x
and y
with radius r
.
PDDLViz.HexagonShape
— MethodConstruct a hexagon centered at x
and y
with radius r
.
PDDLViz.HumanGraphic
— FunctionHumanGraphic(x=0.0, y=0.0, size=1.0;
color=:black, kwargs...)
Human character graphic, consisting of a circular head, and a trapezoidal torso, two-segment arms, and legs.
PDDLViz.KeyGraphic
— FunctionKeyGraphic(x=0.0, y=0.0, size=1.0;
color=:goldenrod1, shadow_color=:black, kwargs...)
Key graphic, consisting of a key with a handle and two teeth.
PDDLViz.LockedDoorGraphic
— FunctionLockedDoorGraphic(x=0.0, y=0.0, size=1.0;
color=:gray, strokewidth=1.0, kwargs...)
Locked door graphic, consisting of square with a keyhole in it.
PDDLViz.NgonShape
— MethodConstruct a n
-sided regular polygon centered at x
and y
with radius 1
.
PDDLViz.OctagonShape
— MethodConstruct an octagon centered at x
and y
with radius r
.
PDDLViz.PentagonShape
— MethodConstruct a pentagon centered at x
and y
with radius r
.
PDDLViz.PolygonShape
— MethodConstruct a polygon from a list of vertices.
PDDLViz.QuestionBoxGraphic
— FunctionQuestionBoxGraphic(x=0.0, y=0.0, size=1.0;
color=:burlywood3, text_color=:white,
is_open=false, kwargs...)
Question box graphic, consisting of a box with a lid and question mark.
PDDLViz.RectShape
— MethodConstruct a rectangle centered at x
and y
with width w
and height h
.
PDDLViz.RobotGraphic
— FunctionRobotGraphic(x=0.0, y=0.0, size=1.0;
color=:slategray, kwargs...)
Robot prefab character graphic, consisting of a semi-circular head with an antenna, two arms, a body and a wheel.
PDDLViz.SquareShape
— MethodConstruct a square centered at x
and y
with side length l
.
PDDLViz.TrapezoidShape
— FunctionConstruct a trapezoid at x
and y
with top and bottom width a
, bottom width b
, and height h
. The top can be shifted by an offset
(zero by default).
PDDLViz.TriangleShape
— MethodConstruct a triangle centered at x
and y
with radius r
.
PDDLViz.add_controller!
— Functionadd_controller!(canvas, controller, domain, [init_state];
show_controls::Bool=false)
Adds a controller
to a canvas
for a given PDDL domain
. An initial state init_state
can be specified to enable restart functionality.
PDDLViz.anim_initialize!
— Methodanim_initialize!(canvas, renderer, domain, state;
callback=nothing, overlay=nothing, kwargs...)
Initializes an animation that will be rendered on the canvas
. Called by anim_plan
and anim_trajectory
as an initialization step.
By default, this just renders the initial state
on the canvas
. This function can be overloaded for different Renderer
types to implement custom initializations, e.g., to add captions or other overlays.
PDDLViz.anim_plan!
— Functionanim_plan([path], renderer, domain, state, actions;
format="mp4", framerate=5, show=false,
record_init=true, options...)
anim_plan!([anim|path], canvas, renderer, domain, state, actions;
format="mp4", framerate=5, show=is_displayed(canvas),
record_init=true, options...)
Uses renderer
to animate a series of actions
in a PDDL domain
starting from state
(updating the canvas
if one is provided). An Animation
object is returned, which can be saved or displayed.
An existing anim
can provided as the first argument, so that frames are appended to that animation (format and frame rates are ignored in this case). Alternatively, if a path
is specified, the animation is saved to that file, and the path
is returned.
Note that once an animation is displayed or saved, no frames can be added to it.
PDDLViz.anim_plan
— Methodanim_plan([path], renderer, domain, state, actions;
format="mp4", framerate=5, show=false,
record_init=true, options...)
anim_plan!([anim|path], canvas, renderer, domain, state, actions;
format="mp4", framerate=5, show=is_displayed(canvas),
record_init=true, options...)
Uses renderer
to animate a series of actions
in a PDDL domain
starting from state
(updating the canvas
if one is provided). An Animation
object is returned, which can be saved or displayed.
An existing anim
can provided as the first argument, so that frames are appended to that animation (format and frame rates are ignored in this case). Alternatively, if a path
is specified, the animation is saved to that file, and the path
is returned.
Note that once an animation is displayed or saved, no frames can be added to it.
PDDLViz.anim_refine!
— Methodanim_refine!([path], renderer,
sol, planner, domain, state, spec;
format="mp4", framerate=30, show=false,
record_init=true, options...)
anim_refine!([anim|path], canvas, renderer,
sol, planner, domain, state, spec;
format="mp4", framerate=30, show=is_displayed(canvas),
record_init=true, options...)
Uses renderer
to animate the refinement of an existing solution by a SymbolicPlanners.jl planner
in a PDDL domain
(updating the canvas
if one is provided).
Returns a tuple (anim, sol)
where anim
is an Animation
object containing the animation, and sol
is the solution returned by planner
. If anim
is provided as the first argument, then additional frames are added to the animation. Alternatively, if a path
is provided, the animation is saved to that file, and (path, sol)
is returned.
Note that once an animation is displayed or saved, no frames can be added to it.
PDDLViz.anim_solve!
— Functionanim_solve([path], renderer, planner, domain, state, spec;
format="mp4", framerate=30, show=false,
record_init=true, options...)
anim_solve!([anim|path], canvas, renderer,
planner, domain, state, spec;
format="mp4", framerate=30, show=is_displayed(canvas),
record_init=true, options...)
Uses renderer
to animate the solving process of a SymbolicPlanners.jl planner
in a PDDL domain
(updating the canvas
if one is provided).
Returns a tuple (anim, sol)
where anim
is an Animation
object containing the animation, and sol
is the solution returned by planner
. If anim
is provided as the first argument, then additional frames are added to the animation. Alternatively, if a path
is provided, the animation is saved to that file, and (path, sol)
is returned.
Note that once an animation is displayed or saved, no frames can be added to it.
PDDLViz.anim_solve
— Methodanim_solve([path], renderer, planner, domain, state, spec;
format="mp4", framerate=30, show=false,
record_init=true, options...)
anim_solve!([anim|path], canvas, renderer,
planner, domain, state, spec;
format="mp4", framerate=30, show=is_displayed(canvas),
record_init=true, options...)
Uses renderer
to animate the solving process of a SymbolicPlanners.jl planner
in a PDDL domain
(updating the canvas
if one is provided).
Returns a tuple (anim, sol)
where anim
is an Animation
object containing the animation, and sol
is the solution returned by planner
. If anim
is provided as the first argument, then additional frames are added to the animation. Alternatively, if a path
is provided, the animation is saved to that file, and (path, sol)
is returned.
Note that once an animation is displayed or saved, no frames can be added to it.
PDDLViz.anim_trajectory
— Functionanim_trajectory([path], renderer, domain, trajectory, [actions];
format="mp4", framerate=5, show=false,
record_init=true, options...)
anim_trajectory!([anim|path], canvas, renderer,
domain, trajectory, [actions];
format="mp4", framerate=5, show=is_displayed(canvas),
record_init=true, options...)
Uses renderer
to animate a trajectory
in a PDDL domain
(updating the canvas
if one is provided). An Animation
object is returned, which can be saved or displayed.
An existing anim
can provided as the first argument, so that frames are appended to that animation (format and frame rates are ignored in this case). Alternatively, if a path
is specified, the animation is saved to that file, and the path
is returned.
Note that once an animation is displayed or saved, no frames can be added to it.
PDDLViz.anim_trajectory!
— Functionanim_trajectory([path], renderer, domain, trajectory, [actions];
format="mp4", framerate=5, show=false,
record_init=true, options...)
anim_trajectory!([anim|path], canvas, renderer,
domain, trajectory, [actions];
format="mp4", framerate=5, show=is_displayed(canvas),
record_init=true, options...)
Uses renderer
to animate a trajectory
in a PDDL domain
(updating the canvas
if one is provided). An Animation
object is returned, which can be saved or displayed.
An existing anim
can provided as the first argument, so that frames are appended to that animation (format and frame rates are ignored in this case). Alternatively, if a path
is specified, the animation is saved to that file, and the path
is returned.
Note that once an animation is displayed or saved, no frames can be added to it.
PDDLViz.anim_transition!
— Methodanim_transition!(canvas, renderer, domain, state, [action, t];
callback=nothing, overlay=nothing, kwargs...)
Animates a transition from the current state stored in the canvas
to the newly provided state
(via action
at timestep t
if provided). Called by anim_plan
and anim_trajectory
to animate a series of state transitions.
By default, this updates the canvas
with the new state
, then runs the overlay
and callback
functions (if provided) on canvas
(e.g. to ovelay annotations, or to record a frame).
This function can be overloaded for different Renderer
types to implement custom transitions, e.g., transitions that involve multiple frames.
PDDLViz.boundingbox
— MethodReturn the bounding box of a graphic.
PDDLViz.centroid
— MethodReturn the centroid of a graphic.
PDDLViz.darken
— MethodDarken a RGB(A) color by a given amount.
PDDLViz.default_anim_options
— Methodcaptions = nothing
: Captions to display for each timestep, e.g.,["t=1", "t=2", ...]
. Can be provided as a vector of strings, or a dictionary mapping timesteps to strings. Ifnothing
, no captions are displayed.trail_length = 0
: Length of trail tracks to display for each agent or tracked object. If0
, no trail tracks are displayed.
PDDLViz.default_state_options
— Methodshow_location_graphics = true
: Whether to show location graphics.show_location_labels = true
: Whether to show location labels.show_movable_graphics = true
: Whether to show movable object graphics.show_movable_labels = true
: Whether to show movable object labels.show_edge_labels = false
: Whether to show edge labels.location_node_color = :black
: Color of location nodes.location_edge_color = :black
: Color of edges between locations.movable_node_color = :gray
: Color of movable object nodes.movable_edge_color = (:mediumpurple, 0.75)
: Color of edges between locations and movable objects.label_offset = 0.15
: How much labels are offset from the center of their corresponding objects. Larger values move the labels further away.
PDDLViz.default_state_options
— Methodshow_grid::Bool = true
: Whether to show grid variables (walls, etc).show_agent::Bool = true
: Whether to show the agent.show_objects::Bool = true
: Whether to show objects.show_locations::Bool = true
: Whether to show locations.show_inventory::Bool = true
: Whether to show inventories.caption = nothing
: Caption to display below the figure.caption_font = :regular
: Font for the caption.caption_size = 24
: Font size for the caption.caption_color = :black
: Font color for the caption.caption_padding = 12
: Padding for the caption.caption_rotation = 0
: Rotation for the caption.
PDDLViz.default_trajectory_options
— Method:agent_color = black
: Marker color of agent tracks.:agent_start_color = agent_color
: Marker color of agent tracks at the start of the trajectory, which fade into the main color.:tracked_objects = Const[]
: Moving objects to plot marker tracks for.:object_colors = Symbol[]
: Marker colors to use for tracked objects.:object_start_colors = object_colors
: Marker colors to use for tracked objects at the start of the trajectory, which fade into the main color.:tracked_types = Symbol[]
: Types of objects to track.:type_colors = Symbol[]
: Marker colors to use for tracked object types.:type_start_colors = type_colors
: Marker colors to use for tracked object types at the start of the trajectory, which fade into the main color.:track_arrowmarker = '▶'
: Marker to use for directed tracks.:track_stopmarker = '⦿'
: Marker to use for stationary tracks.:track_markersize = 0.3
: Size of track markers.
PDDLViz.lighten
— MethodLighten a RGB(A) color by a given amount.
PDDLViz.new_canvas
— Methodnew_canvas(renderer::Renderer)
new_canvas(renderer::Renderer, figure::Figure)
new_canvas(renderer::Renderer, axis::Axis)
new_canvas(renderer::Renderer, gridpos::GridPosition)
Creates a new Canvas
to be used by renderer
. An existing figure
, axis
, or gridpos
can be specified to use as the base for the new canvas.
PDDLViz.remove_controller!
— Methodremove_controller!(canvas, controller)
Removes a controller
from a canvas
.
PDDLViz.render_controls!
— Methodrender_controls!(canvas, controller, domain)
Renders controls for a controller
to a canvas
.
PDDLViz.render_plan!
— Methodrender_plan!(canvas, renderer, domain, state, actions)
Uses renderer
to render a series of actions
in a PDDL domain
starting from state
. Renders to a canvas
on top of any existing content.
PDDLViz.render_plan
— Methodrender_plan(renderer, domain, state, actions; options...)
Uses renderer
to render a series of actions
in a PDDL domain
starting from state
. Constructs and returns a new Canvas
.
PDDLViz.render_sol!
— Methodrender_sol!(canvas::Canvas, renderer::Renderer,
domain::Domain, state::State, sol::Solution)
Uses renderer
to render a planning solution sol
starting from a state
in a PDDL domain
. Renders to a canvas
on top of any existing content.
PDDLViz.render_sol
— Methodrender_sol(renderer::Renderer,
domain::Domain, state::State, sol::Solution)
Uses renderer
to render a planning solution sol
starting from a state
in a PDDL domain
. Constructs and returns a new Canvas
.
PDDLViz.render_state!
— Methodrender_state!(canvas, renderer, domain, state; options...)
Uses renderer
to render a state
of a PDDL domain
to an existing canvas
, rendering over any existing content.
PDDLViz.render_state
— Methodrender_state(renderer, domain, state)
Uses renderer
to render a state
of a PDDL domain
. Constructs and returns a new Canvas
.
PDDLViz.render_storyboard
— Functionrender_storyboard(anim::Animation, [idxs]; options...)
Renders an Animation
as a series of (bitmap) images in a storyboard. Returns a Figure
where each frame is a subplot.
The frames to render can be specified by idxs
, a vector of indices. If idxs
is not specified, all frames are rendered.
Options
n_rows = 1
: Number of storyboard rows.n_cols = nothing
: Number of storyboard columns (default: number of frames).figscale = 1
: Scales figure size relative to number of pixels required to fit all frames at their full resolution.titles
: List or dictionary of frame titles.subtitles
: List or dictionary of frame subtitles.xlabels
: List or dictionary of x-axis labels per frame.ylabels
: List or dictionary of y-axis labels per frame.
Options that control title and label styling (e.g. titlesize
) can also be specified as keyword arguments. See Axis
for details.
PDDLViz.render_trajectory!
— Methodrender_trajectory!(canvas::Canvas, renderer::Renderer,
domain::Domain, trajectory::AbstractVector{<:State})
Uses renderer
to render a trajectory
of PDDL domain
states. Renders to a canvas
on top of any existing content.
PDDLViz.render_trajectory
— Methodrender_trajectory(renderer::Renderer,
domain::Domain, trajectory::AbstractVector{<:State})
Uses renderer
to render a trajectory
of PDDL domain
states. Constructs and returns a new Canvas
.
PDDLViz.rotate
— FunctionRotate a graphic by θ radians around a point c
.
PDDLViz.scale
— FunctionScale by a horizontal factor x
and vertical factor y
around a point c
.
PDDLViz.set_alpha
— MethodSet the alpha value of a RGB(A) color.
PDDLViz.to_color_obs
— MethodConvert a color or observable to a Observable{RGBA}
.
PDDLViz.translate
— MethodTranslate a graphic by x
and y
units.