robosuite-benchmark icon indicating copy to clipboard operation
robosuite-benchmark copied to clipboard

RunTime error when using record_video with rollout.py

Open JL321 opened this issue 4 years ago • 10 comments

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:

  • OS: Ubuntu 18.04
  • Python version 3.7.4

JL321 avatar Jan 22 '21 22:01 JL321

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?

cremebrule avatar Jan 22 '21 23:01 cremebrule

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

JL321 avatar Jan 22 '21 23:01 JL321

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

cremebrule avatar Jan 22 '21 23:01 cremebrule

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

JL321 avatar Jan 23 '21 03:01 JL321

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.

cremebrule avatar Jan 23 '21 18:01 cremebrule

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

JL321 avatar Jan 23 '21 19:01 JL321

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?

cremebrule avatar Jan 24 '21 02:01 cremebrule

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

JL321 avatar Jan 24 '21 15:01 JL321

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:

  • In L93 of rollout.py (HERE), change proprio-state to be robot-state

cremebrule avatar Jan 25 '21 19:01 cremebrule

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.

rojas70 avatar Mar 11 '21 04:03 rojas70