Data Recording for High resolution

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Data Recording for High resolution

gkouros
This post was updated on .
Hi Mathieu,

I am using the data recording launcher (rtabmap_ros/launch/data_recorder.launch) and the rtabmap data_player to record and playback data from a ZED Stereo Camera and although it's working perfectly for VGA resolution at 30fps, I face high fps drops for higher resolutions (~15fps@720p, ~5fps@1080p). You can see the two launchers below. Is there any way I can increase the fps at higher resolutions (720p,1080p)?

Thank you in advance!

George

<launch>  
  <!-- data recording launcher -->
  <arg name="database"   default="output.db"/>
  <arg name="resolution" default="3" />
  <arg name="frame_rate" default="30" />
  <arg name="stereo"     default="false" />

  <include file="$(find rtabmap_ros)/launch/data_recorder.launch">
    <arg name="frame_id"           value="zed_camera_center" />
    <arg name="approx_sync"        value="false" />
    <arg name="output_path"        value="$(arg database)" />

    <arg name="subscribe_odometry" value="true" unless="$(arg stereo)" />
    <arg name="subscribe_stereo"   value="$(arg stereo)"/>

    <arg name="odom_topic"         value="/camera/odom" />
    <arg name="depth_topic"        value="/camera/depth/depth_registered" />
    <arg name="rgb_topic"          value="/camera/rgb/image_rect_color"/>
    <arg name="rgb_info_topic"     value="/camera/rgb/camera_info"/>
    <arg name="left_topic"         value="/camera/left/image_rect_color"/>
    <arg name="left_info_topic"    value="/camera/left/camera_info"/>
    <arg name="right_topic"        value="/camera/right/image_rect_color"/>
    <arg name="right_info_topic"   value="/camera/right/camera_info"/>
  </include>


<launch>

<launch>
  <!-- data playback launcher -->
  <arg name="database" default="~/.ros/output.db" />
  <param name="/use_sim_time" value="true" />

  <!-- playback recorded database -->
  <node name="rtabmap_db_player" pkg="rtabmap_ros" type="data_player"
        output="screen" ns="camera" 
        args="_database:=$(arg database) --clock"/>
</launch>
Reply | Threaded
Open this post in threaded view
|

Re: Data Recording for High resolution

matlabbe
Administrator
Hi,

it is a compression time issue. Each RGB frame is compressed as JPG and each depth frame in PNG. See those lines. On my computer, it is able to record at 30 Hz for resolution 2 (720p) and 3 (VGA). For resolution 1 (1080p), it is more like 15 Hz, then for resolution 0 (2K) it is more like 10-11 Hz.

To record at higher frame rate, use a more powerful computer or you may try recording in a rosbag instead (in raw format or using an image_transport video encoding).

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Data Recording for High resolution

gkouros
Thank you Mathieu. I recorded compressed images in rosbags and it works perfectly with the desired framerate.