Repository navigation
pycvc: dyn_bike_plant's contact_step_depth; the contact test at the default substep - #1038
Merged
Merged
Conversation
…efault substep pycvc.dyn_bike_plant(..., contact_step_depth=None) binds #1004's dyn_bike_plant_options::contact_step_depth (m; None keeps the plant's default, <= 0 never substeps), and options() reports it. test_pycvc_physics.py's contact case, the navigator driving into a wall from another sim_world's map at about 7.8 m/s, goes back to the default 0.01 s substep: #1002 ran it at 0.005 s because the damper overshot, and #1004's implicit damper and contact substeps fixed that. It now also checks the speed clamp takes nothing, and the new keyword's round trip, default and type. All 77 checks pass (Windows, MSVC 19.44 Release, Python 3.11, on master f94a9b2). At 0.01 s the contact dissipates 8.15e4 J, the limiter takes 0 and the residual is 1.33e-3 of the flow, as #1004's C++ fast-impact test has it.
transfix
added a commit
that referenced
this pull request
Nov 7, 2026
Bumps the project version and every recipe's upstream_version from 3.7.11 to 3.7.12. The v3.7.12 tag on this commit is the first release with the multi-car controller template (pycvc_gl.cars, #1031 #1035 #1040), the hidden-subtree fix in cvcGL (#1037), the discrete-gradient dyn_bike step (#978), semi-implicit Euler by default in the nav rollout (#981), the implicit contact damper (#1004, #1038), and generated_world's roads and water (#1032, #1034).
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.
This follow-up to #1002 and #1004 binds
contact_step_depthin pycvc and puts the binding test's contact case back on the default 0.01 s substep.Why
#1002 bound
dyn_bike_plant's compliant contact for Python. It found that the plant overshot a fast impact at the default substep: driven into a wall at 7.8 m/s, the books showed the contact supplying energy. So its test ran the contact case at 0.005 s.#1004 fixed the overshoot with an implicit damper and friction, plus contact substeps (
dyn_bike_plant_options::contact_step_depth, 0.1 m). It left two things for pycvc:contact_step_depthwasn't bound, so Python always got the default;What changed
bindings/pycvc/pycvc_physics.ipycvc.dyn_bike_plant(..., contact_step_depth=None)takes a number in metres.Nonekeeps the plant's default, and a value ≤ 0 never substeps, as in C++. Anything else raises.options()reportscontact_step_depth.bindings/pycvc/test_pycvc_physics.py, intest_the_dynamic_plant_options:options(),Nonekeeps the default, and a non-number raises.Checks
On libcvc master
f94a9b27(Windows, MSVC 19.44 Release, Python 3.11), all 77 checks oftest_pycvc_physics.pypass.The contact case at 0.01 s matches #1004's C++
DynContactPlant.AFastImpactAtTheDefaultSubstep: contact_dissipated 8.15e4 J, limiter 0, and a residual of 1.33e-3 of the flow. The books' identity holds to 5e-16 of the flow. Before #1004 the same case gave contact_dissipated −1.52e5 J, limiter −2.42e5 J and a residual of 3.1e-2 of the flow.