Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intrinsic matrix of Bounding Box Camera is not correctly published #424

Open
wittenator opened this issue Apr 4, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@wittenator
Copy link

wittenator commented Apr 4, 2024

Environment

  • OS Version: Ubuntu 22.04
  • Source or binary build?
    Binary: Harmonic

Description

This is a continuation of the previous ticket. I have a normal camera sensor and the bounding box sensor in my sdf and falsely attributed the intrinsic matrix to the wrong camera. The CameraInfo is correct if I have a look at the camera sensor, but not correct for the bbox camera. This sounds curious since afaik the bbox camera inherits from the normal camera sensor. This may be connected to #363 .

  • Expected behavior: The camera info topic should correctly reflect the intrinsic properties of the camera
  • Actual behavior: The camera info contains default values that do no get changed.

Steps to reproduce and output

  1. Insert a camera sensor with non-default parameters e.g.
<sensor name="boundingbox_camera" type="boundingbox_camera">
          <gz_frame_id>camera_link_optical</gz_frame_id>
          <camera>
            <horizontal_fov>1.478294</horizontal_fov>
            <image>
              <width>640</width>
              <height>480</height>
            </image>
            <clip>
              <near>0.01</near>
              <far>60</far>
            </clip>
          </camera>
          <always_on>1</always_on>
          <update_rate>20</update_rate>
          <visualize>false</visualize>
        </sensor>
  1. Subscribe to the /camera_info topic. This yields the following message:
header {
  stamp {
    sec: 47
  }
  data {
    key: "frame_id"
    value: "camera_link_optical"
  }
}
width: 640
height: 480
distortion {
  k: 0
  k: 0
  k: 0
  k: 0
  k: 0
}
intrinsics {
  k: 277
  k: 0
  k: 160
  k: 0
  k: 277
  k: 120
  k: 0
  k: 0
  k: 1
}
projection {
  p: 277
  p: 0
  p: 160
  p: 0
  p: 0
  p: 277
  p: 120
  p: 0
  p: 0
  p: 0
  p: 1
  p: 0
}
rectification_matrix: 1
rectification_matrix: 0
rectification_matrix: 0
rectification_matrix: 0
rectification_matrix: 1
rectification_matrix: 0
rectification_matrix: 0
rectification_matrix: 0
rectification_matrix: 1

The correct intrinsic matrix would look like this though:

[[351.05947319   0.         320.        ]
 [  0.         368.86247951 240.        ]
 [  0.           0.           1.        ]]
@wittenator wittenator added the bug Something isn't working label Apr 4, 2024
@azeey azeey assigned azeey and unassigned azeey Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

3 participants