Re: simulating input of a kinect camera

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/simulating-input-of-a-kinect-camera-tp66p67.html

Hello Michael,
The database source can be used for that.

Record some data

  1. Start rtabmap as for usual mapping session:
  2. $ rtabmap
    
  3. "File -> New database..."
  4. Select your preferred camera driver :
    • "Detection -> select source -> RGB-D camera..."
  5. Press "play", then "pause" after the mapping process has begun
  6. "Edit -> Data recorder..." :
    • Select the output database name (default "output.db")
    • "Save in RAM?", select "yes" ("no" will make recording to hard drive, which may add some latency)
    • The "Data recorder" window should be opened
  7. Press "pause" again to continue the mapping
    • You should see recorded images in the "Data recorder" window.
  8. Close the "Data recorder" window to stop recording and the database will be saved on the hard drive.

Mapping using this recorded database as the source:

  1. Press "Stop", then "Edit -> Delete memory" to restart with a clean memory
  2. "Detection -> select source -> Database...":
    • Select the recorded "output.db"
    • [EDIT] For the "Use odometry saved in database?" message box, press "no"
  3. Press start
    • For the "Incompatible frame rates!" message box, press "yes"
    • For the "Some images may be skipped!" message box, press "yes"
  4. You are now mapping from the previously recorded data!

ROS

In ROS, you could use the rosbag mechanism to record some data and replay them. You could also use RGB-D SLAM datasets to compare with a ground truth. Still experimental, I've created a launch file (rgbdslam_datasets.launch) to use the RGB-D SLAM datasets and showing in RVIZ the estimated pose and the ground truth using TF. Example:
 $ wget http://vision.in.tum.de/rgbd/dataset/freiburg3/rgbd_dataset_freiburg3_long_office_household.bag
 $ rosbag decompress rgbd_dataset_freiburg3_long_office_household.bag
 $ roslaunch rtabmap rgbdslam_datasets.launch
 $ rosbag play --clock rgbd_dataset_freiburg3_long_office_household.bag
Regards,
Mathieu