google-deepmind / mujoco_mpc

Real-time behaviour synthesis with MuJoCo, using Predictive Control
https://github.com/deepmind/mujoco_mpc
Apache License 2.0
913 stars 135 forks source link

Minor fix to failing python test #250

Closed alberthli closed 6 months ago

alberthli commented 6 months ago

When installing the python bindings using

python setup.py install

agent_test.py currently has one test failure:

ERROR: test_get_all_modes (__main__.AgentTest)
AgentTest.test_get_all_modes
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/path/to/mujoco_mpc/python/mujoco_mpc/agent_test.py", line 338, in test_get_all_modes
    model = mujoco.MjModel.from_xml_path(str(model_path))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Error: resource not found via provider or OS filesystem: '/path/to/mujoco_mpc/mjpc/tasks/quadruped/assets/calf.obj'

This PR skips this test (as is done for other tests which raise import errors) and also adds obj assets to the source paths (along with png and stl assets) so that they are built with the package after pulling the resources from mujoco_menagerie.