drivers,sim: moi khung anh mot bo dem rieng (sua tranh chap voi SlamLoop o RealSense/sim/replay); sim: IMU dong hoc tu quy dao 6-DoF, tan so phat/tre/bias, ground truth vao .vsr, vslam_record --robot --gt

This commit is contained in:
trung09122002
2026-10-03 18:55:55 +07:00
parent 26ee1a3b72
commit 0dd2546ab1
13 changed files with 845 additions and 51 deletions

View File

@@ -69,13 +69,9 @@ StatusResponse Runtime::OpenSource() {
sc.start_yaw = opts_.sim_start_yaw;
// Hinh hoc lay tu robot.yaml, KHONG go tay. Neu sim dung mot bo so va
// duong ong dung bo khac thi moi phep do deu do nham.
const RobotGeometry& g = cfg_->robot.geometry();
sc.wheel_radius = g.wheel_radius;
sc.wheel_separation = g.wheel_separation;
sc.robot_radius = g.robot_radius;
sc.camera_z = cfg_->robot.camera_height_above_floor();
sc.camera_pitch = cfg_->robot.camera_pitch();
// duong ong dung bo khac thi moi phep do deu do nham. Ham dung CHUNG voi
// vslam_record.
SimConfigFromRobot(cfg_->robot, &sc);
sc.max_linear = speed_limit_;
sc.max_angular = cfg_->robot.base().max_angular;
sc.accel_limit = accel_limit_;
@@ -84,17 +80,6 @@ StatusResponse Runtime::OpenSource() {
sc.imu_rate_hz = cfg_->sensors.imu_hz;
sc.enable_depth_camera = cfg_->sensors.camera_enable;
Transform t;
if (cfg_->robot.StaticTransform(kBaseLinkFrame, kLaserFrame, &t)) {
sc.lidar_x = t.translation.x;
// Do cao LiDAR tren TAM TRUC. Duong 2D cu khong dung; dia hinh 3D thi
// can de tia o dung 0.2165 m tren san.
sc.lidar_z = t.translation.z;
}
if (cfg_->robot.StaticTransform(kBaseLinkFrame, kCameraFrame, &t)) {
sc.camera_x = t.translation.x;
}
source_->sim.reset(new SimSource(sc));
const StatusResponse st = source_->sim->Open();
if (!st.ok()) return st;