ugo-nama-kun / gym_torcs

MIT License
410 stars 164 forks source link

How to get image observation as an RGB value array? #50

Open JJMUSA opened 6 years ago

JJMUSA commented 6 years ago

We are trying to get an observation output of the vision image for each step in order to write an A3C algorithm with tensorflow that will be able to learn from vision.

We have made sure that the resolution is set to 64 x 64 when trying to run the agent and that vision is set to True when calling the environment: en=TorcsEnv(vision=True, )

We get back an observation dictionary that does not contain an ' img' key, thus we get a KeyError.

BCWang93 commented 5 years ago

HI,do you have solved this problem?I have the same problem recently.Thanks!

JJMUSA commented 5 years ago

Hi, The get_state() function in TorcsEnv class should return an image of the game. Make sure all the dependencies are installed and you set the screen resolution to 64X64.

bardas commented 5 years ago

There is no such method...

xkxiong commented 4 years ago

I changed the resolution to 64x64, but the extracted image is completely black, does anyone know why?

colinzhaoxp commented 2 years ago

I changed the resolution to 64x64, but the extracted image is completely black, does anyone know why?

hi,do you have solved this problem? Thanks!