How to generate database with my own data?

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

How to generate database with my own data?

Letiantian
Dear Matlabbe, I have two questions:

(1)How do I generate the correct database with my own data, such as .ply point cloud data, rgb images, depth images and camera poses?  Or that is to say, in order to generate .db file (like chalet1.db (314 MB),
chalet2.db (68 MB) in https://github.com/introlab/rtabmap/wiki/Multi-Session-Mapping-with-RTAB-Map-Tango#example-with-docker ), how do I import my own data into the database? Could you please give me an example with c++ code?

(2) I build a Ratabmap object as follows:
rtabmap::Rtabmap mRM;
rtabmap::ParametersMap parameters;
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kRGBDEnabled(), "true"));
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kMemCompressionParallelized(), "true"));
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kMemImageCompressionFormat(), ".jpg"));
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kMemSaveDepth16Format(), "false"));
std::string mDbPath = std::string(basePath + "/multicamera_srv.db");
rtabmap::DBDriver *mDBDriver = rtabmap::DBDriver::create(parameters);
mRM.init(parameters, mDbPath);
How do I check whether my data "multicamera_srv.db" is the correct data that I expect.

By the way, I use sourced-compiled RTAB-Map on windows x64 systems.
 Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: How to generate database with my own data?

matlabbe
Administrator
Hi,

The easiest way would be to use RTAB-Map standalone, go in Preferences->Source, select RGB-D source type, scroll down to select "Images" driver, then fill those parameters:
1- Path to directory containing RGB images.
2- Path to directory containing depth images.
3- Odometry file. Select the correct format below.
4- Odometry format.
5- Path to directory containing optional laser scans (*.pcd, *.ply, *.bin [KITTI format]).
6- Local transform from /base_link to /scan_link.
7- Maximum laser scan points.

cheers,
Mathieu