Skip to content

sim2: Simulation compiles every describe_simulated module into one MuJoCo world - #4908

Draft
jeff-hykin wants to merge 77 commits into
jeff/feat/shared_configfrom
jeff/feat/sim2
Draft

jeff-hykin wants to merge 77 commits into
jeff/feat/shared_configfrom
jeff/feat/sim2

Conversation

@jeff-hykin

Copy link
Copy Markdown
Member

Core of sim2: modules describe themselves, Simulation compiles one MuJoCo world from them (no physics yet).

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go2 replay realtime (arm64)

Details
Benchmark suite Current: 37a2f4e Previous: 83800d9 Ratio
peak memory 1729.055 MB 1745.215 MB 0.99
peak threads 372 threads 368 threads 1.01
network (transport) 2733.765 MB 2730.954 MB 1.00
disk write 1.77 MB 1.863 MB 0.95
instructions 137.176 G 138.7 G 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
8056 1 8055 113
View the top 1 failed test(s) by shortest run time
::dimos.sim2.test_sim
Stack Traces | 0s run time
ImportError while importing test module '.../dimos/sim2/test_sim.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
dimos/sim2/test_sim.py:25: in <module>
    from dimos.sim2.sim import (
dimos/sim2/sim.py:20: in <module>
    from dimos_lcm.world_msgs import WorldAction, WorldObservations
E   ModuleNotFoundError: No module named 'dimos_lcm.world_msgs'

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Comment thread dimos/sim2/world.py Outdated
if unknown:
raise ValueError(f"sensors are mounted on unknown robots: {sorted(unknown)}")

world = mujoco.MjSpec.from_file(str(scene))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mujoco should be swappable

… @shared_config and compiles one MuJoCo world
@jeff-hykin
jeff-hykin changed the base branch from main to jeff/feat/shared_config October 30, 2026 16:39
@Nabla7
Nabla7 added this pull request to stack #4962 October 31, 2026 22:07
get_scene had a deadline after all. scene_from's docstring says there is no
retry and no deadline on this side, and there is no retry -- but the call
inherits default_rpc_timeout, so an office scene whose mounts take two minutes
to come up raised TimeoutError in the world and in every sensor. SceneConfig
is the config both the engine and every sensor share, so the override goes
there, at the figure the build rpc already uses for the same reason: the
timeout map has no way to spell "never".

BACKENDS named dimos.sim2.dimsim, which no branch below the one that adds that
engine has, and the test that proved there was more than one engine to switch
between only checked that a string was a string. One engine here; the second
entry and that test belong to the branch that brings the second engine.

test_sim.py needs usd-core and the tests group deliberately does not install
it, so it errored where every sibling file skips.

WorldMirror's readers ran unlocked while apply mutates on the receive thread,
and joint_ids iterated a dict that can change size under it. The lock is an
RLock and on_frame listeners run inside apply, so taking it in the readers is
reentrant.

toy.usda carried the absolute path of the scratchpad it was converted in.

And *.usda goes in package-data: every blueprint here loads a layer off disk,
so the wheel had no worlds in it. MANIFEST.in kept in step as pyproject asks.
The waiter callback bound its future through a lambda default, which mypy
cannot infer and which hid that the `or` was doing the work; it is a named
function now.

sim_module cast the engine class to Any and then returned whatever .blueprint
gave back from a function declared to return Blueprint. The dynamic lookup
stays; the cast moves to the value that is actually returned.

With this and the two branches above, mypy --strict reports nothing in
dimos/sim2.

This branch was successfully deployed

No deployments
cachix — cc42930e Deployed Nov 10, 2026 by jeff-hykin via cachix-build-macos #16702
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