Skip to content

Configuring your Joystick

Nicholas Paul edited this page Oct 30, 2017 · 3 revisions

Setup

To set up your joystick run the following command and follow along with the on-screen instructions.

roslaunch l2bot_examples joy_setup.launch

The L2Bot must be controlled with joysticks. It cannot be controlled with d-pads.

Screenshot_from_2017_10_29_21_53_43

Troubleshooting

A few notes:

  • The joy_nav node only works with joysticks not d-pads, buttons, or bumpers. Make sure you are using a controller with a joystick.

Make sure you are using the correct joystick

Run roscore

$ roscore

Set the joystick parameter

$ rosparam set joy_node/dev /dev/input/js1

Run the joystick node

$ rosrun joy joy_node

In a new terminal, echo the joystick commands

$ rostopic echo /joy

Wiggle your joystick and press buttons. You should see messages come in as you interact with the controller.

If you do see the messages

Make sure the rosparam value you used for the rosparam command above matches the rosparam value in the following launch files:

l2bot_examples/launch/joy_nav.launch
l2bot_examples/launch/joy_setup.launch

If you do not see the messages

Repeat the above steps but use a different value for N when setting the rosparam. When you find the correct value or N, make sure to change the rosparam value in the following launch files:

l2bot_examples/launch/joy_nav.launch
l2bot_examples/launch/joy_setup.launch