This commit is contained in:
trung09122002
2026-09-22 10:18:45 +07:00
parent 3c6e02d9d8
commit 58fae1778a
4 changed files with 138 additions and 43 deletions

View File

@@ -117,6 +117,20 @@ void WriteStateJson(const WebSnapshot& s, std::string* out) {
Num("yaw", s.pose_map.theta, 4, out);
out->push_back('}'); Comma(out);
// Bu do tre cua scan: quy tia tu pose HIEN TAI ve pose LUC QUET. Cloud
// duoc bu san o server (EncodeCloud), scan thi khong -- no la du lieu cuc.
//
// Chi xuat khi CO. Khong co thi trinh duyet ve bang pose hien tai nhu truoc,
// chu khong phai ve bang mot delta 0 gia mao la "da bu".
if (s.have_scan_delta) {
Key("scan_delta", out);
out->push_back('{');
Num("x", s.scan_delta.x, 4, out); Comma(out);
Num("y", s.scan_delta.y, 4, out); Comma(out);
Num("yaw", s.scan_delta.theta, 5, out);
out->push_back('}'); Comma(out);
}
// Ground truth chi xuat khi CO. Xuat 0 khi khong co la noi doi: client
// khong phan biet duoc "dung o goc" voi "khong biet".
if (s.have_ground_truth) {