reloc: --slam-reloc(-auto) tu dinh vi lai trong node (tu xoay/tu di, nguoi luon thang); web ve robot mo o vi tri doan; sieu am cho xoay; LocalMatch gioi han huong

This commit is contained in:
trung09122002
2026-09-29 11:16:04 +07:00
parent 399a46139e
commit 60853531aa
15 changed files with 883 additions and 27 deletions

View File

@@ -29,6 +29,7 @@
// ham thuan tren (luoi, diem). Viec gom scan khi xoay va dat pose ban dau la
// cua ben goi.
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <string>
@@ -146,14 +147,24 @@ RelocMatch GlobalMatch(const LikelihoodField& field,
const std::vector<Point>& pts_odom,
const GlobalLocalizerConfig& cfg);
// Khop CUC BO: robot phai nam trong `radius` quanh `center` (frame map), MOI
// huong. De XAC MINH ung vien tu nguon khac (VPR). `odom_now`: pose robot
// trong frame odom luc gom -- rang buoc dat tren vi tri ROBOT, khong phai tam
// dam diem (o hanh lang tam lech robot nhieu met). score = -1 neu khong khop.
// Khop CUC BO: robot phai nam trong `radius` quanh `center` (frame map). De
// XAC MINH ung vien tu nguon khac (VPR). `odom_now`: pose robot trong frame
// odom luc gom -- rang buoc dat tren vi tri ROBOT, khong phai tam dam diem (o
// hanh lang tam lech robot nhieu met). score = -1 neu khong khop.
//
// `yaw_center` (rad, huong ROBOT trong map) + `yaw_window`: chi xet huong
// trong cua so do. Mac dinh (NAN) = moi huong.
//
// ⚠️ VI SAO CAN GIOI HAN HUONG: robot that 2026-09-29, 113/249 lan hoi LiDAR
// NHAP NHANG HUONG (mot scan LakiBeam ~270 do). Khop cuc bo MOI huong quanh
// ung vien VPR dung cho van truot sang huong LON cung voi LiDAR toan cuc (4
// lan chot sai, lech 105-177 do) -- vi no van dung LiDAR de chon huong. Anh
// VPR biet camera nhin ve dau: de NO chon huong, LiDAR chi chinh chinh xac.
RelocHypothesis LocalMatch(const LikelihoodField& field,
const std::vector<Point>& pts_odom, const Pose2D& odom_now,
const Point& center, double radius,
const GlobalLocalizerConfig& cfg);
const GlobalLocalizerConfig& cfg,
double yaw_center = NAN, double yaw_window = M_PI);
// Tich luy gia thuyet qua nhieu vong, truyen bang ODOM (pose toan cuc chua
// biet). "Streak" = so vong LIEN TIEP mot gia thuyet dung dau.