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

Depth Camera #14

Open
kursatkomurcu opened this issue Apr 11, 2024 · 0 comments
Open

Depth Camera #14

kursatkomurcu opened this issue Apr 11, 2024 · 0 comments

Comments

@kursatkomurcu
Copy link

Hello Community,

I want to add depth camera to this drone. I changed the urdf file like below. However, I couldn't get any depth camera data. How can I solve the problem?

<gazebo reference="front_cam_link">
  <sensor name="front_camera" type="camera">
    <always_on>1</always_on>
    <visualize>1</visualize>
    <update_rate>60</update_rate>
    <camera>
      <horizontal_fov>2.09</horizontal_fov>
      <image>
        <width>640</width>
        <height>360</height>
        <format>R8G8B8</format>
      </image>
      <clip>
        <near>0.1</near>
        <far>100</far>
      </clip>
      <noise>
        <type>gaussian</type>
        <mean>0.0</mean>
        <stddev>0.005</stddev>
      </noise>
    </camera>
    <plugin filename="libgazebo_ros_camera.so" name="camera_front">
      <ros>
        <namespace>/simple_drone</namespace>
      </ros>
      <frame_name>/simple_drone/front_cam_link</frame_name>
      <camera_name>front</camera_name>
      <hack_baseline>0.07</hack_baseline>
    </plugin>
  </sensor>
  <!-- Depth Cam -->
  <sensor name="front_depth_camera" type="depth">
    <always_on>1</always_on>
    <visualize>1</visualize>
    <update_rate>30</update_rate>
    <camera>
      <horizontal_fov>2.09</horizontal_fov>
      <image>
        <width>640</width>
        <height>360</height>
        <format>R8G8B8</format>
      </image>
      <clip>
        <near>0.1</near>
        <far>10</far>
      </clip>
    </camera>
    <plugin filename="libgazebo_ros_openni_kinect.so" name="camera_front_depth">
      <ros>
        <namespace>/simple_drone</namespace>
      </ros>
      <frame_name>/simple_drone/front_cam_link</frame_name>
      <camera_name>front_depth</camera_name>
    </plugin>
  </sensor>
</gazebo>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant