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

Invalid joystick when I run ros in a virtual machine

asked 2014-05-14 09:37:57 -0600

pennpanda gravatar image

Hi,

I'm trying to run my ros node inside a virtual machine domU on Xen.

I have pass the USB device to the virtual machine domU. In other words, inside the virtual machine domU, I can see the device /dev/input/js0.

However, when I launch the ros node which needs to access the joystick. It reports the error: Unknown joystick (2 axes, 3 buttons) Invalid joystick.

The joystick I'm using is joystick used for Xbox360. If I use lsusb command, it shows Xbox360 Controller.

I don't have this issue if I run my ros node on the physical machine.

My question is: How should I tackle this issue? The error suggest the emulated usb device seen by the virtual machine is incorrect. But how can I find out which part of the joystick device is incorrect? How should I narrow down the problem?

Thank you very much!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-05-14 20:42:33 -0600

Probably a special case, but maybe by random chance you experience the same issue: The USB dongle of the wireless mouse I use appears as a joystick device in Ubuntu and takes the /dev/input/js0 slot by default. If I connect a joystick, it automatically gets mapped to /dev/input/js1 by default. So you might want to check if you have multiple joystick devices on your system.

edit flag offensive delete link more

Comments

Thank you very much, Stefan! Yes! That's the issue. After I change to js3, which is the Xbox360 joystick, I can use it now! :)

pennpanda gravatar image pennpanda  ( 2014-05-15 06:16:03 -0600 )edit
1

answered 2014-05-14 23:11:31 -0600

ROSkinect gravatar image

You may need to add permission to your usb port :

$> chmod o+rwx /dev/ttyUSB0
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-05-14 09:37:57 -0600

Seen: 2,287 times

Last updated: May 14 '14