Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Load-old-database-to-do-localization-tp1474p1480.html
Hi Di,
Did you start the localization mode from the launch file? When launching rtabmap in localization mode, the map will be empty until a localization is found with the map (the robot doesn't know where it is on start). So the robot should be already in a known environment. In localization mode, the database is read-only, so it should not be modified. You can always browse what is in your database using the database viewer: "$ rtabmap-databaseViewer ~/.ros/rtabmap.db".
There are some parameters (
here and
here for
rtabmap node) to filter the noise of the point cloud used for the projection map. Can you show a screenshot of RVIZ with the /rtabmap/cloud_map and /map topics shown?
To get odometry running faster, most of the parameters depend on the image size. You can try with smaller images. If your images are 720p or more, you may want to increase GFTT distance (minimum distance between extracted features):
<node pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry">
<param name="GFTT/MinDistance" type="string" value="10"/> <!-- default 5 pixels -->
<!-- reduce the number of features matched/extracted -->
<param name="OdomF2M/MaxSize" type="string" value="1000"/> <!-- maximum features map size, default 2000 -->
<param name="Vis/MaxFeatures" type="string" value="600"/> <!-- maximum features extracted by image, default 1000 -->
</node>
This will also give more uniformly distributed extracted features across the image.
Other feature types can be used (FAST/BRIEF is the fastest, but features may not be uniformly distributed):
$ rosrun rtabmap_ros rgbd_odometry | grep FeatureType
Param: Vis/FeatureType = "6" [0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB.]
Frame-to-Frame odometry can also be faster:
<node pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry">
<param name="Odom/Strategy" type="string" value="1"/> <!-- 0=Frame-to-Map (F2M) 1=Frame-to-Frame (F2F) -->
<!-- Optical flow may give more matches, but less robust correspondences -->
<param name="Vis/CorType" type="string" value="0"/> <!-- Correspondences: 0=Features Matching, 1=Optical Flow -->
</node>
cheers