SQL cache size error

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

SQL cache size error

senia
This post was updated on .
Hi,
I started to film longer videos using R200 (at 60FPS) using the rtabmap data_recorder in ROS.
When I got to an about 1.2GB of a database file(couple of minutes) and tried to open it, using database viewer or or by mapping from it, I got the following error:
[ INFO] (2016-05-17 19:05:23.287) DBDriverSqlite3.cpp:339::connectDatabaseQuery() Using database "./output1.db" from the hard drive.
[ INFO] (2016-05-17 19:05:23.288) DBDriverSqlite3.cpp:374::connectDatabaseQuery() Database version = 0.0.0
[FATAL] (2016-05-17 19:05:23.288) DBDriverSqlite3.cpp:432::executeNoResultQuery() Condition (rc == SQLITE_OK) not met! [DB error: file is encrypted or is not a database, the query is PRAGMA cache_size = 10000;]
terminate called after throwing an instance of 'UException'
  what():  [FATAL] (2016-05-17 19:05:23.288) DBDriverSqlite3.cpp:432::executeNoResultQuery() Condition (rc == SQLITE_OK) not met! [DB error: file is encrypted or is not a database, the query is PRAGMA cache_size = 10000;]
Updating the Preferences -> Database -> Sqlite3 cache size value nor adding the following in the launch file didn't work. ( without bigger than smaller than symbols)
      param name="DbSqlite3/CacheSize"        type="int" value="999999"/
Does the saved databases are corrupted?(they have info judging by their size)
How could I make sure it won't happen?
Thank you very much,
Senia.
Reply | Threaded
Open this post in threaded view
|

Re: SQL cache size error

matlabbe
Administrator
Hi,

Do you have the same problem with a smaller database?
Reply | Threaded
Open this post in threaded view
|

Re: SQL cache size error

senia
This post was updated on .
No, Smaller filming (databases) don't have this problem.
Reply | Threaded
Open this post in threaded view
|

Re: SQL cache size error

matlabbe
Administrator
Hi,

I think I've found the problem. You may run out of RAM because the default option of data_recorder.launch is to record data in RAM. You may want to record to hard drive instead for longer recording (set record_in_RAM:=false).

Example using kinect2:
$ roslaunch kinect2_bridge kinect2_bridge.launch publish_tf:=true
$ roslaunch rtabmap_ros data_recorder.launch record_in_RAM:=false rgb_topic:=/kinect2/qhd/image_color_rect rgb_info_topic:=/kinect2/qhd/camera_info depth_topic:=/kinect2/qhd/image_depth_rect frame_id:=kinect2_link

I did a test until 2.3 GB and still recording. The resulting database can be opened in Database Viewer. The input is set to 30 Hz (kinect2_bridge node), the resulting database contains 5309 images for 179.738 sec (29.54 Hz). I changed here to set default to false instead (making it working more like a rosbag).

cheers
Reply | Threaded
Open this post in threaded view
|

Re: SQL cache size error

senia
I can confirm too that this fixed the problem, recording a hour+ videos without a problem.
Thanks again