Rosanswers logo

Hi all, I am using ROS indigo.I want to create a 3D map of my lab using hand held kinect and I read that rtab map is the best option.But my ROS did not have rtab map package.Someone please help me to install rtab map.

Originally posted by David John on ROS Answers with karma: 19 on 2016-01-11

Post score: 0


1 Answer 1


Rosanswers logo


sudo apt-get install ros-indigo-rtabmap ros-indigo-rtabmap-ros

If you want to build the latest version from source, visit the rtabmap_ros's GitHub page (see installation instructions at the bottom of the page).

For an example of hand-held mapping with a Kinect, checkout this tutorial.

EDIT (from questions in comments)

You can export the cloud in PLY, PCD or OBJ (See File->"Export clouds" in main window). These formats can be loaded in MeshLab, where you can export them in X3D or WRL.

If you don't use "--delete_db_on_start" when launching the launch file, the rtabmap.db file contains all sessions. If there are no loop closures between the sessions, you will only see the latest one when starting a new session. If you want one session per database, you have to manually copy ~/.ros/rtabmap.db between the sessions. Note that for hand-held mapping with RTAB-Map, you don't even need ROS, and the standalone version is easier to use to create/save multiple databases (just type $ rtabmap to use the standalone).

To view all sessions contained in a database, you can open it with $ rtabmap-databaseViewer ~/.ros/rtabmap.db. Then show the Graph view panel and set from which node the graph is optimized. Depending on which node the map is optimized, a different scanning session may appear. You can then generate the point cloud associated with the current graph (File->export).


Originally posted by matlabbe with karma: 6409 on 2016-01-11

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by David John on 2016-01-12:
thank you sir I used this command and installed rtabmap.Before doing 3D mapping with real kinect I tried it with turtlebot package.I used the commands 1.roslaunch turtlebot_bringup minimal.launch 2.roslaunch rtabmap_ros demo_turtlebot_mapping.launch but it says no openni2 devices connected.

Comment by matlabbe on 2016-01-12:
Look at section 5 of this tutorial. If Turtlebot has a Kinect, you should do $ export TURTLEBOT_3D_SENSOR=kinect before launching the nodes.

Comment by David John on 2016-01-14:
Thank you sir I started working with real kinect.And I got 3D map using rtabmap.I got a folder rtabmap.db in ~/.ros folder.But this folder is saving my current scan data.I am losing my previous scan data on every scan.Sir I also want to know is it possible to convert this .db file to .wrl format.

Comment by matlabbe on 2016-01-14:
Updated the answer for these questions.

Comment by David John on 2016-01-19:
Thank you sir...It worked for me.I want to convert the pointcloud to laser scan and i used freenect to collect the kinect data.Then I used the command rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/camera/depth/image_raw .But it doesnt work.There were no data under the topic /scan.

Comment by matlabbe on 2016-01-21:
if you started freenect.launch with depth_registered:=true, you should use /camera/depth_registered/image_raw

Comment by David John on 2016-01-22:
I did it...it's working..thank you.

Comment by David John on 2016-01-25:
sir..I used hecto_slam to build a 2D map from kinect data.I used the command roslaunch hector_slam_launch tutorial.launchand getting "[ WARN] [1453709644.419967908]: No transform between frames /map and scanmatcher_frame available after 20.001889 seconds of waiting. This warning only".Plz help me

Comment by matlabbe on 2016-01-27:
It may be better to as a new question about hector_slam for this specific problem. Note that rtabmap can provide a 2D map on /grid_map output topic if its input scan topic is set.

Comment by David John on 2016-01-28:
Ok.I have posted a new question :) link


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.