Convert database to 2D map fail

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Convert database to 2D map fail

simon.xm.lee
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.


Reply | Threaded
Open this post in threaded view
|

Re: Convert database to 2D map fail

matlabbe
Administrator
Hi,

I updated the code to not assert if inputs are invalid in the cloudRGBFromDepth() function. You can try to update the code.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Convert database to 2D map fail

simon.xm.lee
Hi Mathieu,

I try mapping several times today, but I cannot reproduce the case which happened yesterday. However I encounter new case. After I do step 3, it shows below error logs. I also find it would happen easily when do mapping bigger area.

[FATAL] (2017-06-02 07:59:54.347) DBDriverSqlite3.cpp:2280::loadLastNodesQuery() Condition (rc == SQLITE_DONE) not met! [DB error (0.12.5): database disk image is malformed]
[ INFO] [1496390394.363370637]: Parameters are not saved! (No configuration file provided...)
rtabmap: Saving database/long-term memory... (located at /home/ubuntu/simon_rtabmap_20170602_7.db)
Segmentation fault

Regards.
Reply | Threaded
Open this post in threaded view
|

Re: Convert database to 2D map fail

matlabbe
Administrator
Hi,

It looks like the database is corrupted. Did you try with a clean database (rtabmap_args:="--delete_db_on_start") if the problem still occur?

cheers