Convert database to 2D map fail

Posted by simon.xm.lee on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Convert-database-to-2D-map-fail-tp3243.html

Hi Mathieu,

After I do mapping, I want to convert the database data to 2D map(pgm,yaml). I follow the steps which are mention in http://answers.ros.org/question/217097/export-2d-map-from-rviz-andor-rtab-map/ .

1. $ cp ~/.ros/rtabmap.db ~/simon_rtabmap_20170601.db
2. $ roscore
3. $ rosrun rtabmap_ros rtabmap _database_path:=simon_rtabmap_20170601.db
4. $ rosrun map_server map_saver map:=proj_map
5. $ rosservice call /publish_map 1 1 0


When I run step 3, the console show some error logs like below.
[ERROR] (2017-06-01 09:17:47.601) VWDictionary.cpp:567::addWordRef() Not found word 88954
[ERROR] (2017-06-01 09:17:47.601) VWDictionary.cpp:567::addWordRef() Not found word 88955
[ERROR] (2017-06-01 09:17:47.601) VWDictionary.cpp:567::addWordRef() Not found word 88956
[ERROR] (2017-06-01 09:17:47.601) VWDictionary.cpp:567::addWordRef() Not found word 88957
[ERROR] (2017-06-01 09:17:47.601) VWDictionary.cpp:567::addWordRef() Not found word 88958
[ERROR] (2017-06-01 09:17:47.601) VWDictionary.cpp:567::addWordRef() Not found word 88959
[ERROR] (2017-06-01 09:17:47.601) VWDictionary.cpp:567::addWordRef() Not found word 88960


Then  I run step 5, the console of step 3 show other error logs.
[ WARN] [1496308751.745521912]: poses and signatures are not the same size!? 281 vs 392
[ WARN] [1496308751.745983990]: Many occupancy grids should be loaded (~281), this may take a while to update the map(s)...
[ WARN] (2017-06-01 09:19:11.749) MapsManager.cpp:480::updateMapCaches() Occupancy grid for location 41 should be added to global map (e..g, a ROS node is subscribed to any occupancy grid output) but it cannot be found in memory. For convenience, the occupancy grid is regenerated. Make sure parameter "RGBD/CreateOccupancyGrid" is true to avoid this warning for the next locations added to map. For older locations already in database without an occupancy grid map, you can use the "rtabmap-databaseViewer" to regenerate the missing occupancy grid maps and save them back in the database for next sessions. This warning is only shown once.
[ WARN] (2017-06-01 09:19:11.749) SensorData.cpp:702::uncompressDataConst() Requested raw image data, but the sensor data (41) doesn't have image.
[ WARN] (2017-06-01 09:19:11.749) SensorData.cpp:717::uncompressDataConst() Requested depth/right image data, but the sensor data (41) doesn't have depth/right image.
[FATAL] (2017-06-01 09:19:11.749) util3d.cpp:993::cloudRGBFromSensorData() Condition (!sensorData.imageRaw().empty()) not met!
[ERROR] [1496308752.002965156]: Exception thrown while processing service call: [FATAL] (2017-06-01 09:19:11.749) util3d.cpp:993::cloudRGBFromSensorData() Condition (!sensorData.imageRaw().empty()) not met!


The console of step 5 also show below.
ERROR: service [/publish_map] responded with an error: [FATAL] (2017-06-01 09:19:11.749) util3d.cpp:993::cloudRGBFromSensorData() Condition (!sensorData.imageRaw().empty()) not met!


Please give me the suggestion for this problem, thanks.


[Add information]
I use rtabmap-databaseViewer tool to open the database and I can see the 2D map in "Graph view".



Regards.