Architecture
This page describes how ssl_vista runs from CLI command to frame rendering.
High-level flow
sslvistaCLI parses arguments (src/ssl_vista/cli.py)run_app(...)creates the Qt application (src/ssl_vista/app.py)MainWindowloads layout and optional CSV (src/ssl_vista/ui/main_window.py)- Layout JSON is schema-validated (
src/ssl_vista/ui/layout.py) SimulationGridbuilds plotter widgets from validated config (src/ssl_vista/ui/grid.py)- Plotter classes are resolved via registry (
src/ssl_vista/plotters/registry.py) - Plotters set up scenes and update per frame (
src/ssl_vista/plotters/*)
Main components
cli.py
Responsibilities:
- expose
runcommand options - list available layouts and sample datasets
- resolve names/paths through
DataManager - toggle debug flags via
CONFIG - launch Qt runtime through
run_app
data_manager.py
DataManager resolves package data paths and lists bundled resources:
grid_layouts/*.jsonsamples/*.csvassets/*.ply
It supports fallback to file paths when a bundled name is not found.
MainWindow
Core runtime orchestration:
- owns toolbar and central
SimulationGrid - loads simulation data via
ssl_simulator.load_sim - drives playback state (
playing, current frame index) - updates all plotters through timer callbacks
Playback/event loop summary:
- toolbar and keyboard update the time slider
- slider change calls
update_time update_timecallsupdate_simulationupdate_simulationcallsgrid.update_scenes(sim_data, idx)
SimulationGrid
SimulationGrid is a widget container with:
- splitters for row/column layout
- an array of plotter objects
- a shared timer for animation
- a context object (
SimulationGridContext) for cross-plotter signals
The shared context currently exposes robot focus state and a robot_focus_changed signal.
Plotter system
Base classes:
_BasePlotter: generic Qt widget integration and lifecycle contract_BaseVisualPlotter: PyVista-backed implementation with scene-object supportBaseCanvasPlotter: canvas/grid + robot helpersBaseMplPlotter: Matplotlib figure/canvas lifecycle
Built-in plotters:
Plotter2DCanvasPlotter3DCanvasPlotter3DAttitude
Custom Matplotlib plotters can be loaded dynamically from a Python file via layout entries (module_path, class_name).
Scene object model
PyVista scene composition uses:
SceneObjectSceneObjectGroup
These abstractions manage mesh + actor lifecycle and group hierarchical scene elements.
Configuration
Canvas-plotter configuration is grouped into typed pydantic models in
src/ssl_vista/plotters/pv_utils/configs.py - GridConfig, CameraConfig,
GraphicsConfig, RobotConfig. A plotter accepts each as a grid/camera/robot/
graphics namespace (a model or a plain dict, e.g. from a layout's args) and forwards
it whole to its sub-component, so options never need re-declaring on parent classes.
src/ssl_vista/config.py (CONFIG) is reserved for non-style global runtime flags.