Creating a custom ROS game controller interface
If you have played with the joystick with either Baxter or Crazyflie, you may think that the function of certain buttons or joysticks would be better with your own special design. Each type of game controller has one or more joysticks and various buttons or triggers to cause events depending on the game software being used. Here, for the Microsoft Xbox controller, we will do the following:
Show how to determine the mapping between controller joysticks, buttons, and triggers and the number corresponding to each using a graphical package,
jstest-gtk
Use the terminal command
jstest
; this will enable you to determine the corresponding numbers of controller joysticks, buttons, and triggers
The ensuing diagram shows the Xbox 360 game controller. Pushing a button changes the output from 0 (off) to 1 (on) on the channel corresponding to the pushed button, which in turn can be read by a program and used to start an application. Moving the stick outputs...