robotarium / robotarium_python_simulator

A Python simulator for the Robotarium! See your algorithm run on real robots!
MIT License
111 stars 59 forks source link

Add Partial Fix for Linux Render Issues, Add Simulator Run Script, and Update Docs #4

Open guyfleeman opened 6 years ago

guyfleeman commented 6 years ago

On some Linux DEs PyQt4 still doesn't release input hooks properly. The call to manually restore them has no effect. This causes isolated issues for some users that are particularly painful if they aren't able to force refresh the DE. I had trouble with this on 18.04, i3, in a VM. The fix is to search for PyQt5 availability and manually set it as the renderer (although this usually isn't necessary) if available. Linux users without this option should receive a warning. The render backend must be set before any of the submodules are imported.

This patch will force PyQt5 renderer if available and will warn only Linux users if they aren't on PyQt5. It suggests packages for Debian and Fedora if the warning is displayed. To address the issue of setting the backend before import, a run script has been added that ensures the change is made before import dependencies are evaluated. Combined with the documentation, it also makes the sim a little friendlier to use for new folks.

guyfleeman commented 6 years ago

An addition to the docs suggesting the installation of python3-PyQt5 might be in order, but it seemed like this might be sufficient an edge case to omit it from the docs.