I have another question... I noticed the "gen_scan" option in RTAB-Map and its description says: "Generate laser scans from depth images". I read your tutorials about faking laser scans from Kinect point cloud, so I was wondering if just enabling "gen_scan" in RTAB-Map gives the same result without the additional node "depthimage_to_laserscan".
Yes, the "gen_scan" parameter gives similar results. I use it for convenience when there are more than 1 kinect (e.g. when extending the field of view with two kinects). The depthimage_to_laserscan gives a little more flexibility on the parameters (can also be visualized in RVIZ like a laser scan).
Actually I'm trying to setup RTAB-Map on my robot, I initially had some difficulties creating the odometry from the encoders, but now I'm at the next step where I have to integrate it with RTAB-Map, I'm following your tutorial and I hope everything will work :)