Repository navigation
pycvc: the dynamic single-track plant (dyn_bike_plant) as a sim_world's plant - #979
Merged
Merged
Conversation
…'s plant pycvc.dyn_bike_plant(descs, world=None, ground_bodies=None, mu=0.9, ...) wraps cvc::physics::dyn_bike_plant, and nav_sim_world_set_plant takes it as it takes a nav_plant. Python reads its state, its model state (body: x, y, psi, vx, vy, r, delta, a), its books since attach and over the last tick (with flow), the kinetic energy at attach, and with a world its chassis, collisions and the agent it touched. Given a physics_world, the plant keeps it alive. test_pycvc_physics.py's test_the_dynamic_plant: an agent drives the Humvee's dynamic bicycle to its goal and its books close to 1e-9 of the flow; the plant outlives its Python names while set; and with a world the chassis hits a wall nav's map lacks, books the contact and stops short of it.
transfix
added a commit
to CVC-Lab/GRL-SNAM
that referenced
this pull request
Nov 2, 2026
…very demo, training through Jolt (#143) grl-snam capture drive|multigoal --plant point|kinematic|dynamic|jolt: point is today's Python surrogate; the others drive the same policy on libcvc's sim_world (plant_nav.PlantNavigator) on nav's bicycle, the dynamic single track (nav_native.DynamicPlant over pycvc.dyn_bike_plant, transfix/libcvc#979) or a Jolt vehicle, with --vehicle, --mu, --routes, --fog, --weights and --reach-m. On a plant the run is kept whole and played by the clock with a trail, the HUD adds the sideslip, tire use, lateral g and energy books, and <out>.json records how each leg ended. --caption draws a line along the bottom. The plant elsewhere: pipeline --plant; finale --plant and --max-steps; record_squad / record_convoy / record_pursuit_v2 plant=; squad_bench and drive_bench --plant; sim_world_from_swarm takes a plant name and clamps the navigator to the vehicle's limits. Squad gains goal_of / reached_of, and its native records measure the distance to a moving goal where it is. Training through Jolt: coef-train --backend native --rollout jolt (--vehicle, --w-energy), nav_native.train_coef_mlp_jolt (keywords, the vehicle's own wheelbase and limits by default) and train_coef_mlp(rollout="jolt"). Fixes: capture, build-sdf and obstacles read the bundle's bounds from terrain.json (pycvc_gl.scenes retired terrain_grid, libcvc #670); render_drive emptied its frames with `rm` through os.system, which did nothing on Windows, and shared one frames directory between videos. docs/PLANTS.md runs every demo and bench on a plant and trains through Jolt; every command in it was run. tests/test_plant_capture.py covers the CLI, the names, the HUD, the run summary, and with the bindings each plant, low grip, a squad on the dynamic plant and record_squad on Jolt.
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
pycvc.dyn_bike_plantwrapscvc::physics::dyn_bike_plant, the dynamic single-track vehicle (tires, load transfer, actuator lag) as a sim_world's plant.nav_sim_world_set_plantnow takes it as well as anav_plant.mu,substep,drive_lag,driver,latency,brake_margin,metres_per_world_unit,ground_z,chassis_friction.kind()is"dynamic".state(i)is nav's view, includingtire_use.body(i)is the model's SI state: x, y, psi, vx, vy, r, delta, a.books(i)andlast_tick(i)are the books, withflow.chassis(i),collisions(i),collisions_tick(i)andvehicle_contact_step(i).options().nav_plant.Why
GRL-SNAM's
grl-snam capturenow offers the dynamic plant beside nav's bicycle and Jolt, with the books on its HUD. pycvc had no way to put a sim_world on it. CVC-Lab/GRL-SNAM#143 uses this binding and skips the dynamic plant on a pycvc without it.plant_hostis not bound here. It builds its own world (flat ground, or acvc::worldgeometry), whereas GRL-SNAM builds a Jolt world holding the scene's buildings as boxes. Bindingdyn_bike_plantdirectly lets a caller hand it that world.Tests
test_pycvc_physics.py's newtest_the_dynamic_plantchecks:Local run: Windows, MSVC 14.44 Release, Jolt on, pycvc built with
CVC_BUILD_PYCVC=ON.test_pycvc_physics.pypassed 57 checks; withoutCVC_PHYSICS_PARITY_EXEthe C++ parity comparison was skipped.