0
$\begingroup$

Rosanswers logo

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.


Originally posted by Pato on ROS Answers with karma: 5 on 2016-09-15

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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 /).


Originally posted by gvdhoorn with karma: 86574 on 2016-09-15

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Pato on 2016-09-15:
Thank you for the quick answer. I didn't notice the simple mistake.Thanks to you, I was able to use the joystick!

Comment by gvdhoorn on 2016-09-16:
No problem, good you got it to work.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.