AutoRally / autorally

Software for the AutoRally platform
http://autorally.github.io
738 stars 229 forks source link

Script to find first joystick #69

Closed jisacks closed 6 years ago

jisacks commented 6 years ago

Some mice register as joysticks on Linux, and always selecting /dev/input/js0 can select the mouse instead of the target gamepad. I wrote a simple script which is part of the setupEnvVariables.sh to find the first /dev/input/js* which is actually a joystick and not a mouse. This is then set as an environment variable used by the joystickController.launch script when loading the Gazebo environment.