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

Issue visualizing Depth image in rviz2 #473

Open
EnzoGhisoni opened this issue Sep 27, 2024 · 0 comments
Open

Issue visualizing Depth image in rviz2 #473

EnzoGhisoni opened this issue Sep 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@EnzoGhisoni
Copy link

EnzoGhisoni commented Sep 27, 2024

Environment

  • OS Version: Ubuntu 22.04
  • Binary build
  • Version: Fortress version 6.16.0 and ROS2 Humble

Description

  • Expected behavior:
    I try to add the depth sensors in the sdf of my robot in order to have the depth image available in ROS2.
  • Actual behavior:
    I have the good output for the depth image in Gazebo Image display viewer:
    Screenshot from 2024-09-27 10-04-00

But when I visualize it in rviz2 the image is fully black or is in reverse color pattern in function of the settings:
Screenshot from 2024-09-27 10-20-57

Screenshot from 2024-09-27 10-19-18

Steps to reproduce

I have implement the sensor in this way in my model.sdf:
`

    <sensor name="camera_center" type="depth_camera">
      <gz_frame_id>camera_base_link</gz_frame_id>
      <always_on>1</always_on>
      <update_rate>30</update_rate>
      <visualize>0</visualize>
      <topic>/model/diff_drive/depth_camera</topic>
      <pose>0 0 0 0 -0 0</pose>
      <camera name="camera">
        <horizontal_fov>1</horizontal_fov>
        <image>
          <width>640</width>
          <height>360</height>
          <format>RGB_INT8</format>
        </image>
        <clip>
          <near>0.3</near>
          <far>50.0</far>
        </clip>
      </camera>
  </sensor>

I have this for the bridge:

  • ros_topic_name: "/depth"
    gz_topic_name: "/model/diff_drive/depth_camera"
    ros_type_name: "sensor_msgs/msg/Image"
    gz_type_name: "gz.msgs.Image"
    direction: GZ_TO_ROS
    `

I'm not sure if the difference come from the encoding, the bridge or simply the rviz2 configuration (if it is it could be interesting to know the default settings to visualize the data).

@EnzoGhisoni EnzoGhisoni added the bug Something isn't working label Sep 27, 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: Inbox
Development

No branches or pull requests

1 participant