Repository navigation
Nav: the material trainer and pycvc train on the Jolt Humvee (P4) - #941
Merged
Merged
Conversation
material_integrator::jolt takes the material loss through a vehicle simulation: integrate_plant_material runs the material controller with its commands driving a rollout_plant, and its VJP replays the controller's reverse and dyn4_plant_vjp along the plant's tape. Each call resets Jolt to the batch: each agent's discs and the patch's hard cells as walls, every agent launched at its start speed. - rollout_batch gains per-agent obstacles, start speeds and a reach; jolt_rollout builds them, lays copies out without a scene, turns starts to fit around them, and launches at speed. - use_jolt_rollout sets a train_config up for Jolt in one call (plant, calibrated model, price). - pycvc: nav_train_coef_mlp_jolt and nav_material_trainer_set_jolt, new symbols for GRL-SNAM's --rollout jolt; the integrator reads "jolt". Measured on the Humvee: the material gradient matches Jolt's central differences (rel 0.089 along it, 0.001-0.017 on its largest tensors), and 20 Adam steps lower the material loss on Jolt 23.97 -> 21.65.
…, scored on Jolt NavPlantConvergence.JoltTrainedHumveeOnJoltReach (an experiment, run with CVC_JOLT_TRAIN_EXPERIMENT=1): the Humvee at demo3's metric with its own envelope, arms trained on the Jolt rollout (calibrated first) and on the dynamic vehicle, checkpoints selected on Jolt reach, the selected policies scored on the held-out seeds against the untrained seed with paired CIs and saved as .cvcnav (JOLT_EXP_OUT).
…periment scores each arm as it ends An overnight arm (horizon 120) stopped on 'drive: the command must be finite': a non-finite gradient (the four-wheel model's reverse at a state far outside its domain, such as a rolled vehicle) made every parameter NaN. The Jolt window now sums each agent's gradient on its own and leaves it out when it is not finite (coef_trainer::dropped_agents counts them), and a non-finite command throws with the agent, step, coefficients and state. The experiment scores and saves each arm as it is trained, takes per-arm horizon and w_coll (kind:seed:lr[:horizon[:w_coll]]), and reports a failing arm and goes on.
transfix
force-pushed
the
feat/jolt-rollout-p4
branch
from
October 31, 2026 12:11
23b4eaf to
2da4276
Compare
transfix
enabled auto-merge (squash)
October 31, 2026 12:11
This was referenced Oct 31, 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.
Follows #940 (merged as 65c6bd0; this branch is rebased onto master). This is P4 of the Jolt training rollout. The material trainer and pycvc can now train on the Jolt Humvee, the gradient coming from the calibrated four-wheel pH model at Jolt's states.
The material trainer on Jolt
material_integrator::jolt:integrate_plant_material/_vjpinmaterial.h. It runsintegrate_dynamic_material's controller, with its commands driving arollout_plant. The reverse replays the controller'sstep_bwdanddyn4_plant_vjpalong the plant's tape.hard_wallsthe patch's hard cells become boxes;vmax dt max(H)of room.So the loss is a function of the weights and the batch, and its finite differences are well defined.
material_loss_configfields:plant,dyn4,ground_mu,hard_walls.L_multiruns on the kinematic bicycle. An external force (ext) is refused, as it isn't implemented yet.The seam and the Jolt plant
rollout_batchgains three fields:obstacles: each agent's own discs and boxes;speed: start speeds;reach: room around obstacles when there is no scene.jolt_rolloutnow:use_jolt_rollout(cfg, scene, desc, agents, steps): one call that sets up a train_config for Jolt (plant, calibrated model, price).pycvc
nav_train_coef_mlp_jolt(...): trains the coefficient policy on Jolt and returns the calibration as a dict.nav_material_trainer_set_jolt(handle, 1, vehicle, L, dt, ...): calibrates, then turns the material loss onto Jolt.nav_material_trainer_integratornow reads "jolt".--rollout joltonhasattr. The GRL-SNAM change itself belongs in CVC-Lab/GRL-SNAM.test_pycvc_nav_train.py::test_jolt_integrator.Measured
Windows MSVC Release; the Humvee at 0.106 units per metre; 24 material-fixture agents under way at 2.8 m/s, 40 steps of 0.06 s.
gamma_head.2.weightgamma_head.0.weightgoal_enc.0.weightFullChainGradcheckOnAPlantgives dir_rel 7.1e-4 and worst 5.5e-3 over 64 weights, the dynamic vehicle's numbers.Tests
physics_jolt_rollout_test: 11 tests, including the new launch, material-walls, material gradcheck, material training anduse_jolt_rollouttests.nav_material_train_test:FullChainGradcheckOnAPlant.pycvc_nav_trainpasses locally, run through ctest against a pycvc built here withCVC_BUILD_PYCVC=ON; it includes the newtest_jolt_integrator. At that test's limits (22 m/s² asked of a Humvee) the fitted drive gain sits at its 0.25 floor, so realistic limits matter for the calibration.Docs
NAV_TRAINING.md, "Training on Jolt": the material trainer, and the pycvc entry points.