Ask Your Question
0

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

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

Loneflyer gravatar image

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

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
1

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

wsAndy gravatar image

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

Maybe you haven't download jstest

edit flag offensive delete link more

Comments

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 imageLoneflyer ( 2015-09-30 21:37:43 -0600 )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 imagewsAndy ( 2015-10-01 11:00:54 -0600 )edit

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

wsAndy gravatar imagewsAndy ( 2015-10-01 11:02:08 -0600 )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 imageLoneflyer ( 2015-10-01 21:08:34 -0600 )edit
0

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

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: http://wiki.ros.org/joy/Tutorials/ConfiguringALinuxJoystick

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
0

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

fabian77 gravatar image

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

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

Comments

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

Loneflyer gravatar imageLoneflyer ( 2015-09-30 21:32:46 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 8,403 times

Last updated: Oct 01 '15