Couldn't open joystick /dev/xboxcontroller

Hello there,

I still don’t have the BlueROV in my hands, but I want to start trying things to have it all ready once I have it (I will have it a very limited time due to organization issues with the other partners from my project), so I am already trying the Xbox joystick performance with the bluerov_apps ROS package.

I plugged the controller and checked that everything was OK according to the ROS joy node tutorial, and I found that the joystick was at /dev/input/js3.

On the other hand, I saw in the teleop_xbox.launch file that it was looking for the controller at /dev/xboxcontroller, so I installed the udev rule as suggested in this discussion in order from the launch file to correctly detect the Xbox 360 controller.

After all this, I ran the teleop_xbox. launch (with the xbox controller plugged, of course), and this message appears:

[ERROR] [1485861882.610007092]: Couldn’t open joystick /dev/xboxcontroller. Will retry every second.
[ INFO] [1485861882.641106160]: reconfigure request received

Alternatively, I tried to select the controller port manually by writing:

roslaunch bluerov_apps teleop_xbox.launch dev:= /dev/input/js3

In this case, the error message doesn’t appear, but I do rostopic list and the only topics published are /rosout and /rosout_agg. All the topics are published correctly when the error message appears.

I’m using a third party xbox 360 controller in Ubuntu 14.04 and ROS Indigo version.

What am I doing wrong? Is there any additional rule that I should install? Could it be for using a third party controller? What could be the reason of why none topic is being published?

Thank you,

The cause is probably your third party joystick. Udev rules are based on device identifiers like the manufacturer. You should do ls /dev/input before and after plugging the joystick in. The js* that appears is the one you should select. The joystick devices will not always be enumerated in the same order (it might be js2 one time, js3 the next), which is why the udev rule was introduced.

-Jacob

Ok, so it appears that you do know that it is /dev/input/js3 that corresponds to your joystick. I am not sure about this, but I think the issue is you’re passing an argument, but the launch file is not configured for a command line argument. It is weird though that the error goes away. Does it work if you replace “/dev/xboxcontroller” with “/dev/input/js3” in the launch file, and omit the dev:= argument?

Yes, changing the launch file works well!
This time appears this message:

[ INFO] [1485881220.973546229]: reconfigure request received
[ INFO] [1485881220.995274645]: Opened joystick: /dev/input/js3. deadzone_: 0.050000.

Which did not appear when I passed the argument with the command line.

I tried also deleting the line param name=“dev” value=“/dev/xboxcontroller” type=“string”/. In this case, the node opened the joystick in js0, but even if the joystick was in js3, the same message to what I just write above appeared.