Skip to content

nav: every sim_world and nav_plant key's description says what it does, which way to move it, and its default - #823

Merged
transfix merged 2 commits into
masterfrom
docs/nav-key-tooltips
Oct 27, 2026
Merged

transfix merged 2 commits into
masterfrom
docs/nav-key-tooltips

Conversation

@transfix

Copy link
Copy Markdown
Owner

Why

The comments describe_state_keys writes onto the state tree are what a UI shows as tooltips. For example, cvcdbg's demo3 Tuning panel (CVC-DBG/cvcdbg#239) shows them under dbg.world. Many assumed the reader knew the code: carrots, H4, advance(), doc numbers. Few said which way to move a key or what its default is.

What

Every description in sim_world_binding.cpp and nav_plant.cpp is rewritten: 84 sim_world keys, plus 40 nav_plant keys covering the plant, the drift bins and the per-vehicle telemetry. Each one says:

  • what the key controls, in plain words;
  • what raising it does;
  • what 0, a negative value or an unset value means;
  • the struct's default, where it is fixed.

Some lengths and speeds have defaults stored in nav's normalized units (reach_tol, vmax, a_max, wheelbase and others). Those keep no default in the text, since one in normalized units is no use to someone reading metres.

One unit is corrected: nav.vehicle.k_steer is rad, not 1, because it is added to the steer angle (drive.cpp).

Keys, access values, other units, ranges and order are unchanged, checked by script against master.

Checked

  • Both files compile (Windows, MSVC).
  • clang-format is clean.
  • nav_binding_test's non-empty-comment check holds: every description is non-empty.

Found while writing (not changed here)

  • nav.sep_gain is a carrot shift in nav's normalized units. pull doesn't convert it to metres the way it converts sep_radius, so its effect depends on settings.scale.
  • rr and d_hat default to 0, below their recommended minimums. wheelbase defaults to 0.035 at a scale of 1, below its 0.2 m minimum. These ranges only make sense once an app sets a real scale.
  • terrain.block_infeasible going from 1 to 0 frees the cells only at the next sensing rebuild, and never while freeze_sense is 1.
  • On a physics plant, several nav.vehicle knobs (wheelbase, vmax, a_max, a_lat_max, body_rr, body_gain, nsub) and nav.min_gap are overridden or ignored each tick. The descriptions say so where it matters.

…s, which way to move it, and its default

The comments describe_state_keys writes onto the state tree are what a UI shows as a tooltip (cvcdbg's demo3 Tuning panel shows them under dbg.world). Each now says what the key controls in plain words, what raising it does, what special values mean, and the struct's default where it is fixed. Internal references are gone. nav.vehicle.k_steer's unit is rad: it is added to the steer angle.
@transfix
transfix force-pushed the docs/nav-key-tooltips branch from d74e751 to b65929a Compare October 27, 2026 00:08
@transfix
transfix enabled auto-merge (squash) October 27, 2026 03:30
@transfix
transfix merged commit 2f6bf76 into master Oct 27, 2026
22 of 24 checks passed
@transfix
transfix deleted the docs/nav-key-tooltips branch October 29, 2026 20:51
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