Hi,
following kinect2 instructions from this
ros wiki tutorial, here is an example.
Record bag:
$ roslaunch kinect2_bridge kinect2_bridge.launch publish_tf:=true
$ rosrun tf static_transform_publisher 0 0 0 -1.5707963267948966 0 -1.5707963267948966 camera_link kinect2_link 100
$ rosbag record -O kinect2 /tf /kinect2/qhd/image_color_rect /kinect2/qhd/image_depth_rect /kinect2/qhd/camera_info
Play bag:
$ roscore
$ rosparam set use_sim_time true
$ roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" rgb_topic:=/kinect2/qhd/image_color_rect depth_topic:=/kinect2/qhd/image_depth_rect camera_info_topic:=/kinect2/qhd/camera_info
$ rosbag play --clock kinect2.bag
cheers,
Mathieu