This commit is contained in:
trung09122002
2026-09-24 16:30:03 +07:00
parent 5e27c7cc41
commit d6f1afac31
20 changed files with 596 additions and 252 deletions

View File

@@ -39,13 +39,13 @@ Use this file for verified target-repository facts only. Keep unknown values as
- Main nodes: one process — `vslam_node` (`build/app/vslam_node`). Owns all threads and all Channels. Source must be chosen explicitly, no default: `--sim` | `--replay FILE` | `--live` | `--check` (app/src/main.cc:39-69, docs/RUNTIME.md:1-20).
- Tools: `vslam_record`, `vslam_replay`, `vslam_sim_run`, `vslam_slam_bench`, `vslam_web_demo`, `vslam_world_export`, `vslam_lidar_probe`, `probe_rtabmap`
- Topics: none (no middleware). In-process `Channel<T>` (libs/vslam_common/include/vslam/channel.h) replaces pub/sub. External surface is HTTP/WebSocket on port 8080 — e.g. `GET /api/world.bin` (README.md:133-135). Binary WS frame types: 1 scan, 2 cloud, 3 map_full, 4 **retired** (was map_patch, removed 2026-09-23), 5 path, 6 world_map, 7 voxel_full (chunked), 8 voxel_delta; token auth is asymmetric by design: engage e-stop needs no token, release e-stop / bumper reset require one (configuration_files/system.yaml `web.auth_token`).
- Topics: none (no middleware). In-process `Channel<T>` (libs/vslam_common/include/vslam/channel.h) replaces pub/sub. External surface is HTTP/WebSocket on port 8080 — e.g. `GET /api/world.bin` (README.md:133-135). Binary WS frame types: 1 scan, 2 cloud, 3 map_full, 4 **retired** (was map_patch, removed 2026-09-23), 5 path, 6 world_map, 7 voxel_full (chunked), 8 voxel_delta. Types 7/8 carry the accumulated 3D map as a voxel-hashed index set at 0.05 m; the browser renders it as a POINT CLOUD, not as boxes; token auth is asymmetric by design: engage e-stop needs no token, release e-stop / bumper reset require one (configuration_files/system.yaml `web.auth_token`).
- Services / Actions: none.
- Parameters: YAML only, one file per library. Selected verified values —
- `robot.yaml`: wheel_radius 0.0865 m, wheel_separation 0.400 m, robot_radius 0.24, max_linear 0.35 m/s, max_angular 0.80 rad/s, accel_limit 0.30 m/s², base.cmd_timeout 0.30 s
- `safety.yaml`: scan stop_distance 0.35 m, slow_distance 0.80 m, front_angle 0.5 rad, min_front_rays 20, cliff_hold 3.0 s, sensor_timeout 1.0 s, cmd_timeout 0.5 s (must stay > base.cmd_timeout), bumper escape_linear 0.10 / escape_angular 0.4
- `pipeline.yaml`: depth_filter 0.22–4.0 m, voxel 0.03 m, 30 Hz in / 10 Hz out; cliff_detect window 1.15–1.70 m (geometric blind zone from level camera at 0.445 m), and `cliff_detect.enabled: false` — cliff detection is currently OFF (pipeline.yaml:100)
- `slam.yaml`: enabled false, mode localization, Reg/Strategy=1 (ICP), Reg/Force3DoF=true, Optimizer/Strategy=1 (g2o), RGBD/NeighborLinkRefining=false, RGBD/ProximityPathMaxNeighbors=30, Rtabmap/DetectionRate=3, Grid/CellSize 0.05, `camera_3d` (default false) is the 3D-voxel-map switch: true forces Grid/Sensor=2 + Grid/3D=true + height-threshold ground split
- `slam.yaml`: enabled false, mode localization, Reg/Strategy=1 (ICP), Reg/Force3DoF=true, Optimizer/Strategy=1 (g2o), RGBD/NeighborLinkRefining=false, RGBD/ProximityPathMaxNeighbors=30, Rtabmap/DetectionRate=3, Grid/CellSize 0.05, `camera_3d` (code default false; slam.yaml currently true) is the 3D scanned-cloud switch: true sends depth into RTAB-Map (stored in the DB) and turns on the voxel map, but does NOT touch Grid/* — the grid stays 2D, LiDAR-only. The voxel map is built outside `process()` from each node's depth (cached per node id, max 40 new nodes per export). Changed 2026-09-24: the old Grid/Sensor=2 + Grid/3D=true path raised sim pose error vs ground truth from 0.009 m to 0.06-0.11 m
- `system.yaml`: web port 8080, status/scan 10 Hz, cloud 8 Hz, path 1 Hz, map_rebuild_rate_hz 4.0, voxel_chunk_bytes 16384 / voxel_sync_chunks_per_tick 1 (the voxel map has no send-rate knob by design); thread priorities safety 50 / driver 45 / estimator 40, safety_rate_hz 20
- Unknown RTAB-Map keys are a **startup refusal**, not a silent ignore (`BuildRtabmapParams`, slam.yaml:10-16)
- Config dir resolution: `$VSLAM_CONFIG_DIR`, else `/etc/vslam/configuration_files`; resources: `$VSLAM_RESOURCE_DIR`, else `/var/lib/vslam/resources` (libs/vslam_common/include/vslam/node_constants.h)
@@ -111,4 +111,4 @@ All commands below are transcribed from README.md / CMakePresets.json / docs —
9. `RGBD/NeighborLinkRefining=false` was tuned against **simulated** odometry (exact to ground truth). Real-robot odometry drifts 1-2%, where ICP link refinement may help. Re-measure on hardware.
10. Real-hardware symmetric wheel slip is undetectable by the current `|omega_encoder - gyro_z|` test (0 events, 13.29% error in the `slip_sym` regression scenario).
11. `imu_lag_sec` was re-measured 2026-09-23 and moved 0.08 -> 0.07 (estimator resolution is one 10 ms bin). The next live run must report `wheel_odom/lag: tot nhat ~0 ms`; if it still says -10 ms the model has bottomed out and must not be tuned further.
12. The 3D voxel map (`camera_3d: true`) has NOT been run on hardware yet. Three numbers in it are reasoned estimates, not measurements: `voxel.emit_size_m` 0.10, `voxel.delta_max_ratio` 0.35, and the 150k `max_cells` ceiling. Also unmeasured: RAM/CPU cost of `Grid/3D=true` with ray tracing left ON (kept on deliberately — turning it off empties the 2D free-space map).
12. The 3D scanned cloud (`camera_3d: true`) produced frames in sim on 2026-09-24 with the OLD Grid/3D path; the depth-per-node path that replaced it is not yet run (sim or hardware). Not on hardware at all. Three numbers in it are reasoned estimates, not measurements: `voxel.emit_size_m` 0.05, `voxel.delta_max_ratio` 0.35, and the 300k `max_cells` ceiling. The full-sync burst (2 x 32 kB x 10 Hz = 655 kB/s) also exceeds the documented 120 kB/s UI budget for 1-3 s per joining client — deliberate, but unmeasured on Jetson WiFi. Also unmeasured: RAM/CPU cost of `Grid/3D=true` with ray tracing left ON (kept on deliberately — turning it off empties the 2D free-space map).