This commit is contained in:
trung09122002
2026-09-23 13:36:48 +07:00
parent dbcbf84dc3
commit 0a1b1b13f1
38 changed files with 2331 additions and 138 deletions

View File

@@ -15,6 +15,9 @@
#include <string>
#include "vslam/vslam_common.h" // StatusResponse. Khong vong:
// vslam_common.h chi keo unix_time.h
namespace vslam {
// --- Duong dan mac dinh ----------------------------------------------------
@@ -93,6 +96,30 @@ std::string RecordDir();
// map_hospital.db ma khong phai copy 3.8 GB.
std::string CorpusDir();
// --- Duong dan ban do: giai tuong doi + no {stamp} -------------------------
// Giai database_path cua SLAM:
// "" -> "" (DB trong RAM -- giu nguyen nghia)
// "/abs/x.db" -> "/abs/x.db" (tuyet doi thi khong dung toi)
// "x.db" -> MapDir() + "/x.db" (tuong doi = nam trong project)
//
// `{stamp}` o bat ky dau bi thay bang dau thoi gian DIA PHUONG %Y%m%d_%H%M%S,
// tinh MOT lan cho ca chuoi (hai lan xuat hien ra cung mot gia tri).
//
// ⚠️ Dung dong ho TUONG (std::time), KHONG phai Clock cua he: replay 100x
// se duc ra ten trung nhau neu lay dong ho mo phong.
//
// Khong gian `~`: shell da lam roi, lam lai la lech voi doi so trong nhay.
// Idempotent: f(f(x)) == f(x).
std::string ResolveMapPath(const std::string& raw);
// mkdir -p cho thu muc CHA cua `path`. Ok neu da co.
//
// Dung mkdir() POSIX chu khong phai <filesystem>: tren GCC 9 (xem
// CMakeLists.txt:76-88) <filesystem> can link them -lstdc++fs, ma vslam_common
// la dep cua MOI target trong cay nay.
StatusResponse EnsureParentDir(const std::string& path);
} // namespace vslam
#endif // VSLAM_NODE_CONSTANTS_H