multi_plan.ipynb is not functional
Hi,
I am using macbook air m2 and I want to test multi_plan.ipynb. https://github.com/google-deepmind/mujoco_mpc/blob/main/python/mujoco_mpc/mjx/multi_plan.ipynb
I have managed to make it work with following changes:
!pip install cmake numpy matplotlib mediapy wheel jax-metal brax mujoco
# Remove Colab-specific GPU setup
# Configure MuJoCo for macOS rendering (use 'glfw' instead of 'egl')
import os
os.environ['MUJOCO_GL'] = 'glfw'
os.environ['JAX_PLATFORM_NAME'] = 'cpu'
# Check installation
try:
import mujoco
mujoco.MjModel.from_xml_string('<mujoco/>')
print("MuJoCo installation verified")
except Exception as e:
raise RuntimeError("MuJoCo installation failed") from e
from IPython.display import clear_output
clear_output()
print("mujoco_mpc.mjx isn't installed yet -- please make sure you install it and fetch the task files from the MuJoCo Menagerie GitHub repository.")
# Required imports
from brax import base as brax_base
from IPython.display import HTML
import jax
import matplotlib.pyplot as plt
from mujoco import mjx
import predictive_sampling
import tasks.insert as insert
import numpy as np
# macOS-specific configuration
print("Using MuJoCo rendering backend: glfw (CPU rendering)")
However the code gives error when "insert.get_models_and_cost_fn()" is called because mjx_insert_cube.xml isn't exist.
sim_model_cpu, plan_model_cpu, cost_fn, instruction_fn = insert.get_models_and_cost_fn()
at line 81 int the https://github.com/google-deepmind/mujoco_mpc/blob/main/python/mujoco_mpc/mjx/tasks/insert.py
The work you have done is extremely valuable and I want to learn and experiment it.
Is it possible for you to provide a working copy?
@erez-tom @thowell it seems like I have encountered same issue with https://github.com/google-deepmind/mujoco_mpc/issues/332
Hi, I am also getting the same error, has there been any progress on fixing this?
I use this mjx_insert_cube.xml and its associated xml files from here:
https://github.com/google-deepmind/mujoco_menagerie/tree/main/franka_emika_panda
and I'm able to run the visualise.py example. I hope this helps.