Skip to content

feat: add switchable display surfaces for Plot2D (Dock Panel and 3D Overlay) - #9

Open
sevahul wants to merge 3 commits into
amgaber95:mainfrom
sevahul:feat/display-surface-mode
Open

feat: add switchable display surfaces for Plot2D (Dock Panel and 3D Overlay)#9
sevahul wants to merge 3 commits into
amgaber95:mainfrom
sevahul:feat/display-surface-mode

Conversation

@sevahul

@sevahul sevahul commented Jul 29, 2026

Copy link
Copy Markdown

Summary

This PR adds a new display-surface mode for Plot2D so users can choose where the plot is rendered:

  • Dock Panel
  • 3D Overlay

The Dock Panel mode is now the default.

image

Motivation

The plugin previously rendered only as an in-viewport overlay. This change adds a panel-based presentation mode similar to how image visualization is commonly used in RViz, while preserving the existing overlay behavior.

What Changed

  1. Added a new configuration enum and field:
  • DisplaySurface
  • Stored in Plot2DConfig as display_surface
  1. Added a new display property:
  • Display Surface
  • Options:
    • Dock Panel
    • 3D Overlay
  1. Implemented mode switching behavior:
  • Live switching between modes while display is active
  • 3D Overlay mode:
    • Uses existing overlay backend path
  • Dock Panel mode:
    • Renders to a per-display dockable panel widget
    • Supports multiple display instances (one panel per instance)
  1. Updated presentation logic:
  • Layout controls are hidden when Dock Panel is selected
  • Existing series/style/axis/render settings remain unchanged and continue to apply in both modes
  1. Added/updated tests for:
  • Display Surface property presence and config mapping
  • Layout visibility behavior when switching surfaces
  • Rendering-path behavior for panel vs overlay

Behavior Notes

  • Default surface is Dock Panel.
  • Switching to 3D Overlay restores overlay rendering path.
  • Switching to Dock Panel hides overlay and renders in the associated dock panel.
  • Panel layout persistence follows RViz config save/load behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant