sim: dia hinh 3D -- doc va san cao tu model vslam_terrain_*, robot di tren mat san, LiDAR tia 3D, ground truth 6-DoF, world slope_test (5 doc 5-30 do)

This commit is contained in:
trung09122002
2026-10-03 18:31:13 +07:00
parent be2aa17e3e
commit 26ee1a3b72
27 changed files with 2373 additions and 37 deletions

View File

@@ -425,6 +425,19 @@ function v3dSetPose(group, p) {
group.position.x = p.x;
group.position.z = -p.y;
group.rotation.y = p.yaw;
// Cao do va nghieng CHI khi pose mang chung -- hien chi ground truth cua sim
// (`gt.z/roll/pitch`). Pose uoc luong la 2D: KHONG dong vao y, de hop dong
// o tren van dung (test/www/test_robot_marker.js muc 4).
//
// Nhom NGOAI duoc dat cao do san (`z`), phep nang wheel_radius van o tang
// trong. Goc: ROS R = Rz(yaw) Ry(pitch) Rx(roll); three.js y-len, z = -y_ros
// -> Ry(yaw) Rz(-pitch) Rx(roll), tuc thu tu 'YZX'.
if (p.z !== undefined) group.position.y = p.z;
if (p.roll !== undefined || p.pitch !== undefined) {
group.rotation.order = 'YZX';
group.rotation.x = p.roll || 0;
group.rotation.z = -(p.pitch || 0);
}
}
// scan: mang [x0,y0, x1,y1, ...] trong frame LASER (xem ghi chu ben trong).