Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Improving-wall-alignment-in-demo-mapping-bag-example-tp1766p1769.html
Hi,
Did you try launching rtabmap with
demo_robot_mapping.launch file?
Here are the modified parameters (from defaults):
<param name="RGBD/NeighborLinkRefining" type="string" value="true"/> <!-- Do odometry correction with consecutive laser scans -->
<param name="Reg/Strategy" type="string" value="1"/> <!-- 0=Visual, 1=ICP, 2=Visual+ICP -->
<param name="Optimizer/Slam2D" type="string" value="true"/>
<param name="Reg/Force3DoF" type="string" value="true"/>
Just re-tested the demo with Indigo binaries (0.11.8):
$ rosbag fix demo_mapping.bag demo_mapping_fix.bag
$ roslaunch rtabmap_ros demo_robot_mapping.launch rviz:=true rtabmapviz:=false
$ rosbag play --clock demo_mapping_fix.bag

If I publish the map not optimized after the bag is finished:
$ rosservice call /rtabmap/publish_map 1 0 0

The results are similar to yours. I also tested with removing the modified parameters of the launch file, but I still have very similar results than the first screenshot above. It doesn't seem to be the modified parameters the problem.
To get results like the second screenshot, either graph optimization is disabled or proximity detection is disabled (yellow links above). The later case is like in this
video: only global loop closures are detected at the end (at
1:41, red link above) when the camera is facing the same direction than in previous traversal, so the map can be corrected. In your screenshot, it seems you didn't finish the bag, so we can see if it could be also a graph optimization problem.
Maybe not a big deal, but your fixed_frame in global options of RVIZ seems not set to /map, this can influence how MapCloud assembles the clouds.
cheers,
Mathieu