-
Notifications
You must be signed in to change notification settings - Fork 764
Setup virtual keyboard joystick
Pavel Vechersky edited this page Nov 21, 2016
·
4 revisions
In order to create a virtual keyboard joystick we utilize the Python-uinput package (https://github.com/devbharat/python-uinput).
Note: the source repository is only needed temporarily so it can be cloned anywhere
git clone git@github.com:devbharat/python-uinput.git
cd python-uinput
python setup.py build
sudo python setup.py install
You must have the uinput kernel module loaded to use Python-uinput. To load the module, run:
modprobe -i uinput
Next, we need to allow programs access to the uinput device:
cd udev-rules
sudo cp 40-uinput.rules /etc/udev/rules.d
You might have to restart the machine for the new permissions to take effect. To test if everything is working properly, run the command below and verify that the virtual keyboard joystick GUI is running, with bars for throttle/roll/pitch/yaw, and responds to keyboard strokes when active:
rosrun rotors_joy_interface key_joystick.py
Once everything is working properly, the cloned Python-uinput repo can be removed.