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

Error on joy_node (Couldn't open joystick)

asked 2016-09-15 06:26:18 -0500

Pato gravatar image

Hello, I have an error on joy_node. I wanted to use joystick to control Ar.Drone. So I used joy package. At the first time, I successfully used joystick("rosrun joy joy_node".) But next time I executed joy_node, an error occurred.

[ERROR] [1473937621.294455702]: Couldn't open joystick dev/input/js1. Will retry every second.

Then, I tried some solutions. First, I checked what is the joystick's name.

ls -l /dev/input/js*
crw-rw-rw-  1 root root 13, 0  9月 15 19:06 /dev/input/js0
crw-rw-rw-+ 1 root root 13, 1  9月 15 19:24 /dev/input/js1

Plugging and unplugging, I could see my joystick was js1.

Second, I changed permissions of /dev/input/js1 to 777 and set the parameter.

sudo chmod a+rw /dev/input/js1
rosparam set joy_node/dev "dev/input/js1"

After all I couldn't solve this problem...

Thank you for any help.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2016-09-15 07:12:20 -0500

gvdhoorn gravatar image
rosparam set joy_node/dev "dev/input/js1"

The path to the joystick device is /dev/input/js1, not dev/input/js1 (note the starting /).

edit flag offensive delete link more

Comments

Thank you for the quick answer. I didn't notice the simple mistake.Thanks to you, I was able to use the joystick!

Pato gravatar image Pato  ( 2016-09-15 22:26:32 -0500 )edit

No problem, good you got it to work.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-16 00:21:35 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-09-15 06:26:18 -0500

Seen: 2,514 times

Last updated: Sep 15 '16