Robotics StackExchange | Archived questions

Rtabmap Remote Mapping D415

im using the intel realsense d415 im trying to do remote mapping over the wifi and im using the remote mapping tutorial(http://wiki.ros.org/rtabmap_ros/Tutorials/RemoteMapping) as reference to do the compressiong so it would use less bandwidth. so far i got it to compress the rgb image and im getting a steady 15 fps but i can't get the Depth field to compress correctly if i use rostopic hz on the compressedDepth i get warning errors from the realsense like this:

 03/11 01:38:36,761 WARNING [281472940044672] (messenger-libusb.cpp:42) control_transfer returned error, index: 300, error: No data available, number: 3d
 03/11 01:38:36,811 WARNING [281472940044672] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 03/11 01:38:36,862 WARNING [281472940044672] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 03/11 01:38:51,063 ERROR [281472641347968] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 132
 03/11 01:38:55,726 ERROR [281472641347968] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 132
 03/11 01:39:00,388 ERROR [281472641347968] (uvc-streamer.cpp:106) uvc streamer watchdog triggered on endpoint: 132
 03/11 01:39:46,954 WARNING [281472940044672] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 03/11 01:39:47,005 WARNING [281472940044672] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11
 03/11 01:39:47,056 WARNING [281472940044672] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: Resource temporarily unavailable, number: 11

and the fps is like 0.4 while the raw fps is 3 so for some reason the rate is worse and i don't get those errors with the raw. it also output another for the Depth which i just compressed and thats a stable 15 fps with rostopic hz but if i open it in rviz it instantly crashes everything.

this is the raw and compressedDepth the field comes out ok with both the only diffrence is the compressedDepth comes in supper delayed https://drive.google.com/file/d/1YGDvcRuwA0fUPEgWLGDfzkPKQsYOe1ay/view?usp=sharing

and this is the mess i get from the compressed it sometimes shows this other times it just insta crashes everything. https://drive.google.com/file/d/1LYjEAYs1cmwRpGwt344WZx8E7RVzRE3Q/view?usp=sharing

please help i can't figure out what i did wrong and why my depth is so broken this is the launch file i use for my robot with the rdgd_sync that im using for the compression the initial portion is the realsense camera launch and i added the rgdb sync launch to the bottom.

<launch>
  <arg name="serial_no"           default=""/>
  <arg name="usb_port_id"         default=""/>
  <arg name="device_type"         default="d415"/>
  <arg name="json_file_path"      default="/home/ubuntu/drone_files/d415_9-3-20.json"/>
  <arg name="camera"              default="camera"/>
  <arg name="tf_prefix"           default="$(arg camera)"/>
  <arg name="external_manager"    default="false"/>
  <arg name="manager"             default="camera_nodelet_manager"/>

  <arg name="fisheye_width"       default="640"/>
  <arg name="fisheye_height"      default="480"/>
  <arg name="enable_fisheye"      default="false"/>

  <arg name="depth_width"         default="640"/>
  <arg name="depth_height"        default="480"/>
  <arg name="enable_depth"        default="true"/>

  <arg name="infra_width"        default="640"/>
  <arg name="infra_height"       default="480"/>
  <arg name="enable_infra"        default="false"/>
  <arg name="enable_infra1"       default="false"/>
  <arg name="enable_infra2"       default="false"/>

  <arg name="color_width"         default="640"/>
  <arg name="color_height"        default="480"/>
  <arg name="enable_color"        default="true"/>

  <arg name="fisheye_fps"         default="15"/>
  <arg name="depth_fps"           default="15"/>
  <arg name="infra_fps"           default="15"/>
  <arg name="color_fps"           default="15"/>
  <arg name="gyro_fps"            default="400"/>
  <arg name="accel_fps"           default="250"/>
  <arg name="enable_gyro"         default="false"/>
  <arg name="enable_accel"        default="false"/>

  <arg name="enable_pointcloud"         default="false"/>
  <arg name="pointcloud_texture_stream" default="RS2_STREAM_COLOR"/>
  <arg name="pointcloud_texture_index"  default="0"/>

  <arg name="enable_sync"               default="true"/>
  <arg name="align_depth"               default="true"/>

  <arg name="publish_tf"                default="true"/>
  <arg name="tf_publish_rate"           default="0"/>

  <arg name="filters"                   default=""/>
  <arg name="clip_distance"             default="-2"/>
  <arg name="linear_accel_cov"          default="0.01"/>
  <arg name="initial_reset"             default="true"/>
  <arg name="unite_imu_method"          default=""/>
  <arg name="topic_odom_in"             default="odom_in"/>
  <arg name="calib_odom_file"           default=""/>
  <arg name="publish_odom_tf"           default="true"/>
  <arg name="allow_no_texture_points"   default="false"/>

  <group ns="$(arg camera)">
    <include file="$(find realsense2_camera)/launch/includes/nodelet.launch.xml">
      <arg name="tf_prefix"                value="$(arg tf_prefix)"/>
      <arg name="external_manager"         value="$(arg external_manager)"/>
      <arg name="manager"                  value="$(arg manager)"/>
      <arg name="serial_no"                value="$(arg serial_no)"/>
      <arg name="usb_port_id"              value="$(arg usb_port_id)"/>
      <arg name="device_type"              value="$(arg device_type)"/>
      <arg name="json_file_path"           value="$(arg json_file_path)"/>

      <arg name="enable_pointcloud"        value="$(arg enable_pointcloud)"/>
      <arg name="pointcloud_texture_stream" value="$(arg pointcloud_texture_stream)"/>
      <arg name="pointcloud_texture_index"  value="$(arg pointcloud_texture_index)"/>
      <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_infra"            value="$(arg enable_infra)"/>
      <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="publish_tf"               value="$(arg publish_tf)"/>
      <arg name="tf_publish_rate"          value="$(arg tf_publish_rate)"/>

      <arg name="filters"                  value="$(arg filters)"/>
      <arg name="clip_distance"            value="$(arg clip_distance)"/>
      <arg name="linear_accel_cov"         value="$(arg linear_accel_cov)"/>
      <arg name="initial_reset"            value="$(arg initial_reset)"/>
      <arg name="unite_imu_method"         value="$(arg unite_imu_method)"/>
      <arg name="topic_odom_in"            value="$(arg topic_odom_in)"/>
      <arg name="calib_odom_file"          value="$(arg calib_odom_file)"/>
      <arg name="publish_odom_tf"          value="$(arg publish_odom_tf)"/>
      <arg name="allow_no_texture_points"  value="$(arg allow_no_texture_points)"/>
    </include>
  </group>

  <arg name="rate"         default="5"/>
  <arg name="decimation"   default="3"/>
  <arg name="depth_scale"  default="1"/>
  <arg name="approx_sync"  default="true" /> <!-- true for freenect driver -->
  <arg name="rgbd_sync"    default="true"/>
  <arg name="node_start_delay" default="15.0" />

  <!-- Use same nodelet used by Freenect/OpenNI -->
  <group ns="camera">
    <node if="$(arg rgbd_sync)" pkg="nodelet" type="nodelet" name="rgbd_sync" args="load rtabmap_ros/rgbd_sync camera_nodelet_manager" output="screen"
     launch-prefix="bash -c 'sleep $(arg node_start_delay); $0 $@' ">

      <param name="compressed_rate"  type="double" value="$(arg rate)"/>
      <param name="decimation"       type="double" value="$(arg decimation)"/>
      <param name="depth_scale"      type="double" value="$(arg depth_scale)"/>
      <param name="approx_sync"      type="bool"   value="$(arg approx_sync)"/>

      <remap from="camera_nodelet_manager/load_nodelet" to="camera_nodelet_manager/load_nodelet"/>
      <remap from="rgb/image"       to="color/image_raw"/>
      <remap from="depth/image"     to="aligned_depth_to_color/image_raw"/>
      <remap from="rgb/camera_info" to="color/camera_info"/>
                                                                                                                                                                              <remap from="rgbd_image"      to="rgbd_image"/>
    </node>
  </group>                                                                                                                                                              
</launch>

Asked by MisticFury on 2020-11-02 21:12:26 UTC

Comments

Answers

figured it just added this to my launch file and it seem to do the trick i now get a stable 11fps.

  <param name="/camera/color/image_raw/compressed/format" type="string" value="jpeg" />
  <param name="/camera/color/image_raw/compressed/jpeg_level"  type="int" value="1" />
  <param name="/camera/aligned_depth_to_color/image_raw/compressedDepth/format" type="string" value="png" />
  <param name="/camera/aligned_depth_to_color/image_raw/compressedDepth/png_level"  type="int" value="0" />

Asked by MisticFury on 2020-11-03 11:54:48 UTC

Comments