feat: simulation foundation — models, ABC, factory, model registry, assets#84
Open
cagataycali wants to merge 2 commits intostrands-labs:mainfrom
Open
feat: simulation foundation — models, ABC, factory, model registry, assets#84cagataycali wants to merge 2 commits intostrands-labs:mainfrom
cagataycali wants to merge 2 commits intostrands-labs:mainfrom
Conversation
- Bump requires-python from >=3.10 to >=3.12 - Move opencv-python-headless and Pillow to [sim] extra - Add [sim] extra: mujoco, robot_descriptions, opencv, Pillow - Add .python-version (3.12) - Add uv.lock for deterministic builds - Switch CI from hatch to uv - Add libosmesa6-dev to CI for MuJoCo headless rendering - Remove hatch env scripts (use uv run directly) - Remove --cov from pytest addopts (run coverage explicitly) - Update ruff target-version and mypy python_version to 3.12 - Trim pyproject.toml comments for readability Why Python 3.12+: match statements, type aliases, ExceptionGroup patterns used in upcoming simulation code. MuJoCo 3.x works best with 3.12+. No users have reported needing 3.10/3.11 support. Why move opencv/Pillow to [sim]: core strands-robots (hardware control only) shouldn't require heavy image processing deps.
…ssets Add the lightweight simulation framework abstractions: - simulation/models.py: Dataclasses (SimWorld, SimRobot, SimObject, SimCamera, TrajectoryStep, SimStatus) — pure data, no physics deps - simulation/base.py: SimulationBackend ABC defining the contract all backends (MuJoCo, Isaac, Newton) must implement - simulation/factory.py: create_simulation() + pluggable backend registration system - simulation/model_registry.py: URDF/MJCF path resolution via robot_descriptions package + search paths + custom registration - assets/: Asset manager for auto-downloading robot meshes from MuJoCo Menagerie on first use - tools/download_assets.py: @tool for asset downloads - tests/test_simulation_foundation.py: 22 tests covering dataclasses, ABC instantiation/contracts, factory registration, model registry No MuJoCo import required — all abstractions are lightweight.
cagataycali
commented
Apr 1, 2026
| ref: ${{ inputs.ref }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Install uv |
Member
Author
There was a problem hiding this comment.
when PR #83 merged this lines will disappear during rebase ^^
This was referenced Apr 1, 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.
TL;DR
Add lightweight simulation framework abstractions: dataclasses, ABC, factory, model registry, and asset manager. No MuJoCo dependency — all pure Python with stdlib + dataclasses.
What's in this PR
simulation/models.pySimWorld,SimRobot,SimObject,SimCamera,TrajectoryStep,SimStatussimulation/base.pySimulationBackendABC — interface contract for all backendssimulation/factory.pycreate_simulation()+ pluggable backend registrationsimulation/model_registry.pyrobot_descriptions+ search pathssimulation/__init__.pyassets/__init__.pyassets/download.pytools/download_assets.py@toolfor asset downloadstests/test_simulation_foundation.pyDesign
The ABC defines 12 abstract methods (create_world, step, add_robot, render, etc.) plus optional methods with default no-op implementations (run_policy, randomize, get_contacts). Context manager protocol included.
Testing
import mujocoanywhere in this PRPart 3 of 6 in the MuJoCo simulation PR decomposition