Re: Remote Mapping - ZED Stream Throttle

Posted by DavideR on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Remote-Mapping-ZED-Stream-Throttle-tp5422p5446.html

Thank you Mathieu,
I remapped the topics to make the nodelet working with the ZED.
I share here the launch file for the community :

ZED CAMERA DATA THROTTLE - Launch File

<launch>
  <arg name="rate"  default="3"/>
  <arg name="decimation"  default="1"/> <!-- Reduce the image size, e.g., 2 means "width/2 x height/2". -->
  <arg name="approx_sync" default="false" />

  <!-- Use same nodelet used by ZED -->
  <group ns="zed">
    <node pkg="nodelet" type="nodelet" name="data_throttle" args="load rtabmap_ros/data_throttle zed_nodelet_manager" output="screen">

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

      <remap from="rgb/image_in"       to="/zed/rgb/image_rect_color"/>
      <remap from="depth/image_in"     to="/zed/depth/depth_registered"/>
      <remap from="rgb/camera_info_in" to="/zed/rgb/camera_info"/>

      <remap from="rgb/image_out"       to="/zed/throttled/rgb/image_rect_color"/>
      <remap from="depth/image_out"     to="/zed/throttled/depth/depth_registered"/>
      <remap from="rgb/camera_info_out" to="/zed/throttled/rgb/camera_info"/>

    </node>
  </group>
</launch>

Here some Github issues about the ZED camera and framerate :

https://github.com/stereolabs/zed-ros-wrapper/issues/363
https://github.com/stereolabs/zed-ros-wrapper/issues/292

Cheers