ARISE-Initiative / robosuite-benchmark

Benchmarking Repository for robosuite + SAC
52 stars 14 forks source link

RunTime error when using record_video with rollout.py #6

Open JL321 opened 3 years ago

JL321 commented 3 years ago

Having issues trying to run rollout.py when the record_video parameter is used.

Command that causes the error: python scripts/rollout.py --load_dir {run_dir} --horizon 200 --camera frontview --record_video

Screenshot of traceback: Screenshot from 2021-01-22 17-37-49

Running the exact same command without the record_video option seems to work without error, so it doesn't seem like there should be an error raised from the pytorch back-end.

*Some additional info:

cremebrule commented 3 years ago

Hi @JL321 ,

Thanks for raising this issue. Indeed, this was an issue because the new GymWrapper automatically adds image observation keys if they're present (which they are because we're recording a video from the raw frames). This has been fixed; can you re-pull and verify it works on your machine?

JL321 commented 3 years ago

@cremebrule I repulled, but it looks like I'm getting the following error instead Screenshot from 2021-01-22 18-24-31

cremebrule commented 3 years ago

Sorry, didn't push all the relevant changes. Can you try again?

JL321 commented 3 years ago

Now I'm getting this error Screenshot from 2021-01-22 22-03-27

This also seems to apply to rollout.py without record_video - so normal rendering no longer works

cremebrule commented 3 years ago

Sorry -- what version of robosuite are you using? (Specifically, what commit hash)? I was under the impression you were using the most recent version currently on master, but based on the error message it seems that you're using a slightly outdated version.

JL321 commented 3 years ago

I installed it through requirements, so I don't know the specific commit hash (should be from around the 14th - I'm not sure if the commits made on that day were included). Conda lists the version as robosuite 1.1.0

cremebrule commented 3 years ago

I see. The changes I added are in anticipation of the new 1.2 release, so you may be slightly outdated. Is your robosuite built from source or was it installed using pip?

JL321 commented 3 years ago

Installed using pip - I tried upgrading, but it doesn't look like pip registers the newest version yet

cremebrule commented 3 years ago

I see -- yes, we're about to release the 1.2 version soon. Is this urgent? If you can wait for the 1.2 release, I'd recommend that, otherwise, you can do the following:

rojas70 commented 3 years ago

I have robosuite 1.2, python 3.7.4, mujoco 2.0.2.2.

When I try to record video with the command:

python /home/juan/python/drl/toolsuites/robosuite-benchmark/scripts/rollout.py --load_dir /media/juan/hdd/data/suite/runs/PickPlaceCan-Panda-OSC-POSE-SEED1/PickPlaceCan_Panda_OSC_POSE_SEED1_2021_03_09_21_57_24_0000--s-0/ --horizon 200 --camera agentview --record_video

I get a GLEW initialization error:

ERROR: GLEW initalization error: Missing GL version

Press Enter to exit ...

This is typically a Mujoco error: http://www.mujoco.org/forum/index.php?threads/glew-initalization-error-missing-gl-version.3508/ https://github.com/openai/mujoco-py/pull/145

Some of these errors and fixes are a few years old. I do do LD_PRELOAD with glew libs with the following commands in .bashrc:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.2/lib64:/home/juan/.mujoco/mujoco200/bin:/home/juan/.mujoco/mjpro150/bin

#https://github.com/openai/mujoco-py/issues/44
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so

I have had no problem running training/visualizations of the simulations. It just happens in the recording.

Wonder if anyone has some insights into this error.