Skip to content

nav, physics: tick counts carry the unit tick; nav_plant's tree accelerations in m/s^2 - #826

Merged
transfix merged 1 commit into
masterfrom
fix/nav-tree-ticks-accel
Oct 27, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/nav-tree-ticks-accel

Conversation

@transfix

Copy link
Copy Markdown
Owner

Stacked on #824 (base fix/nav-tree-world-units); I'll retarget it once #824 merges.

Why

Following on from #824's world-units pass, two inconsistencies remained in what the state tree shows:

  • Tick counts were plain counts with no way for a UI to say how much time they stand for. These are nav.sense_every and the nav.tick telemetry, and a sim step's length varies by app.
  • nav_plant's lateral accelerations were in g (standard gravity, 9.80665 m/s²), while every other acceleration in the tree is m/s².

What

  • The "tick" unit: cvc::state_key_meta's unit conventions gain "tick", a count of the binding's steps whose length the binding publishes. For sim_world that length is nav.settings.dt. nav.sense_every and nav.tick use it, and a UI can show their time; cvcdbg's Tuning panel does.

  • nav_plant's tree keys in m/s² (unit m/s^2):

    Key Was
    plan.lateral_mps2 plan.lateral_g (range 1..12, default 4.9 = 0.5 g)
    settings.drift_bins_mps2 settings.drift_bins_g
    the drift bins' lo_mps2, hi_mps2 lo_g, hi_g
    each vehicle's drift.lateral_mps2 drift.lateral_g

    These are key renames. A tree reader using the old names needs the new ones. Nothing in libcvc or cvcdbg reads them by name, apart from nav_plant_test, which is updated.

  • What still uses g: nav_plant's C++ options (lateral_g, drift_bins_g), its drift summaries, the plant log format, the CLI and the Python binding. Changing those would change file formats, so it is left for a separate decision. PHYSICS_API.md says so.

Checked

  • Windows, MSVC: nav_binding (6) and nav_terrain (11) pass.
  • nav_plant_test builds, but its Jolt tests skip in this local build. Its new check (0.5 g seeded as 4.9 m/s², 2.94 m/s² applied as 0.3 g) runs in CI.

@transfix
transfix force-pushed the fix/nav-tree-world-units branch from dbea9f4 to 937590f Compare October 27, 2026 04:04
@transfix
transfix changed the base branch from fix/nav-tree-world-units to master October 27, 2026 06:26
@transfix
transfix enabled auto-merge (squash) October 27, 2026 06:26
…erations in m/s^2

state_key_meta's units gain "tick": a count of the binding's steps, whose length it publishes (nav.settings.dt). nav.sense_every and nav.tick use it, so a UI can show the time they stand for.

nav_plant's state-tree keys in g are now m/s^2 keys like every other acceleration there: plan.lateral_mps2 (was plan.lateral_g), settings.drift_bins_mps2, the drift bins' lo_mps2 / hi_mps2 and each vehicle's drift.lateral_mps2. The C++ options, drift summaries, plant log and Python binding keep g (x 9.80665).
@transfix
transfix force-pushed the fix/nav-tree-ticks-accel branch from e554946 to 85084a5 Compare October 27, 2026 06:27
@transfix
transfix merged commit d8ca602 into master Oct 27, 2026
23 of 43 checks passed
@transfix
transfix deleted the fix/nav-tree-ticks-accel branch October 29, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant