slamlab-visualization
Visualizes SLAM results in real time, either from slamlab-offline or from a live ROS 2 node.
slamlab-visualization # default configurationslamlab-visualization <config_filepath> # custom configurationWithout arguments, the built-in default configuration is used. With one argument, the specified YAML configuration file is loaded. The executable reads the slamlab_visualization section.
Connection model
Section titled “Connection model”The visualization acts as a TCP server, waiting for incoming connections from the SLAM processor:
| Port | Protocol | Purpose |
|---|---|---|
| 5000 | TCP (server) | Receives per-frame SLAM data |
| 5001 | TCP (server) | Receives async data (global map, prior map) |
| 5002 | UDP (client) | Sends control commands to the SLAM processor |
When a client disconnects, the visualization resets its state and waits for a new connection.
Displayed structures
Section titled “Displayed structures”| Structure | Type | Description |
|---|---|---|
| Processed cloud | Point cloud | Current filtered and deskewed point cloud |
| Local map voxel PCA | Point cloud | Voxel PCA centroids |
| Prior map voxel PCA | Point cloud | Voxel PCA centroids from the prior map |
| Global map | Point cloud | Accumulated global map |
| Correspondences | Point cloud | ICP correspondences between processed point cloud and local map |
| Trajectory | Curve network | Estimated trajectory |
| Frames | Curve network | Map origin and current base frame coordinate axes |
| Absolute position measurements | Point cloud | Integrated absolute position measurements (e.g., GNSS) |
| Key point clouds | Point cloud | Origin of key point clouds used for loop closure detection |
| Loop closures | Curve network | Lines connecting loop closure pairs |
| Mesh (base frame) | Surface mesh | Optional mesh attached to the current pose |
| Mesh (map frame) | Surface mesh | Optional mesh at the map origin |
UI panels
Section titled “UI panels”Controls
Section titled “Controls”- Pause / Resume — Sends a pause or resume command to the connected SLAM processor (works only with slamlab-offline)
- Step — Advances one SLAM iteration when paused (works only with slamlab-offline)
- Reset — Resets the camera view
Configuration
Section titled “Configuration”- Polyscope menu — Toggles the native Polyscope GUI for fine-grained structure editing.
- Camera mode —
Free,Follow position,Follow pose,Follow orbit,Top view, orFollow chase.Follow chaseshows sliders for distance, azimuth, elevation and smoothing. - Scale — Scene length scale (2–200). Use this to globally adjust the size of visualized structures.
- Load / Save / Save As — Load and save Polyscope configurations as YAML files.
Camera
Section titled “Camera”Displays timestamped images synchronized with the trajectory, either from a directory on disk or streamed from the SLAM processor.
- Trajectory — 3D path (switchable to XY/XZ/YZ), velocity, IMU biases, pose covariance.
- Correspondences — Count, mean residual, and standard deviation per point cloud.
- Iterations & Time — ICP iteration count and processing time per point cloud.
Loop closures
Section titled “Loop closures”Selectable list of loop closure pairs with an Inspect button that opens a window showing the two associated key point clouds for visual inspection.
Keyboard shortcuts
Section titled “Keyboard shortcuts”| Key | Action |
|---|---|
| Space | Toggle pause/resume |
| Right Arrow | Single step (when paused) |
| Up / Down Arrow | Navigate loop closure pairs |
| I | Print camera transforms to console |
| P | Toggle Polyscope menu |
| L | Toggle eye-dome lighting |
| Ctrl+L | Reset camera view |
Camera follow modes
Section titled “Camera follow modes”| Mode | Behavior |
|---|---|
| Free | Full manual camera control |
| Follow position | Camera tracks the base frame position, but not orientation |
| Follow pose | Camera is rigidly attached to the base frame |
| Follow orbit | Camera orbits around the base frame |
| Follow chase | Camera follows the base from a configurable distance, azimuth and elevation relative to the direction of travel. Elevation is measured in the map frame, so vehicle roll and pitch do not tilt the view. Camera motion is low-pass filtered. |