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

how to display or get depth image in the realsense t265 #4724

Closed
minghuizhou123 opened this issue Aug 26, 2019 · 3 comments
Closed

how to display or get depth image in the realsense t265 #4724

minghuizhou123 opened this issue Aug 26, 2019 · 3 comments

Comments

@minghuizhou123
Copy link

Screenshot from 2019-08-26 12-21-56
Screenshot from 2019-08-26 12-23-35
Screenshot from 2019-08-26 12-23-53
I moditied rs_rgbd.launch file

<!-- Launch the camera device nodelet-->
<include file="$(find realsense2_camera)/launch/includes/nodelet.launch.xml">
  <arg name="external_manager"         value="$(arg external_manager)"/>
  <arg name="manager"                  value="$(arg manager)"/>
  <arg name="tf_prefix"                value="$(arg tf_prefix)"/>
  <arg name="serial_no"                value="$(arg serial_no)"/>
  <arg name="json_file_path"           value="$(arg json_file_path)"/>

  <arg name="enable_pointcloud"        value="$(arg enable_pointcloud)"/>
  <arg name="enable_sync"              value="$(arg enable_sync)"/>
  <arg name="align_depth"              value="$(arg align_depth)"/>

  <arg name="fisheye_width"            value="$(arg fisheye_width)"/>
  <arg name="fisheye_height"           value="$(arg fisheye_height)"/>
  <arg name="enable_fisheye"           value="$(arg enable_fisheye)"/>

  <arg name="depth_width"              value="$(arg depth_width)"/>
  <arg name="depth_height"             value="$(arg depth_height)"/>
  <arg name="enable_depth"             value="$(arg enable_depth)"/>

  <arg name="color_width"              value="$(arg color_width)"/>
  <arg name="color_height"             value="$(arg color_height)"/>
  <arg name="enable_color"             value="$(arg enable_color)"/>

  <arg name="infra_width"              value="$(arg infra_width)"/>
  <arg name="infra_height"             value="$(arg infra_height)"/>
  <arg name="enable_infra1"            value="$(arg enable_infra1)"/>
  <arg name="enable_infra2"            value="$(arg enable_infra2)"/>

  <arg name="fisheye_fps"              value="$(arg fisheye_fps)"/>
  <arg name="depth_fps"                value="$(arg depth_fps)"/>
  <arg name="infra_fps"                value="$(arg infra_fps)"/>
  <arg name="color_fps"                value="$(arg color_fps)"/>
  <arg name="gyro_fps"                 value="$(arg gyro_fps)"/>
  <arg name="accel_fps"                value="$(arg accel_fps)"/>
  <arg name="enable_gyro"              value="$(arg enable_gyro)"/>
  <arg name="enable_accel"             value="$(arg enable_accel)"/>
  <arg name="filters"                  value="$(arg filters)"/>
</include>

<!-- RGB processing -->
<include if="$(arg rgb_processing)"
         file="$(find rgbd_launch)/launch/includes/rgb.launch.xml">
  <arg name="manager"                       value="$(arg manager)" />
  <arg name="respawn"                       value="$(arg respawn)" />
  <arg name="rgb"                           value="$(arg rgb)" />
  <arg name="debayer_processing"            value="$(arg debayer_processing)" />
</include>

<group if="$(eval depth_registered_processing and sw_registered_processing)">
  <node pkg="nodelet" type="nodelet" name="register_depth"
        args="load depth_image_proc/register $(arg manager) $(arg bond)" respawn="$(arg respawn)">
    <remap from="rgb/camera_info"             to="$(arg rgb)/camera_info" />
    <remap from="depth/camera_info"           to="$(arg depth)/camera_info" />
    <remap from="depth/image_rect"            to="$(arg depth)/image_rect_raw" />
    <remap from="depth_registered/image_rect" to="$(arg depth_registered)/sw_registered/image_rect_raw" />
  </node>

  <!-- Publish registered XYZRGB point cloud with software registered input -->
  <node pkg="nodelet" type="nodelet" name="points_xyzrgb_sw_registered"
        args="load depth_image_proc/point_cloud_xyzrgb $(arg manager) $(arg bond)" respawn="$(arg respawn)">
    <remap from="rgb/image_rect_color"        to="$(arg rgb)/image_rect_color" />
    <remap from="rgb/camera_info"             to="$(arg rgb)/camera_info" />
    <remap from="depth_registered/image_rect" to="$(arg depth_registered_filtered)/sw_registered/image_rect_raw" />
    <remap from="depth_registered/points"     to="$(arg depth_registered)/points" />
  </node>
</group>

<group if="$(eval depth_registered_processing and hw_registered_processing)">
  <!-- Publish registered XYZRGB point cloud with hardware registered input (ROS Realsense depth alignment) -->
  <node pkg="nodelet" type="nodelet" name="points_xyzrgb_hw_registered"
        args="load depth_image_proc/point_cloud_xyzrgb $(arg manager) $(arg bond)" respawn="$(arg respawn)">
    <remap from="rgb/image_rect_color"        to="$(arg rgb)/image_rect_color" />
    <remap from="rgb/camera_info"             to="$(arg rgb)/camera_info" />
    <remap from="depth_registered/image_rect" to="$(arg depth_registered)/image_raw" />
    <remap from="depth_registered/points"     to="$(arg depth_registered_pub)/points" />
  </node>
</group>
@minghuizhou123
Copy link
Author

<!-- Launch the camera device nodelet-->
<include file="$(find realsense2_camera)/launch/includes/nodelet.launch.xml">
  <arg name="external_manager"         value="$(arg external_manager)"/>
  <arg name="manager"                  value="$(arg manager)"/>
  <arg name="tf_prefix"                value="$(arg tf_prefix)"/>
  <arg name="serial_no"                value="$(arg serial_no)"/>
  <arg name="json_file_path"           value="$(arg json_file_path)"/>

  <arg name="enable_pointcloud"        value="$(arg enable_pointcloud)"/>
  <arg name="enable_sync"              value="$(arg enable_sync)"/>
  <arg name="align_depth"              value="$(arg align_depth)"/>

  <arg name="fisheye_width"            value="$(arg fisheye_width)"/>
  <arg name="fisheye_height"           value="$(arg fisheye_height)"/>
  <arg name="enable_fisheye"           value="$(arg enable_fisheye)"/>

  <arg name="depth_width"              value="$(arg depth_width)"/>
  <arg name="depth_height"             value="$(arg depth_height)"/>
  <arg name="enable_depth"             value="$(arg enable_depth)"/>

  <arg name="color_width"              value="$(arg color_width)"/>
  <arg name="color_height"             value="$(arg color_height)"/>
  <arg name="enable_color"             value="$(arg enable_color)"/>

  <arg name="infra_width"              value="$(arg infra_width)"/>
  <arg name="infra_height"             value="$(arg infra_height)"/>
  <arg name="enable_infra1"            value="$(arg enable_infra1)"/>
  <arg name="enable_infra2"            value="$(arg enable_infra2)"/>

  <arg name="fisheye_fps"              value="$(arg fisheye_fps)"/>
  <arg name="depth_fps"                value="$(arg depth_fps)"/>
  <arg name="infra_fps"                value="$(arg infra_fps)"/>
  <arg name="color_fps"                value="$(arg color_fps)"/>
  <arg name="gyro_fps"                 value="$(arg gyro_fps)"/>
  <arg name="accel_fps"                value="$(arg accel_fps)"/>
  <arg name="enable_gyro"              value="$(arg enable_gyro)"/>
  <arg name="enable_accel"             value="$(arg enable_accel)"/>
  <arg name="filters"                  value="$(arg filters)"/>
</include>

<!-- RGB processing -->
<include if="$(arg rgb_processing)"
         file="$(find rgbd_launch)/launch/includes/rgb.launch.xml">
  <arg name="manager"                       value="$(arg manager)" />
  <arg name="respawn"                       value="$(arg respawn)" />
  <arg name="rgb"                           value="$(arg rgb)" />
  <arg name="debayer_processing"            value="$(arg debayer_processing)" />
</include>

<group if="$(eval depth_registered_processing and sw_registered_processing)">
  <node pkg="nodelet" type="nodelet" name="register_depth"
        args="load depth_image_proc/register $(arg manager) $(arg bond)" respawn="$(arg respawn)">
    <remap from="rgb/camera_info"             to="$(arg rgb)/camera_info" />
    <remap from="depth/camera_info"           to="$(arg depth)/camera_info" />
    <remap from="depth/image_rect"            to="$(arg depth)/image_rect_raw" />
    <remap from="depth_registered/image_rect" to="$(arg depth_registered)/sw_registered/image_rect_raw" />
  </node>

  <!-- Publish registered XYZRGB point cloud with software registered input -->
  <node pkg="nodelet" type="nodelet" name="points_xyzrgb_sw_registered"
        args="load depth_image_proc/point_cloud_xyzrgb $(arg manager) $(arg bond)" respawn="$(arg respawn)">
    <remap from="rgb/image_rect_color"        to="$(arg rgb)/image_rect_color" />
    <remap from="rgb/camera_info"             to="$(arg rgb)/camera_info" />
    <remap from="depth_registered/image_rect" to="$(arg depth_registered_filtered)/sw_registered/image_rect_raw" />
    <remap from="depth_registered/points"     to="$(arg depth_registered)/points" />
  </node>
</group>

<group if="$(eval depth_registered_processing and hw_registered_processing)">
  <!-- Publish registered XYZRGB point cloud with hardware registered input (ROS Realsense depth alignment) -->
  <node pkg="nodelet" type="nodelet" name="points_xyzrgb_hw_registered"
        args="load depth_image_proc/point_cloud_xyzrgb $(arg manager) $(arg bond)" respawn="$(arg respawn)">
    <remap from="rgb/image_rect_color"        to="$(arg rgb)/image_rect_color" />
    <remap from="rgb/camera_info"             to="$(arg rgb)/camera_info" />
    <remap from="depth_registered/image_rect" to="$(arg depth_registered)/image_raw" />
    <remap from="depth_registered/points"     to="$(arg depth_registered_pub)/points" />
  </node>
</group>

@MartyG-RealSense
Copy link
Collaborator

It looks as though you are trying to write your own ROS script to get depth from the fisheye cameras like the t265_stereo.py script does. Is that correct, please?

#3951

There is advice in the link below on the difficulties of computing depth on the T265 due to its lack of built-in depth sensing.

#3964 (comment)

@dorodnic
Copy link
Contributor

rs_rgbd.launch does not work with the T265, since T265 is not an RGB-D camera.
t265_stereo.py is a nice example to review, but we are not planning to expand on this use-case.

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

3 participants