gz-sensors
gz-sensors copied to clipboard
BBox Camera seems to incorrectly rotate Coordinates
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
- 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