Repository navigation
Bind the batched simulation API from mjbatch.h - #19
Merged
Merged
Conversation
mujoco.h does not include mjbatch.h, so the translation unit now does. mjBatch is the first struct MuJoCo only forward-declares; the generator emits it as an empty struct.
Contributor
API gate: additiveEvery symbol that existed still exists, unchanged. Nothing that compiled before stops compiling.
Enum and constant values are part of the measured surface: a renumbering keeps compiling and sends the wrong number to the driver, so it counts as a removal. |
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.
Adds the 25
mjb_*functions of MuJoCo's batch API (many simulations of one model on a thread pool), plusmjBatchConfig,mjBatchRecord, the opaquemjBatchhandle and themjfBatchFuncdelegate.Changes
mujoco_capi.hincludesmujoco/mjbatch.h.mujoco.hdoes not include it, so the generator never reached it.mjBatchis the first struct MuJoCo only forward-declares. CppAst gives such a struct no source location and lists it only as the element of its typedef, so it was filtered out and everymjBatch*failed to compile.GenerateStructsnow emits forward-declared structs reached through a MuJoCo typedef as empty structs.Testruns the same drop as four simulations on two threads and checks each lands where the singlemjDatadid.API delta
Additive only: no existing line of
Generated/changes.Verification
runtimes/contain the 25mjb_*symbol names.Testpasses on win-x64, including the new batch checks.LowLevelDemobuilds.After merging
CD will publish on its own, since the generated code changed: either dispatch it or wait for Monday's scheduled run.