Skip to main content

moojoco-banner

MooJoCo provides a unified framework for implementing and interfacing with MuJoCo and MuJoCo-XLA simulation environments. The main goal of this framework is to unify the development and interfaces of environments implemented in native MuJoCo (MJC) and MuJoCo-XLA (MJX).

MJCFMorphology and MJCFArena

  • Both are parameterized/reconfigurable MJCF (MuJoCo-XML) generators that serve as input to an environment.
  • MJCFMorphology defines the robot morphology.
  • MJCFArena defines the arena in which the robot is places (i.e. all non-morphological structures).
    • MJCFArena are reconfigurable via a ArenaConfiguration

Unified MJC and MJX environment interface

  • Reconfigurable through an environment configuration
  • Functional programming
    • MJX requires the functional programming paradigm. To unify MJC and MJX, we thus apply this stronger coding constraint to the MJC side as well.
    • Simply said: functions are pure, and should not have side effects.
    • Environments expect states and return states.
  • Gymnasium-like interface
    • Environments provide an observation and action space (automatically)
    • Outside code interacts with the environment using the typical step, reset, render and close functions.
    • Main difference with the original gymnasium interface: here the environment returns and expects states, which encapsulates the original observations, rewards, info, etc. in a datastructure, together with the underlying physics state.
  • Differences between MJCEnv (i.e. a native MuJoCo environment) and MJXEnv (i.e. an MJX environment):
    • development: MJXEnv's should be implemented in JAX, MJCEnv's do not necessarily require JAX.
    • usage: MJXEnvState contains JAX arrays (and the additional mjx.Model and mjx.Data structures), the MJCEnvState uses numpy arrays.
  • Observations are implemented using Observables; these define retriever functions that extract the observation based on the state datastructure and provide an easy way to implement observations.
  • DualMuJocoEnvironment provides the unification of MJC and MJX, and allows conditional environment creation based on a backend string.
  • Both MJC and MJX support human-mode and rgb_array rendering modes.
    • Note: MJX rendering is slow due to the offloading of datastructures of the GPU

Examples

For practical applications and demonstrations of MooJoCo, please refer to the Bio-inspired Robotics Testbed, which employs this framework extensively.

Installation

pip install moojoco

Metadata

Release files for moojoco 1.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moojoco 1.1.7
File Size Uploaded
moojoco-1.1.7.tar.gz 21.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for moojoco 1.1.7
File Interpreter ABI Platform
moojoco-1.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 45.9 kB

Release files / moojoco-1.1.7.tar.gz

Download URL moojoco-1.1.7.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9a4a5384c2021e47ad111d1c226a6bcc4c133797df49493888094ae52e9058f2
BLAKE2b-256 checksum
How to use checksums
a1f7f2a6a9e628e29e44b6eab663a811e49c31614f2f4471fd499d6d6f3c743f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / moojoco-1.1.7-py3-none-any.whl

Download URL moojoco-1.1.7-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f8bb333fc12e94d527ce9f4365e485af8bdb93a3f5257be568fcf8e1910a43f
BLAKE2b-256 checksum
How to use checksums
2a7241f8cee40c465fa6f73ef984a88ece724b3e8731eb3efdaf483863b54422
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

1.1.7 This release

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page