slam,odometry,perception: di tren doc (G4, slam.yaml slope.enabled, mac dinh tat) -- z robot = tich -ds*sin(pitch IMU) kep phang < 1.5 do va neo vao ban do (HeightEstimator), odometry ngang, scan cho SLAM bu nghieng + bo tia cham san/doc theo ban do do cao tu depth (ScanLeveler, ElevationMap), z/roll/pitch luu vao node + do thi z 1-D + mat san theo node (height_map), voxel dat o z that va vat can tinh tu san cuc bo, xoa tuong gia LiDAR tren doc noi camera da thay mat san, web z uoc luong, --sim-imu-hz

This commit is contained in:
trung09122002
2026-10-04 00:03:02 +07:00
parent 6735b53423
commit f064dcf3ec
32 changed files with 1799 additions and 10 deletions

View File

@@ -138,6 +138,13 @@ struct WebSnapshot {
double pitch = 0.0;
bool accel_ok = true;
// Di tren doc (slam.yaml `slope:`): z UOC LUONG cua robot. Chi xuat khi bat
// -- 0 khi tat la noi doi, client khong phan biet duoc "o san" voi "khong biet".
bool have_height = false;
double height_z = 0.0;
double height_sigma = 0.0;
bool on_slope = false;
// ============ GROUND TRUTH ============
// CHI co khi chay mo phong. Day la tuong duong cua /ground_truth/odom trong
// repo cu, noi ghi ro "khong estimator nao duoc subscribe".

View File

@@ -115,6 +115,15 @@ void WriteStateJson(const WebSnapshot& s, std::string* out) {
Num("x", s.pose_map.x, 3, out); Comma(out);
Num("y", s.pose_map.y, 3, out); Comma(out);
Num("yaw", s.pose_map.theta, 4, out);
if (s.have_height) {
// z + nghieng: khung 3D dat robot len doc. Chi khi BAT che do doc.
Comma(out);
Num("z", s.height_z, 3, out); Comma(out);
Num("roll", s.roll, 4, out); Comma(out);
Num("pitch", s.pitch, 4, out); Comma(out);
Num("z_sigma", s.height_sigma, 3, out); Comma(out);
Bool("on_slope", s.on_slope, out);
}
out->push_back('}'); Comma(out);
// Bu do tre cua scan: quy tia tu pose HIEN TAI ve pose LUC QUET. Cloud

View File

@@ -396,6 +396,11 @@ function onState(s) {
txt('gtErr', s.gt ? fmt(s.gt.err, 3) + ' m' : '--');
// Do cao san THAT (sim co doc). Pose uoc luong hien la 2D: chua co z.
txt('gtZ', s.gt && s.gt.z !== undefined ? fmt(s.gt.z, 3) + ' m' : '--');
// z uoc luong: chi co khi slam.yaml slope.enabled. +-sigma, (doc) khi |pitch|
// vuot nguong kep.
txt('estZ', s.pose && s.pose.z !== undefined
? fmt(s.pose.z, 3) + ' m \u00b1' + fmt(s.pose.z_sigma, 2) + (s.pose.on_slope ? ' (doc)' : '')
: '--');
state.slamMode = s.slam.mode;
txt('mode', s.slam.mode);

View File

@@ -74,6 +74,7 @@
cho biet uoc luong dang tot hay te. -->
<tr><td>sai so</td><td id="gtErr">--</td></tr>
<!-- Do cao san that (mo phong co doc). Uoc luong chua co z. -->
<tr><td>z uoc luong</td><td id="estZ">--</td></tr>
<tr><td>z that</td><td id="gtZ">--</td></tr>
</table>
</section>