Skip to content

pycvc: wading over time (#1542's flood_area, water_inside, dyn_bike_plant.wading) - #1558

Merged
transfix merged 1 commit into
masterfrom
feat/pycvc-wading-flood
Nov 26, 2026
Merged

transfix merged 1 commit into
masterfrom
feat/pycvc-wading-flood

Conversation

@transfix

Copy link
Copy Markdown
Owner

This binds the fields that #1542 (wading over time) added. #1542 merged before #1548 (pycvc's water bindings), so under the agreement between the two sessions, the binding session picks up #1542's new fields.

What changed

pycvc

  • wading_desc.flood_area reads and writes in place, and as_dict() includes it.
  • vehicle_state adds water_inside and water_inside_mass.
  • dyn_bike_plant.wading(i) returns the plant's water from dyn_wading.h: wet, engine_flooded, drag, lift, and each axle's contact, grip and depth. dyn_bike_plant.waded(i) says whether the vehicle stood in water during the last tick.
  • WorldEntities.list()'s wading dict includes flood_area.

The physics binding (world_binding, C++)

  • A new knob, vehicles.<name>.tuning.wading.flood_area. Its value can be tuned, but whether it is 0 is fixed when the vehicle is added. set_vehicle refuses a change to or from 0, so the binding ignores one.
  • New telemetry: water_inside and water_inside_mass.
  • The new keys have metadata (binding_meta.cpp) and are listed in the header's key list.
  • PhysicsVehicle.TheTreeDrivesTunesAndReadsAPublishedVehicle checks that the knob is seeded with the vehicle's value and that a change from 0 is refused.

pycvc has no binding for dyn_4w_plant, so its wading(i) readback stays C++-only.

Verified (Windows, MSVC Release, Jolt, pycvc core; cvcGL off)

  • pycvc_physics_water passes all 122 checks; 15 of them are new.
    • A hard-doored Humvee (flood_area 0.1 m²) parked in 0.7 m of water has 0.056 m³ inside at 1 s and 0.282 m³ at 5 s, and reaches the level outside (0.787 m³) by 60 s. These match Land vehicles in water: flooding over time, wading dynamic plants, lake-bed friction #1542's measurements. The binding seeds the knob with 0.1 and publishes water_inside. A change to 0 is refused through set_vehicle and ignored through the tree.
    • A dyn_bike_plant Humvee in 0.5 m of water has 3738 N lifted off its tires (C++'s Jolt figure is 3733 N), 0.50 m of water over each axle, and goes 7.3 m in 3 s against 8.6 m dry.
  • physics_vehicle_test passes all 37 tests, including the new knob check and Land vehicles in water: flooding over time, wading dynamic plants, lake-bed friction #1542's own tests. EveryPublishedKeySaysWhatItIs covers the new keys.
  • pycvc_physics passes, including the bit-for-bit parity check against physics_parity_test. pycvc_plant_host, pycvc_world_entities, pycvc_world_poses and pycvc_smoke pass too.
  • git-clang-format HEAD leaves the changed C++ lines unchanged.

Not run locally: Linux, macOS, wasm, pycvc_gl. CI's pycvc-linux lane is the authoritative run.

…lant.wading)

#1542 merged before #1548, so the bindings take its fields:

- wading_desc.flood_area (and as_dict); vehicle_state water_inside and
  water_inside_mass; dyn_bike_plant.wading(i) / waded(i); WorldEntities'
  wading dict;
- world_binding: a tuning.wading.flood_area knob (whether it is 0 stays
  fixed: set_vehicle refuses the change, so it is ignored) and the
  water_inside / water_inside_mass telemetry, with key metadata.

test_pycvc_physics_water: a hard-doored Humvee (flood_area 0.1) in 0.7 m
fills over seconds to the level outside (0.787 m^3 at 60 s), published by
the binding; a dyn_bike_plant Humvee in 0.5 m wades (3738 N lifted).
@transfix
transfix enabled auto-merge (squash) November 26, 2026 19:53
@transfix
transfix merged commit 068b0f3 into master Nov 26, 2026
30 checks passed
@transfix
transfix deleted the feat/pycvc-wading-flood branch November 26, 2026 23:33
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