
The buttons on the Logitech joystick are numbered, but the numbers start at 1 (in the ROS message, the button index starts at 0). Once you have determined the button mapping, you'll have a list like this:Įx: Button 0 on the primary is the same as button 9 on the secondary, etc. For example, the upper left index finger button (L1) is button #6 on a Logitech joystick, but #10 on a PS3 SIXAXIS. Next, you'll have to find out the differences in the button mapping between the two joysticks. Configure your teleop interface around this device (see Writing a Teleoperation Node for a Linux-Supported Joystick). Select one joystick to be the "primary" joystick. It may be useful to have them use different machines.

It is important that they don't use the same port.

Using the Joystick Tutorial, configure and set up each joystick. Make sure that you have two joysticks and proper receivers. Make sure that it's built on every machine that you will use it on (robot, desktop, etc).įamiliarize yourself with the joystick_remapper package documentation before moving on. In order to use this package, you'll have to build it. This tutorial uses the joystick_remapper package. The remaining parts of this tutorial involve using heterogeneous joysticks. As long as a joystick is not moved (it has no events), it will not send messages.

In some cases this can be avoided by leaving autorepeat off for each joystick.

) command and another is commanding a positive velocity, your robot might behave unpredictably depending on which message it gets last. For example, if one joystick is publishing a (0.0, 0.0. Some teleop nodes may have trouble with multiple joysticks. You will need to make sure to launch the joy_nodes with different names in the launch file, and make sure they are not trying to read from the same joystick device. They will automatically publish to the /joy topic. If you have multiple joysticks of the same type, you can simply have multiple instances of the joy_node running.
