Skip to content

feat(sim): add external simulation provider contract - #3375

Draft
Nabla7 wants to merge 39 commits into
mainfrom
feat/pimsim-simulation-provider
Draft

feat(sim): add external simulation provider contract#3375
Nabla7 wants to merge 39 commits into
mainfrom
feat/pimsim-simulation-provider

Conversation

@Nabla7

@Nabla7 Nabla7 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

What changed

This adds a small external simulation-provider boundary to DimOS:

  • GlobalConfig.simulation_provider selects an installed provider.
  • dimos.simulation.providers defines SimulationRequest, SimulationBinding, and entry-point discovery.
  • The existing G1 GR00T blueprint is the reference consumer. Its hardware and legacy MuJoCo paths remain intact; --simulation-provider pimsim selects the external backend.
  • The provider returns a normal DimOS Blueprint, simulated-hardware adapter identity/address, and Rerun configuration.

Runtime trace

  1. dimos --simulation mujoco --simulation-provider pimsim ... run unitree-g1-groot-wbc resolves ordinary GlobalConfig.
  2. The ordinary G1 blueprint loads the pimsim entry point from dimos.simulation.providers.
  3. PimSim returns a SimulationBinding.
  4. DimOS composes binding.backend with ControlCoordinator, mapping, navigation, and visualization.
  5. ModuleCoordinator deploys those modules through the normal forkserver worker system.
  6. ControlCoordinator exchanges high-rate joint commands/state with the simulated hardware adapter through the shared-memory ABI.
  7. Camera, lidar, odometry, TF, and other application data remain ordinary typed DimOS streams over the configured transport. RPC remains ordinary DimOS RPC.

PimSim is therefore not a second runtime around DimOS. It supplies simulator-facing DimOS modules and a binding; DimOS still owns composition, workers, lifecycle, transports, control, and application behavior.

Reference implementation and trace:

Review order

This branch deliberately keeps three prerequisites until their PRs merge:

After those merge, this PR's net review surface becomes four files:

  • dimos/core/global_config.py
  • dimos/simulation/providers.py
  • dimos/simulation/test_providers.py
  • dimos/robot/unitree/g1/blueprints/basic/unitree_g1_groot_wbc.py

The old shared branch was updated by a normal merge and scope-reduction commit; its history and existing links were not rewritten.

Validation

  • 78 DimOS tests covering the three prerequisites, provider loading, and blueprint generation
  • 11 PimSim integration tests covering provider bindings, G1 lidar, and DimSim apartment compatibility
  • G1 provider construction resolves to PimSimG1 + ControlCoordinator + mapping + navigation + standard visualization
  • Repository pre-commit hooks passed

The xArm, Go2, manipulation UI, pick/place, G1 mapping overhaul, E2E parity, scene cooking, scene data, and macOS CLIP changes are preserved on separate focused branches and are intentionally outside this review.

Nabla7 added 30 commits July 24, 2026 04:37
- SimulationRequest model assets become optional so providers can
  resolve their own robot assets
- SimulationBinding carries a provider rerun config that the ordinary
  G1 and Go2 blueprints merge into their own visualization
- unitree-go2-basic resolves its platform through the simulation
  provider registry, mirroring the G1 GR00T blueprint
- SceneControl protocol with a shared load_scene_control resolver;
  DimSim stays built in, other simulators load from the
  dimos.simulation.scene_controls entry-point group
- DIMOS_E2E_SIMULATOR selects the simulator (default pimsim) while the
  test bodies stay unchanged
- The CLI harness maps pimsim onto --simulation mujoco with the pimsim
  provider and a scene package
Live inspection of the running Go2 office session showed a healthy
global costmap (5,410 nonzero and 2,363 lethal cells forming the office
walls), so the wall-crossing planner defect is downstream of occupancy.
The Go2 planner ran with robot_width=None, meaning no obstacle
inflation at all, unlike the G1 composition.

- Share one classic costmap palette between G1 and Go2 instead of the
  unrelated Accent colormap
- Add the GO2 physical config from the published 0.70 x 0.31 x 0.40 m
  envelope and pass explicit width and rotation diameter to the planner
- Make the Go2 height-cost configuration explicit, mirroring the G1
  overhead-margin pattern

Pending live goal-driven validation of the replanning behavior.
…n-provider

# Conflicts:
#	dimos/robot/unitree/g1/blueprints/basic/unitree_g1_groot_wbc.py
@mintlify

mintlify Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
dimensional 🟢 Ready View Preview Aug 5, 2026, 11:02 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
3508 1 3507 174
View the top 1 failed test(s) by shortest run time
dimos.codebase_checks.test_no_all::test_no_all
Stack Traces | 7.04s run time
def test_no_all():
        """Fail if any file defines `__all__`."""
        dimos_dir = DIMOS_PROJECT_ROOT / "dimos"
        hits = find_all_definitions()
        if hits:
            listing = "\n".join(f"  - {p.relative_to(dimos_dir)}:{lineno}" for p, lineno in hits)
>           raise AssertionError(
                f"Found __all__ definition(s) in dimos/:\n{listing}\n\n"
                "__all__ is not allowed. We don't use `from x import *`, so __all__ "
                "lists serve no purpose and are tedious to maintain. Remove them. For "
                "an import that exists purely to be re-exported, use `# noqa: F401`."
            )
E           AssertionError: Found __all__ definition(s) in dimos/:
E             - hardware/simulation/shared_memory.py:480
E             - .../blueprints/basic/go2_platform.py:55
E             - simulation/engines/mujoco_shm.py:43
E           
E           __all__ is not allowed. We don't use `from x import *`, so __all__ lists serve no purpose and are tedious to maintain. Remove them. For an import that exists purely to be re-exported, use `# noqa: F401`.

dimos_dir  = PosixPath('.../dimos/dimos/dimos')
hits       = [(PosixPath('.../dimos/dimos/dimos/hardware/simulation/shared_memory.py'), 480), (PosixPath('/home/runne.../basic/go2_platform.py'), 55), (PosixPath('.../dimos/dimos/dimos/simulation/engines/mujoco_shm.py'), 43)]
listing    = '  - hardware/simulation/shared_memory.py:480\n  - .../blueprints/basic/go2_platform.py:55\n  - simulation/engines/mujoco_shm.py:43'

dimos/codebase_checks/test_no_all.py:51: AssertionError

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

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