pyrobosim.web.figure.make_figure
- pyrobosim.web.figure.make_figure(world: World, *, selected_robot: Robot | None = None, show_room_names: bool = True, show_location_names: bool = True, show_object_names: bool = True, show_robot_names: bool = True, show_collision_polygons: bool = False) Figure
Builds a complete Plotly figure rendering a world, mirroring the GUI.
Trace layout (used by
dynamic_patch()): planner-graph traces first, followed byTRACES_PER_ROBOTtraces for each robot in order. The view extent comes from explicit axis ranges (not autorange), so redrawing trace data never re-fits the view.- Parameters:
world – The world to render.
selected_robot – The robot whose knowledge (closed hallways, known objects) and planner graphs are displayed, or None for full world state.
show_room_names – If True, shows room name labels.
show_location_names – If True, shows location name labels.
show_object_names – If True, shows object name labels.
show_robot_names – If True, shows robot name labels.
show_collision_polygons – If True, overlays the collision polygons.
- Returns:
The complete Plotly figure for the world.