This commit is contained in:
trung09122002
2026-09-18 18:14:42 +07:00
commit 48bd5377dc
224 changed files with 37685 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
#ifndef VSLAM_OCCUPANCY_EXPORT_H
#define VSLAM_OCCUPANCY_EXPORT_H
// Dung occupancy grid 2D tu do thi RTAB-Map, xuat ra struct POD.
//
// ================== BAY DA MAC MOT LAN ==================
// RTAB-Map luu du lieu NEN trong SensorData. `gridGroundCellsRaw()` va
// `gridObstacleCellsRaw()` tra ve ma tran RONG -- im lang, khong loi, khong
// canh bao -- cho toi khi goi `uncompressDataConst()`. Do dung la ly do
// `tools/probe_rtabmap` lan dau chay ra "1990 node, 0 o".
#include <string>
#include "vslam/vslam_common.h"
namespace rtabmap {
class Rtabmap;
}
namespace vslam {
// Nhung gi doc duoc tu DB TRUOC khi init. Dung de kiem dieu kien tien quyet
// ma khong phai mo ca do thi.
struct DbFacts {
bool exists = false;
int nodes = 0;
int words = 0; // 0 = ban do quet KHONG co tu vung
std::string optimizer_strategy; // tham so DB nho, co the khac cai ta ep
};
DbFacts InspectDatabase(const std::string& path);
StatusResponse ExportOccupancyGrid(rtabmap::Rtabmap& slam, OccupancyGrid* out);
// Doc thang tu DB, khong can Rtabmap dang chay. Dung cho
// `tools/vslam_slam_bench` va cho viec doi DB cu sang PGM.
StatusResponse ExportOccupancyGridFromDb(const std::string& db_path,
double cell_size, double range_max,
OccupancyGrid* out);
} // namespace vslam
#endif // VSLAM_OCCUPANCY_EXPORT_H