//! `walk_probe` — measure how an autonomous tour actually walks a real map. //! //! The tour (`level::LevelWalker` + `player_nav::PlayerNav`) is judged by eye //! today: "the quake bot is more jittery than the doom one" is a true report //! with no number behind it. This runs the SAME stack the world previews and //! the sandbox run — real imported GLB, real `LevelCollision`, real `NavGrid`, //! real planner — headless at a fixed 60 Hz, and prints per-tick motion plus //! the summary a person means by "jittery": //! //! - `yawrev/s` — yaw-rate SIGN REVERSALS per second. A body walking a line //! or a curve has none; a body oscillating has many. This is the number. //! - `|dyaw|/s` — mean absolute turn rate, deg/s. //! - `stall/s` — ticks per second with essentially no ground covered while //! the tour was not deliberately holding (a door, a cut). //! - `pop/s` — floor-height jumps that are neither a fall nor a step. //! - `straight` — net displacement / path length over one-second windows: 1 //! is a straight walk, 0 is walking on the spot. //! - `stuckmax` — longest run of seconds with under 0.3 m of net travel: the //! "gets stuck on a corner" report, in seconds. //! //! Usage: //! ```text //! cargo run --release -p makepad-render --example walk_probe -- \ //! [secs] [seed] [csv] //! ``` //! `` is the importer's sidecar; `-` skips it (no anchors). use makepad_render::level::{ surface_kinds_from_glb, BobStyle, LevelCollision, LevelWalker, NavGrid, SurfaceKind, UpAxis, WalkerConfig, WalkerEvent, }; use makepad_render::model::MODEL_VERTEX_FLOATS; use makepad_render::player_nav::{config_for_world, NavAnchor, PlayerNav}; use makepad_render::StaticModel; use makepad_draw::*; const DT: f32 = 1.0 / 60.0; fn main() { let a: Vec = std::env::args().skip(1).collect(); if a.len() < 3 { eprintln!("usage: walk_probe