Buscar este blog

martes, 12 de octubre de 2010

Configuration of the Joystick

1. Verify that Linux recognizes my joystick
$ ls /dev/input/
by-id event1 event12 event2 event5 event8 mice mouse2
by-path event10 event13 event3 event6 event9 mouse0
event0 event11 event14 event4 event7 js0 mouse1

js0 is my joystick's port.

2. Make sure my joystick is working

$ sudo jstest /dev/input/js0

I see the data parameters changing.

3. List the permissions of the joystick

$ ls -l /dev/input/js0

crw-rw-r--+ 1 root root 13, 0 2010-10-12 20:07 /dev/input/js0

This indicates I need to change the mode of the port through:

$ sudo chmod a+rw /dev/input/js0

Listing the permissions again will show this result:

crw-rw-rw-+ 1 root root 13, 0 2010-10-12 20:07 /dev/input/js0

4. Start the joy node

$ rosrun joy joy_node

5. Echo the joy topic

$ rostopic echo joy

And I see the data of my joystick is being published through the joy topic.








No hay comentarios:

Publicar un comentario