facebookresearch / r3m

Pre-training Reusable Representations for Robotic Manipulation Using Diverse Human Video Data
https://sites.google.com/view/robot-r3m/
MIT License
292 stars 45 forks source link

Fail to load franka kitchen related environments #12

Closed jasonseu closed 2 years ago

jasonseu commented 2 years ago

Hi, I have successfully configured all environments according to your instructions before and all commands run well. However, I reconfigured all environments in another machine recently and following error always encounters:

>>> python hydra_launcher.py hydra/launcher=local hydra/output=local env=kitchen_sdoor_open-v3 camera=left_cap2 pixel_based=true embedding=resnet50 num_demos=5 env_kwargs.load_path=r3m bc_kwargs.finetune=false bc_kwargs.save_logs=true proprio=9 seed=125 job_name=kitchen_sdoor_open-v3_left-cap2
/root/miniconda3/envs/r3m/lib/python3.7/site-packages/gym/spaces/box.py:112: UserWarning: WARN: Box bound precision lowered by casting to float32
  logger.warn(f"Box bound precision lowered by casting to {self.dtype}")
RS:> Registering Arms Envs
/root/miniconda3/envs/r3m/lib/python3.7/site-packages/transforms3d/quaternions.py:26: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  _MAX_FLOAT = np.maximum_sctype(np.float)
RS:> Registering Biomechanics Envs
RS:> Registering Hand Envs
RS:> Registering Kitchen Envs
========================================
Job Configuration
========================================
default:
- override hydra/launcher: local
- override hydra/output: local
env: kitchen_sdoor_open-v3
pixel_based: true
embedding: resnet50
camera: left_cap2
device: cuda
seed: 125
steps: 20000
eval_frequency: 1000
eval_num_traj: 50
num_cpu: 1
num_demos: 5
proprio: 9
env_kwargs:
  env_name: ${env}
  device: ${device}
  image_width: 256
  image_height: 256
  camera_name: ${camera}
  embedding_name: ${embedding}
  pixel_based: ${pixel_based}
  render_gpu_id: 0
  load_path: r3m
  proprio: ${proprio}
  lang_cond: false
  gc: false
reparse_kwargs:
  visualize: true
  save_frames: true
bc_kwargs:
  loss_type: MSE
  batch_size: 32
  lr: 0.001
  save_logs: true
  finetune: false
  proprio: ${proprio}
  proprio_only: false
job_name: kitchen_sdoor_open-v3_left-cap2
cwd: /root/Robotics/r3m/evaluation/r3meval/core

5
Demonstration score : 11.05

Traceback (most recent call last):
  File "wrappers.pxi", line 1137, in mujoco_py.cymj.PyMjModel._extract_mj_names
AssertionError
Exception ignored in: 'mujoco_py.cymj.PyMjModel._set'
Traceback (most recent call last):
  File "wrappers.pxi", line 1137, in mujoco_py.cymj.PyMjModel._extract_mj_names
AssertionError
Segmentation fault (core dumped)

However, the commands regarding MetaWorld and Adroit environments run well. I suspect that the Franka Kitchen environment is not registered successfully. Do you have any suggestions?

vikashplus commented 2 years ago

It might be arg passing via cmd line issue -- env name is being picked as env: kitchen_sdoor_open- it should be env: kitchen_sdoor_open-v3.

jasonseu commented 2 years ago

Sorry for misplaced print log. I have corrected it.

suraj-nair-1 commented 2 years ago

This looks like it might be a mujoco_py issue, or something about the way the environment was installed from mj_envs. Could you try directly loading the environment from mj_envs and see if the issue persists?

vikashplus commented 2 years ago

I just pushed an update that will help with the situation. @jasonseu - Can you pull on the mj_envs stable branch and give it another try?

jasonseu commented 2 years ago
jasonseu commented 2 years ago

This looks like it might be a mujoco_py issue, or something about the way the environment was installed from mj_envs. Could you try directly loading the environment from mj_envs and see if the issue persists?

Loading the environment from mj_envs also fails, but it successes with the updated mj_envs provided by @vikashplus . Anyway, thanks for your kindly help.

jasonseu commented 2 years ago

I just pushed an update that will help with the situation. @jasonseu - Can you pull on the mj_envs stable branch and give it another try?

Yes, it works, great thanks to you. This error has been bothering me for days. Thanks again.

vikashplus commented 2 years ago

Perfect. Closing the ticket. Feel free to open it if the problem persists.