ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

[solved] Couldn't open Joystick /dev/input/js0

asked 2015-09-30 06:18:05 -0500

Loneflyer gravatar image

updated 2015-10-01 21:10:40 -0500

I am trying to "teleop" my turtlebot using a Logitech Attack 3 joystick. I bring up the turtlebot from a remote PC, followed by the command:

roslaunch turtlebot_teleop myjoystick.launch

where myjoystick.launch is the modified logitech.launch file with the added axis_deadman param. The terminal on my remote PC shows error "Couldn't open Joystick /dev/input/js0. Will retry every second." No response when joystick is connected to the remote PC. The turtlebot responds properly when I connect the joystick to the turtlebot netbook.

I tried changing permissions of /dev/input/js0 to 777 as well, with no help.

Also, keyboard teleop happens without any errors.

Why is the remote joystick teleop not happening and how do I fix this?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2015-09-30 09:26:41 -0500

wsAndy gravatar image

Hey , there is a document about this problem , you can have a

Maybe you haven't download jstest

edit flag offensive delete link more



The joystick works fine when connected to the turtlebot netbook. It won't work in teleop from my remote PC.

I have tried all the troubleshooting steps from that documentation page, with no help.

Loneflyer gravatar image Loneflyer  ( 2015-09-30 21:37:43 -0500 )edit

Well, the maybe you should check your net. Maybe you can try this way. First, link the joystick with your remote PC, in which if you can get the output , right? Then, you connect to turtlebot, and in its terminal you can get the output message or not.

wsAndy gravatar image wsAndy  ( 2015-10-01 11:00:54 -0500 )edit

If you cannot get the message, you need to set the ROS_IP in your .bashrc in both computer

wsAndy gravatar image wsAndy  ( 2015-10-01 11:02:08 -0500 )edit

The problem is solved actually. The problem was that I had not set ROS_IP on my remote machine, so a lot of applications that come later in the tutorials after teleop wouldn't open on my PC (like gmapping and rviz).

Thanks for all your help. I'm still a newbie and have a long way to go with ROS!

Loneflyer gravatar image Loneflyer  ( 2015-10-01 21:08:34 -0500 )edit

answered 2018-07-19 13:04:52 -0500

ChaosBuster gravatar image

Somewhat related to giving joystick access to the node is making sure that the device name is accurate. My example happen when I was following the steps at:

For the following command in the step 01.Starting the Joy Node

$ rosparam set joy_node/dev "/dev/input/jsX"

Do not put quotes around the device name.

edit flag offensive delete link more

answered 2015-09-30 09:41:39 -0500

fabian77 gravatar image

updated 2015-09-30 09:42:19 -0500

Maybe your joystick is on another port, not js0. you can test it with

ls /dev/input

plug and unplug your joystick and repeat the command, so you can see on which port (jsx) your joystick is detected. Then change default port in the launchfile.

edit flag offensive delete link more


the ls command shows js0. Even jstest gives the required response with all the keys working.

Loneflyer gravatar image Loneflyer  ( 2015-09-30 21:32:46 -0500 )edit

Question Tools

1 follower


Asked: 2015-09-30 06:18:05 -0500

Seen: 23,604 times

Last updated: Oct 01 '15