Skip to content

CameraDisplay shows incorrect pixel values #1747

Description

@abaeyens

Generated by Generative AI

No

Operating System:

NA

ROS version or commit hash:

45a1d0b (today's rolling)

RMW implementation (if applicable):

No response

RMW Configuration (if applicable):

No response

Client library (if applicable):

No response

'ros2 doctor --report' output

No response

Steps to reproduce issue

  1. Launch RViz
  2. Publish Image with CameraInfo
  3. Show it in the CameraDisplay visualization in RViz
  4. In CameraDisplay, set Zoom Factor to 0.5
  5. However with your cursor over the shown image, and you'll see that the shown pixel values don't match the pixels residing under the cursor.

Expected behavior

Either the correct pixel value is shown, or no pixel value at all is shown.

Actual behavior

A wrong pixel value is shown, screenshot:

Image

Additional information

This bug got introduced by e6813d8, where this well-working feature got introduced for ImageDisplay and we didn't take into account that CameraDisplay inherits from ImageDisplay while also relying on a different image coordinate to screen coordinate mapping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions