Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RunTime error when using record_video with rollout.py #6

Open
JL321 opened this issue Jan 22, 2021 · 10 comments
Open

RunTime error when using record_video with rollout.py #6

JL321 opened this issue Jan 22, 2021 · 10 comments

Comments

@JL321
Copy link

JL321 commented Jan 22, 2021

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
@cremebrule
Copy link
Member

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
Copy link
Author

JL321 commented Jan 22, 2021

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

@cremebrule
Copy link
Member

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

@JL321
Copy link
Author

JL321 commented Jan 23, 2021

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
Copy link
Member

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
Copy link
Author

JL321 commented Jan 23, 2021

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
Copy link
Member

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
Copy link
Author

JL321 commented Jan 24, 2021

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

@cremebrule
Copy link
Member

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

@rojas70
Copy link

rojas70 commented Mar 11, 2021

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/
openai/mujoco-py#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants