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

BBox Camera seems to incorrectly rotate Coordinates #428

Open
sintokk opened this issue May 6, 2024 · 0 comments
Open

BBox Camera seems to incorrectly rotate Coordinates #428

sintokk opened this issue May 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@sintokk
Copy link

sintokk commented May 6, 2024

Environment

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

Description

  • In the Project I am working on we are using a Bounding Box Camera to publish 3D Detections as a ros2 topic. We want to verify that the Bounding Boxes are correct projecting them into the Lidar frame in Foxglove. However, the Detections seem to be rotated 180° around an undefined axis as if the camera was looking the wrong way even though in gazebo the camera seems to be correct. This seems to come from an incorrect transformation of the Cooradinates of the Detections.

  • Expected behavior: The Bounding Boxes appear around the Cones

  • Actual behavior: The Bounding Boxes appear rotated 180

Steps to reproduce

  1. Insert the camera Sensor
<sensor name="camera_left_boundingbox_3d" type="boundingbox_camera">
          <topic>/camera/left/bbox3d/detections</topic>
          <camera>
            <camera_info_topic>/donotuse</camera_info_topic>
            <horizontal_fov>${84.7*deg_to_rad}</horizontal_fov>
            <vertical_fov>${66.1*deg_to_rad}</vertical_fov>
            <gz_frame_id>camera_left_link_optical</gz_frame_id>
            <box_type>3d</box_type>
            <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>50</update_rate>
          <visualize>true</visualize>
     </sensor>

2.Subscribe to the /camera/left/bbox3d/detections topic. This yields the following Bounding Box:

  bbox:
    center:
      position:
        x: 4.701146125793457
        y: 0.18212026357650757
        z: -6.913525581359863
      orientation:
        x: -0.11385309696197514
        y: 0.6393905282020569
        z: 0.7486302852630615
        w: 0.1333048045635223
    size:
      x: 0.2239999622106552
      y: 0.2239999622106552
      z: 0.3070000112056732
  id: ''

The z Value here is negative. That however would mean that the camera detects the bounding box behind its field of view

Output

This is the visualized output in Foxglove

frame1
frame2

@sintokk sintokk added the bug Something isn't working label May 6, 2024
@azeey azeey added the help wanted Extra attention is needed label Jul 15, 2024
@azeey azeey self-assigned this Jul 15, 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 help wanted Extra attention is needed
Projects
Status: To do
Development

No branches or pull requests

2 participants