araffin / learning-to-drive-in-5-minutes

Implementation of reinforcement learning approach to make a car learn to drive smoothly in minutes
https://towardsdatascience.com/learning-to-drive-smoothly-in-minutes-450a7cdb35f4
MIT License
287 stars 87 forks source link

Teleoperation mode macOS #40

Closed MariaPiaGelos closed 2 years ago

MariaPiaGelos commented 2 years ago

hello ! I currently work with in a macOS Catalina and python 3.7. And I have this exception :

Python[43503:2080609] WARNING: nextEventMatchingMask should only be called from the Main Thread! This will throw an exception in the future.
Assertion failed: (NSViewIsCurrentlyBuildingLayerTreeForDisplay() != currentlyBuildingLayerTree), function NSViewSetCurrentlyBuildingLayerTreeForDisplay, file /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.60.100/AppKit.subproj/NSView.m, line 13568.

It appears to be an issue with pygame in a separate thread on MacOS. Do you have some suggestions to what i have to change in teleop_client.py ? thanks !

Captura de Pantalla 2021-12-11 a la(s) 17 23 10
MariaPiaGelos commented 2 years ago

Update : i resolve this issue by running the main_loop in the init. Without assigning it to a thread.