zhejz / carla-roach

Roach: End-to-End Urban Driving by Imitating a Reinforcement Learning Coach. ICCV 2021.
https://zhejz.github.io/roach
Other
274 stars 50 forks source link

how to change this line "from gym.wrappers.monitoring.video_recorder import ImageEncoder" #38

Closed SExpert12 closed 2 months ago

SExpert12 commented 3 months ago

CARLA version :0.9.14 in ubuntu. Hi all, when I run the data_collect.py file, I am getting this error - "from gym.wrappers.monitoring.video_recorder import ImageEncoder ImportError: cannot import name 'ImageEncoder' from 'gym.wrappers.monitoring.video_recorder"

When I search for error I got to know that ImageEncoder is deprecated. So how to change code for this line?

Thanks in advance.

zhejz commented 2 months ago

You could create an ImageEncoder locally and get rid of the dependency on openai_gym. Please check out here: https://github.com/zhejz/TrafficBotsV1.5/blob/main/src/utils/video_recorder.py