deepsense-ai / carla-birdeye-view

Bird-eye's view for CARLA simulator
https://micmarty.github.io
MIT License
182 stars 25 forks source link

How to show pygame display and cv2.show at the same time? #10

Closed Fangwq closed 3 years ago

Fangwq commented 4 years ago

Thank you for sharing. I try to revise the code in __main__.py file to show the bird-eye view and other view together, and control the car with keyboard. I can control the car in pygame, but the window for BirdEye view is white and blank. The main problem is that how can I control the car in pygame, and the car in BirdEye window does the same thing? Thank you very much. image

micmarty commented 3 years ago

@Fangwq I'm not sure what happens in your code, but maybe it's because my example __main__.py assumes using a new actor https://github.com/deepsense-ai/carla-birdeye-view/blob/f666b0f5c11e9a3eb29ea2f9465d6b5526ab1ae0/carla_birdeye_view/__main__.py#L40-L44

My guess is that when you run manual_control.py from CARLA examples, a car is already spawned and has some role_name attribute ("hero" or "ego" as far as I remember correctly). Then when you run my script python -m carla_birdeye_view, it does not use an existing car, but creates another one. Hmmmm... I would need to try this on my own.

Is it still an open issue or maybe you figured this out on your own? (I'm sorry for not responding for that long) Does my lib work at all in your setup (when you don't run that manual_control.py script)?

Fangwq commented 3 years ago

OK, thanks for your response. I figure it out on my own, but forget to close the issue.

didpurwanto commented 2 years ago

@Fangwq how do you solve this?