Skip to content

Releases: personalrobotics/mj_environment

v1.0.0

04 Feb 01:57

Choose a tag to compare

mj_environment 1.0.0

First stable release of mj_environment - dynamic object management for MuJoCo simulations.

Features

  • Dynamic object lifecycle - Activate, hide, and move objects at runtime without rebuilding the simulation
  • Forking for planning - Create lightweight, independent environment clones with fork() and fork_many()
  • Perception integration - Batch process detections with update(), sync state with sync_from()
  • State serialization - Save and load simulation state with save_state() / load_state()
  • Collision-safe hiding - Hidden objects have contype=0 and conaffinity=0 to prevent false positive collisions

API

from mj_environment import Environment

env = Environment(
    base_scene_xml="data/scene.xml",
    objects_dir="data/objects",
    scene_config_yaml="data/scene_config.yaml",
)

# Activate and position objects
env.update([
    {"name": "cup_0", "pos": [0.1, 0.2, 0.4], "quat": [1, 0, 0, 0]},
])

# Fork for planning
with env.fork() as planning_env:
    planning_env.sim.step()

Breaking Changes from Pre-1.0

  • persist parameter renamed to hide_unlisted (inverted logic)
  • fork(n) split into fork() (single) and fork_many(n) (multiple)