pyrobosim.web.figure
Builds a Plotly figure from a PyRoboSim world, mirroring the matplotlib GUI.
Rendering is split into two layers:
Static geometry (rooms, hallways, locations, object spawns, resting objects, optional collision polygons) is drawn as
layout.shapes. These polygons often have interior holes (e.g., a room’s wall ring), so they use SVGpathshapes with an even-odd fill rule.Dynamic content (planner graphs, and per robot: planner path, sensor data, body, orientation line, and any held object) is drawn as traces at stable indices, so it can be updated each frame with
dynamic_patch()instead of rebuilding the whole figure.
Classes
|
The (x, y) data for one robot's dynamic traces, in trace order. |
Functions
|
Converts a PyRoboSim RGB color to a CSS |
|
Builds a Dash |
|
Builds a complete Plotly figure rendering a world, mirroring the GUI. |
|
Counts the traces emitted for planner graphs (two per graph: edges, nodes). |