Re: RTABMAP closes with error when mapping for long durations

Posted by alexr on
URL: http://official-rtab-map-forum.206.s1.nabble.com/RTABMAP-closes-with-error-when-mapping-for-long-durations-tp150p159.html

Dear Mathieu,

Thanks for your reply. I see now the problem. If I am correct rtabmap uses a short term working memory and long term memory for storing the poses and retrieve them from the long term memory when loop closing is required. So by using the suggested parameters I will be forcing them to store only a certain threshold nodes, am i correct?

right now my parameter setting looks like this :

<group ns="rtabmap">

        <node name="rtabmap" pkg="rtabmap" type="rtabmap" output="screen" args="--delete_db_on_start">

            <param name="frame_id" type="string" value="base_link"/>

            <param name="subscribe_depth" type="bool" value="true"/>
            <param name="subscribe_laserScan" type="bool" value="true"/>

            <remap from="odom" to="/odom"/>
            <remap from="scan" to="/scan"/>

            <remap from="rgb/image" to="/camera/rgb/image_rect_color"/>
            <remap from="depth/image" to="/camera/depth_registered/image_raw"/>
            <remap from="rgb/camera_info" to="/camera/depth_registered/camera_info"/>

            <param name="queue_size" type="int" value="10"/>
           <param name="Rtabmap/DatabasePath" type="string" value="$(arg HOME)/.ros/rtabmap.db"/>  <!-- Database used for mapping -->

        <param name="queue_size" type="int" value="10"/>
        
          <!-- RTAB-Map's parameters: do "rosrun rtabmap rtabmap (double-dash)params" to see the list of available parameters. -->
          <param name="Mem/IncrementalMemory" type="string" value="true"/>          <!-- true = Mapping/SLAM mode-->
  
          <param name="Rtabmap/DetectionRate" type="string" value="2"/>     <!-- Don't need to do relocation very often! Though better results if the same rate as when mapping. -->
          <param name="DbSqlite3/CacheSize" type="string" value="10000"/>           <!-- Sqlite cache size (default is 2000) -->
          <param name="RGBD/ScanMatchingSize" type="string" value="0"/>             <!-- Do odometry correction with consecutive laser scans -->
          <param name="RGBD/LocalLoopDetectionSpace" type="string" value="false"/>   <!-- Local loop closure detection (using estimated position) with locations in WM -->
          <param name="RGBD/LocalLoopDetectionTime" type="string" value="false"/>    <!-- Local loop closure detection with locations in STM -->
          <param name="Mem/BadSignaturesIgnored" type="string" value="false"/>      <!-- Don't ignore bad images for 3D node creation (e.g. white walls) -->
          <param name="LccIcp/Type" type="string" value="2"/>                       <!-- Loop closure transformation refining with ICP: 0=No ICP, 1=ICP 3D, 2=ICP 2D -->
          <param name="LccIcp2/Iterations" type="string" value="100"/>
          <param name="LccIcp2/VoxelSize" type="string" value="0"/>
          <param name="LccBow/MinInliers" type="string" value="5"/>                 <!-- 3D visual words minimum inliers to accept loop closure -->
          <param name="LccBow/MaxDepth" type="string" value="4.0"/>                 <!-- 3D visual words maximum depth 0=infinity -->
          <param name="LccBow/InlierDistance" type="string" value="0.05"/>           <!-- 3D visual words correspondence distance -->
          <param name="RGBD/AngularUpdate" type="string" value="0.01"/>             <!-- Update map only if the robot is moving -->
          <param name="RGBD/LinearUpdate" type="string" value="0.01"/>              <!-- Update map only if the robot is moving -->
          <param name="Rtabmap/TimeThr" type="string" value="0"/>
          <param name="Mem/RehearsalSimilarity" type="string" value="0.45"/>
          <param name="Mem/RehearsedNodesKept" type="string" value="false"/>   
          <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>    <!-- Optimize graph from the latest node -->
         <param name="Kp/RoiRatios" type="string" value="0.0 0.0 0.0 0.3"/>    
        </node>

        <node pkg="rtabmap" type="grid_map_assembler" name="grid_map_assembler" output="screen">
                <remap from="grid_map" to="/map"/>
                <param name="scan_voxel_size" type="str" value="0.01" />
        </node>
    </group>

    <group ns="TT">
            <!-- RTAB-Map's parameters: do "rosrun rtabmap rtabmap (double-dash)params" to see the list of available parameters. -->


            <param name="Rtabmap/DetectionRate" type="string" value="3"/>            <!-- Don't need to do relocation very often! Though better results if the same rate as when mapping. -->

            <param name="Mem/STMSize" type="string" value="20"/>                     <!-- 20 location in short-term memory -->
            <param name="Mem/IncrementalMemory" type="string" value="true"/>         <!-- true = mapping mode-->
            
        <param name="Mem/STMSize" type="string" value="20"/>                     <!-- 20 location in short-term memory -->
        <param name="Mem/IncrementalMemory" type="string" value="true"/>         <!-- true = mapping mode-->

        <param name="RGBD/ScanMatchingSize" type="string" value="1"/>            <!-- Do odometry correction with consecutive laser scans -->
        <param name="RGBD/LocalLoopDetectionSpace" type="string" value="false"/> <!-- Local loop closure detection (using estimated position) with locations in WM -->
        <param name="RGBD/LocalLoopDetectionTime" type="string" value="true"/>   <!-- Local loop closure detection with locations in STM -->
        <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>    <!-- Optimize graph from initial node so /map -> /odom transform will be generated -->

        <param name="LccIcp/Type" type="string" value="2"/>                      <!-- 0=No ICP, 1=ICP 3D, 2=ICP 2D -->

        <param name="LccBow/MaxDepth" type="string" value="0.0"/>                <!-- 3D visual words maximum depth 0=infinity -->
        <param name="LccBow/InlierDistance" type="string" value="0.1"/>          <!-- 3D visual words correspondence distance -->
        <param name="LccBow/MinInliers" type="string" value="10"/>

        <param name="Odom/MinInliers" type="string" value="10"/>

    </group>

What is the use of this parameter:
<param name="DbSqlite3/CacheSize" type="string" value="10000"/>  

Can you explain what the values suggested for Rtabmap/TimeThr = 700 and Rtabmap/MemoryThr= 400 are meant for?

Thanks

Alex
------ Alex