slam: pose odometry DUNG LUC QUET cho SLAM (noi suy lich su EKF -- luc quay tai cho, ghep scan voi pose hien tai lam lech 0.7 do va xoay ca ban do) + vong dong xa (slam.yaml far_loops, mac dinh bat: node vua tao vs node cu cach >= 100 buoc trong 1 m, ICP xac nhan, addLink) -- sim vong doc 52 m: cuoi vong 17-22 cm -> 1.5 cm

This commit is contained in:
trung09122002
2026-10-04 01:36:35 +07:00
parent f064dcf3ec
commit 6d552e231e
8 changed files with 232 additions and 0 deletions

View File

@@ -625,6 +625,29 @@ StatusResponse LoadAppConfig(const std::string& dir, AppConfig* out) {
}
}
// Khoi `far_loops:` -- vong dong xa luc quet. Vang mat = mac dinh.
if (!root["far_loops"].IsNull()) {
const ConfigNode v = root["far_loops"];
const StatusResponse r =
Reject(v, "slam.yaml far_loops",
{"enabled", "radius_m", "min_graph_gap", "max_corr_m", "max_corr_deg", "period_s"});
if (!r.ok()) return r;
FarLoopsConfig& c = out->far_loops;
c.enabled = v.get<bool>("enabled", c.enabled);
c.radius_m = v.get<double>("radius_m", c.radius_m);
c.min_graph_gap = v.get<int>("min_graph_gap", c.min_graph_gap);
c.max_corr_m = v.get<double>("max_corr_m", c.max_corr_m);
c.max_corr_deg = v.get<double>("max_corr_deg", c.max_corr_deg);
c.period_s = v.get<double>("period_s", c.period_s);
if (c.radius_m <= 0.0 || c.min_graph_gap < 10 || c.max_corr_m <= 0.0 ||
c.max_corr_deg <= 0.0 || c.period_s < 0.0) {
return StatusResponse::Error(
StatusCode::kInvalidArgument,
"slam.yaml far_loops: radius_m > 0, min_graph_gap >= 10, max_corr_m/deg > 0, "
"period_s >= 0");
}
}
// Khoi `slope:` -- di tren doc. Vang mat = tat.
if (!root["slope"].IsNull()) {
const ConfigNode v = root["slope"];