cjy1992 / gym-carla

An OpenAI gym wrapper for CARLA simulator
MIT License
548 stars 111 forks source link

Blackscreen for pygame window #13

Open georgeliu233 opened 4 years ago

georgeliu233 commented 4 years ago

Hello there~ I'm currently using CARLA0.9.9 in Windows system. When I'm running the test.py, it seems that all the cars and pedestrians are emerged in the CARLA.exe, but the pygame screen window keeps to be blackscreen and shows no response. And I see no incompatibility for Windows system of the code in the package. Can you figure it out?

cjy1992 commented 4 years ago

Hi, currently we only support CARLA0.9.6, and we have not tested it on Windows. Could you check if it works with CARLA0.9.6 on Windows?

georgeliu233 commented 4 years ago

Thanks again for your reply! But the CARLA in version 0.9.6 only have the Linux installed package, so I'm not sure what causes the blackscreen. Is there any code incompatible in Windows system? Also what would come out in the pygame window if everything goes well?

cjy1992 commented 4 years ago

I think the reason is that different versions of CARLA have different APIs. Although we do plan to upgrade gym-carla to be compatible with 0.9.9, you might better try it on a Linux system if you are in a hurry.

georgeliu233 commented 4 years ago

Hello, thanks again for your kind reply on Github, I thought I have fixed the 'No response' problem so that it can be compatible with Windows system by adding the following codes in Carla_Env.py line 548: for event in pygame.event.get():       if event.type == pygame.QUIT:        pygame.quit()        sys.exit()      pygame.display.flip()

Then the pygame window will only show 'No response' the instance the environment got upgraded,but I thought it would not bother.

------------------ 原始邮件 ------------------ 发件人: "Jianyu Chen"<notifications@github.com>; 发送时间: 2020年7月3日(星期五) 凌晨1:55 收件人: "cjy1992/gym-carla"<gym-carla@noreply.github.com>; 抄送: "tenderness"<2482976548@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [cjy1992/gym-carla] Blackscreen for pygame window (#13)

I think the reason is that different versions of CARLA have different APIs. Although we do plan to upgrade gym-carla to be compatible with 0.9.9, you might better try it on a Linux system if you are in a hurry.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Fangwq commented 4 years ago

@cjy1992 , I test it with Carla-0.9.10.1 on linux, but it is also black screen in pygame. How can I solve this problem?