Hi,
I think I've found the problem. You may run out of RAM because the
default option of data_recorder.launch is to record data in RAM. You may want to record to hard drive instead for longer recording (set record_in_RAM:=false).
Example using kinect2:
$ roslaunch kinect2_bridge kinect2_bridge.launch publish_tf:=true
$ roslaunch rtabmap_ros data_recorder.launch record_in_RAM:=false rgb_topic:=/kinect2/qhd/image_color_rect rgb_info_topic:=/kinect2/qhd/camera_info depth_topic:=/kinect2/qhd/image_depth_rect frame_id:=kinect2_link
I did a test until 2.3 GB and still recording. The resulting database can be opened in Database Viewer. The input is set to 30 Hz (kinect2_bridge node), the resulting database contains 5309 images for 179.738 sec (29.54 Hz). I changed
here to set default to false instead (making it working more like a rosbag).
cheers