Re: Combining RTAB-Map with the navigation stack

Posted by icolwell on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Combining-RTAB-Map-with-the-navigation-stack-tp1171p1195.html

Hi Mathieu,

Good news and bad news. Good news is that when I uncommented those lines you mentioned, it worked great! The shape is gone now, looking much better. One thing that I thought of is that we actually have our laser scanner mounted upside down, could that be part of the problem leading to the generation of the shape?

Bad news is that the grid is still "morphing" every couple of seconds in localization mode. I noticed no new points appearing on the grid where there was previously free space but the grid is still being republished and looks slightly different every couple of seconds. I will post my launch file below, perhaps I am missing something obvious.

RTABMAP portion of the launch file:
		<!-- start the rtabmap node -->
		<node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="$(arg rtabmap_args)">
			<!-- Remaps for RTABMAP -->
			<remap from="odom" to="$(arg odom_topic)" />
			<remap from="scan" to="$(arg scan_topic)" />

			<!-- RTABMAP parameters (http://wiki.ros.org/rtabmap_ros#rtabmap) -->
			<param name="frame_id" type="string" value="$(arg frame_id)" />
			<param name="subscribe_depth" type="bool" value="true" />
			<param name="subscribe_scan" type="bool" value="true" />

			<param name="RGBD/NeighborLinkRefining" type="string" value="true"/> <!-- Do odometry correction with consecutive laser scans -->

			<!-- Parameters used for flat surface environments -->
			<param name="Optimizer/Slam2D" type="string" value="true"/> <!-- Optimize on only 3 degrees of freedom (x, y, theta) -->
			<param name="Reg/Force3DoF" type="string" value="true"/> <!-- Force 3 degrees of freedom transform -->
			<param name="Reg/Strategy" type="string" value="2"/> <!-- 0=Visual, 1=ICP, 2=Visual+ICP -->

			<!-- Optimize graph from initial node so /map -> /odom transform will be generated -->
			<param if="$(arg localization)" name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
			<param unless="$(arg localization)" name="RGBD/OptimizeFromGraphEnd" type="string" value="true"/>
			<param name="Mem/MapLabelsAdded" type="string" value="true"/> <!-- Add labels to the map -->

			<!-- Are these even RTABMAP params? -->
			<param name="rgb/image_transport"   type="string" value="compressed"/>
			<param name="depth/image_transport" type="string" value="compressedDepth"/>

			<!-- Localization mode -->
			<param     if="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="false"/>
			<param unless="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="true"/>

			<!-- Initialize the Working Memory with all nodes in Long-Term Memory.
				When false, it is initialized with nodes of the previous session -->
			<param name="Mem/InitWMWithAllNodes" type="string" value="$(arg localization)"/>

			<!-- Prevent scan from updating map -->
			<param if="$(arg localization)" name="map_negative_poses_ignored" type="bool" value="true" />

			<!-- Maximum time allowed to update the map (ms) (0 means infinity). -->
			<param unless="$(arg localization)" name="Rtabmap/TimeThr" type="string" value="700" />
		</node>

Thanks!
Ian