O'Reilly logo

Robot Operating System Cookbook by Kumar Bipin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works…

After installing the packages, we will connect our joystick to the computer system and check whether the joystick is recognized or not by using the following command:

$ ls /dev/input/

This will produce an output showing that all device nodes in the system correspond to input devices, as shown in the following screenshot:

System input devices

You will find that the js0 device node was created by the driver when the joystick was plugged into the computer system. Next, we can use the jstest command so we can check whether it is working or not:

$ sudo jstest /dev/input/js0

The output is shown in the following screenshot:

jstest ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required