First of all, thanks for this great package. It's working pretty well out of the box, which for sure makes justice with all the hard work is behind. Congratulations!
Following your tutorials, and reading the forum, I've been able to interface rtabmap_ros with my robot. As I wanted to map and navigate around my office, which is quite big, I was following the multi-mapping session tutorials together with ROS so as to be able to generate the full map in several sessions (also saving the rosbags for offline postprocessing).It seems it is working fine, as the loop closure between sessions are found correctly, and I'm able to download the full 3D cloud to RVIZ.
The problem arises with the 2D grid map. When I open the database in localization mode (localization:=true), the 2D grid map is not shown in RVIZ. Even once the robot is localized, I can only see the graph, but not the 2D grid map. This behavior happens both with the real robot and the rosbag files.
Reading the forum, I have tried to disable the memory management to force the fully-spawn of the map, and also force the generation of the grid map setting CreateOccupancyGrid to true, but this changes didn't solve the issue.
I've also tried to save the grid map with the map_saver node, and then reload it once rtabmap is started, but the map is not aligned, and it disappears once rtabmap publish the map, which is empty.
Finally, I've also tried to generate the grid map from the rtabmap-databaseViewer, but the changes are not loaded once I start the database from rtabmap_ros.
Edit: just mention that my robot has both laser and kinect, and I'm building the map with the kinect to have a better estimation of obstacles such as tables and chairs.
Edit 2: with my current configuration, I'm able to display the whole octomap_gridmap, if that helps you to track the problem.
Rigth now, I'm stucked with this issue, and I don't know what I'm missing. If you can point me in the right direction I'll be very grateful.
PS: I've attached an image which shows, for just one mapping session, how it looks in rtabmapviz and rviz. It can be seen the robot is localized, but the 2d grid map is not shown.
I finally managed to solve the issue, and now I'm able to see the 2d grid map.
I barely changed my launch file, but from what I understood from the errors, I was having some issues between the ICP (too many errors regarding the scan matching) and the TORO Optimizer (maybe not fully localized because of the ICP and, thus, not loading the grid map?)
I've changed to g2o optimizer, which was working well for single maps, and the 2d grid map from a two-map-session has been spawned correctly. I'll made some more test and let you know if I find any weird behaviour.
Just for curiosity, why do you recommend using TORO for the multiple-session map?
When getting larger maps and more and more sessions, g2o sometimes provide very weird optimizations, even more if the odometry covariance represents poorly the real odometry error. As long as g2o is creating you good maps, you can stick with it. However, if you have very strange map optimizations, you may switch between TORO and g2o to see the differences.