Skip to content

Add OverlayImage and OverlayCamera displays and an OverlayPicker tool - #1830

Open
iory wants to merge 3 commits into
ros2:rollingfrom
iory:feature/jsk-overlay
Open

Add OverlayImage and OverlayCamera displays and an OverlayPicker tool#1830
iory wants to merge 3 commits into
ros2:rollingfrom
iory:feature/jsk-overlay

Conversation

@iory

@iory iory commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Ports OverlayImage, OverlayCamera and OverlayPicker from jsk_rviz_plugins. The camera image is
drawn as a screen-fixed 2D overlay on top of the 3D scene (OverlayImage) or composited with it
(OverlayCamera), and the tool drags those overlays around, writing the position back to the
display's Left/Top properties. Additive only: no existing display changes behaviour, and no new
dependencies.

Verified on a real USB camera (640x480 rgb8, 31 fps) — demo video below, plus unit tests for the
overlay geometry and for the picker's grid snapping. The three commits each build and test on
their own, so the OverlayCamera commit can be dropped if it is not wanted.

Generative AI: codex (gpt-5.3-codex).

jsk_overlay_demo.mp4

@mergify

mergify Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

iory added 3 commits July 31, 2026 16:06
Displays a sensor_msgs/msg/Image as a 2D overlay on top of the 3D scene, with
alpha, aspect ratio and placement properties. The shared Ogre overlay helper
derives from jsk_rviz_plugins (BSD-3-Clause); decoding reuses ROSImageTexture.

Signed-off-by: Iori Yanokura <ab.ioryz@gmail.com>
Dragging with the tool active moves the overlay under the cursor. The move is
written through the left/top properties, so it shows in the property tree and
is saved to the config. Ported from jsk_rviz_plugins (BSD-3-Clause).

Signed-off-by: Iori Yanokura <ab.ioryz@gmail.com>
Composites the camera view into the main 3D view. Renders into an offscreen
Ogre render texture, since rviz2's QWindow-based render window draws nothing
while hidden, with overlays disabled on that viewport so the overlay texture
is not fed back into itself.

Signed-off-by: Iori Yanokura <ab.ioryz@gmail.com>
@iory
iory force-pushed the feature/jsk-overlay branch from cb0ac37 to 80797d2 Compare July 31, 2026 07:08
@skyegalaxy

Copy link
Copy Markdown
Member

@UseTheForce007

@UseTheForce007

Copy link
Copy Markdown

Tested on ROS 2 Rolling inside Docker running Ubuntu 26.04 LTS with a physical USB camera (/dev/video0).

  • OverlayImage: Verified 2D camera feed overlay renders cleanly over the 3D viewport using a live /image_raw stream at ~30 FPS.
  • OverlayCamera: Confirmed composite rendering over the 3D scene functions correctly once CameraInfo and static TF are provided.
  • OverlayPicker: Added tool to top toolbar and dragged overlays across the viewport.
  • Unit Tests: Built cleanly and ran colcon test . All unit tests passed with 0 errors/failures.

No issues observed.

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.

3 participants