Skip to content

nav_plant: the ground is not a building contact (ground_bodies) - #1011

Merged
transfix merged 1 commit into
masterfrom
fix/nav-plant-ground-bodies
Nov 4, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/nav-plant-ground-bodies

Conversation

@transfix

@transfix transfix commented Nov 3, 2026

Copy link
Copy Markdown
Owner

What

nav_plant counted every chassis contact with a massless body as a static contact, the ground box included. So nav_stats' building_contacts scored a chassis scraping the ground as building hits: a RoboRacer driving GRL-SNAM's flat city scored 35.

nav_plant_options::ground_bodies names the bodies the vehicles drive on, as the dynamic plants' own ground_bodies already do. A chassis touching one of them is not a static contact. Left empty, every massless body still counts, as before.

Every libcvc caller that builds a ground now passes it:

  • plant_host (its ground box, or its terrain's height fields);
  • nav_eval;
  • the Jolt training rollout (both of its worlds).

pycvc's nav_plant(..., ground_bodies=[ids]) takes it too. The id-list conversion is now one helper, body_ids, shared with dyn_bike_plant.

Tests

  • NavPlant.GroundContactsAreNotBuildingContacts: a Humvee whose body box reaches below its wheels rests on the ground. That counts as a contact without the ground's id and not with it. A pole through a nose still counts. nav_stats agrees with static_contacts_step.
  • test_pycvc_physics.py: the same from Python, with a chassis set into the ground (spawn_height=0.2), plus the argument check.

Local run: Windows, MSVC 14.44 Release, Jolt on. Passing:

  • nav_plant (28), nav_stats (17), nav_coef_train (28), nav_material_train (17);
  • physics_jolt_rollout (14), physics_plant_host (5), physics_plant_log (15);
  • physics_dyn_bike_plant (10), physics_dyn_4w_plant (7);
  • test_pycvc_physics.py (76 checks).

Naming the floor as ground in the Jolt rollout changes no training test. clang-format 18 is clean on the changed lines.

GRL-SNAM's JoltPlant passes its ground when the running pycvc takes the argument (CVC-Lab/GRL-SNAM, follow-up PR).

nav_plant counted every chassis contact with a massless body as a static
contact, the ground box included, so nav_stats' building_contacts scored a
chassis scraping the ground (a RoboRacer on a flat city: 35) as building hits.

nav_plant_options::ground_bodies names the bodies the vehicles drive on, as
the dynamic plants' own ground_bodies do; a chassis touching one is no static
contact. plant_host, nav_eval and the Jolt training rollout pass their
ground, and pycvc's nav_plant takes ground_bodies=[ids] (one body_ids helper
now serves it and dyn_bike_plant). Empty, every massless body still counts.

NavPlant.GroundContactsAreNotBuildingContacts: a Humvee whose body box
reaches below its wheels rests on the ground; it counts without the ground's
id and not with it, and a pole through a nose still counts.
test_pycvc_physics.py checks the same from Python with a chassis set into
the ground.
transfix added a commit to CVC-Lab/GRL-SNAM that referenced this pull request Nov 3, 2026
…r material (#154)

JoltPlant names its ground to pycvc's nav_plant (ground_bodies,
transfix/libcvc#1011), so a chassis scraping it is no building contact in
nav_stats; it falls back on a pycvc without the argument.

material-demo --plant runs libcvc's risk governor on the dynamic and Jolt
plants where pycvc has it (sim_world::set_risk_governor, transfix/libcvc#1012;
NativeSimWorld.set_risk_governor, PlantNavigator(risk_governor=...)).
--no-governor shows the forces alone, --governor puts it on the kinematic
bicycle too. The forces slow a vehicle only by what they take from its goal
pull's surplus over its top speed, which on a physics plant is all of it: the
dynamic RoboRacer crossed the scenario story's water at its top speed, its run
the same to the millimetre as without material. Under the governor it stops
short of the water (0 hazard steps, 14 before).

docs/PLANTS.md explains both, with the material demo's table for every plant
with and without the governor.
@transfix
transfix merged commit a5203bd into master Nov 4, 2026
27 checks passed
@transfix
transfix deleted the fix/nav-plant-ground-bodies branch November 4, 2026 06:50
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