ARISE-Initiative / robosuite-benchmark

Benchmarking Repository for robosuite + SAC
53 stars 15 forks source link

rollout.py - error for get_observation with record_video #13

Open shivanimall opened 2 years ago

shivanimall commented 2 years ago

Hello,

I am running the following command

python rollout.py --load_dir ../log/runs/Lift-Panda-OSC-POSE-CUBE-BREAD-SEED1/Lift_Panda_OSC_POSE_CUBE_BREAD_SEED1_2021_10_09_02_06_20_0000--s-0 --horizon 200 --camera frontview --record_video

and getting the following error:

Traceback (most recent call last):
  File "rollout.py", line 1, in <module>
    from util.rlkit_utils import simulate_policy
  File "/cvgl2/u/small02/robosuite-benchmark/util/rlkit_utils.py", line 264, in simulate_policy
    video_writer=video_writer,
  File "/cvgl2/u/small02/robosuite-benchmark/util/rlkit_custom.py", line 437, in rollout
    full_obs = env._get_observation()
  File "/cvgl2/u/small02/robosuite-benchmark/robosuite/wrappers/wrapper.py", line 125, in __getattr__
    orig_attr = getattr(self.env, attr)
AttributeError: 'Lift' object has no attribute '_get_observation'

Thanks for your help!

shivanimall commented 2 years ago

I think this was a bug or possible api change? changing the call to get_observations() worked