This commit is contained in:
trung09122002
2026-09-19 17:10:18 +07:00
parent 3b281174d0
commit f8a04a2a0b
15 changed files with 746 additions and 27 deletions

View File

@@ -34,7 +34,15 @@ struct SlamSnapshot {
std::string mode = "idle"; // mapping | localization | update_map | idle
bool localized = false;
double score = 0.0;
// ⚠️ `loop_closure_id` la vong dong theo HINH ANH -- can tu vung thi giac.
// Voi SLAM chi dung scan (Word = 0) no LUON bang 0, khong phai vi khong co
// vong dong ma vi co che do khong ton tai.
//
// Co che that la PHAT HIEN KE CAN (`proximity_id`): tim node cu o gan roi
// khop ICP. Do moi la thu cat duoc sai so cong don.
int loop_closure_id = 0;
int proximity_id = 0;
int proximity_total = 0;
uint32_t map_version = 0;
double process_ms = 0.0;
};

View File

@@ -171,6 +171,8 @@ void WriteStateJson(const WebSnapshot& s, std::string* out) {
Bool("localized", s.slam.localized, out); Comma(out);
Num("score", s.slam.score, 3, out); Comma(out);
Int("loop_id", s.slam.loop_closure_id, out); Comma(out);
Int("prox_id", s.slam.proximity_id, out); Comma(out);
Int("prox_total", s.slam.proximity_total, out); Comma(out);
Int("map_version", s.slam.map_version, out); Comma(out);
Num("process_ms", s.slam.process_ms, 1, out);
out->push_back('}'); Comma(out);

View File

@@ -12,7 +12,7 @@ const MAGIC = 0x314C5356; // 'VSL1' little-endian
// Phien ban ma nguon giao dien. TANG khi doi app.js / app3d.js / style.css.
// Hien ngay tren thanh tren cung de phan biet "chua sua" voi "trinh duyet con
// cache ban cu".
const UI_VERSION = '2026-09-19f';
const UI_VERSION = '2026-09-19g';
// ⚠️ HAI bang mau, mot cho moi khung. Chung KHONG duoc giong nhau.
//

View File

@@ -325,11 +325,24 @@ function v3dSetShape(r) {
V3D.gtGroup = new THREE.Group();
const gtBody = v3dBuildRobot(r);
V3D.gtGroup.add(gtBody);
// ⚠️ Ve ground truth bang KHUNG DAY, khong phai khoi dac mo.
//
// Mot khoi dac CUNG KICH THUOC dat chong len hinh uoc luong lam sai so 4 cm
// trong nhu HAI con robot: mat doc "hai hinh khac nhau" chu khong doc "mot
// hinh lech mot chut". Da mat nhieu luot trao doi vi hieu ung do -- sai so
// that do duoc chi 0.008-0.037 m o 0.7 m/s, va ban do quet ra khop tuong
// that voi p90 = 5 cm, tuc mot o luoi.
//
// Khung day thi lech nho hien ra dung nhu no la: mot vien xanh la mong ben
// canh hinh dac. Lech LON van nhin thay ngay, va do moi la luc no dang bao
// dieu gi that.
V3D.gtGroup.traverse((o) => {
if (o.material) {
o.material = o.material.clone();
o.material.wireframe = true;
o.material.transparent = true;
o.material.opacity = 0.25;
o.material.opacity = 0.85;
o.material.depthTest = false; // khong bi than robot che khuat
if (o.material.color) o.material.color.set(0x00c853);
}
});