0
$\begingroup$

Rosanswers logo

I have a ps3 controller which I was using to drive my robot.

The controller was connected to my pc via usb.

I ran through the ROS tutorial titled 'How to Pair the PS3 Joystick with a Bluetooth Dongle.'

And paired the controller to a bluetooth dongle I had. Everything worked well. Except, I found that sometimes I lost connectivity to the controller and my robot would go nuts when this happened.

I want to go back to the original configuration of having the controller connected to the pc via usb but I don't know how, can I get some help please?

Thanks.


Originally posted by mte2010 on ROS Answers with karma: 80 on 2012-11-29

Post score: 0


Original comments

Comment by dornhege on 2012-11-29:
This doesn't help with the question, but with the problem: Your robot MUST have timeouts for receiving motion commands and stop if there aren't any. Going nuts on connection loss in not a good behaviour.

Comment by Ben_S on 2012-11-29:
I dont exactly get your problem. Is your controller automatically pairing with your bluetooth donge and you want that to stop? Or cant the controller be used over normal usb anymore because of the pairing?

Comment by mte2010 on 2012-12-03:
the problem is; i paired them using the ros tutorial. I don't want to use the bluetooth dongle anymore, i tried unpairing them by following the same tutorial. Except, the controller cannot be used over the usb line anymore. Is there a way i can check which usb input the controller is set at?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I figured out what the problem was.

  1. When the bluetooth dongle and ps3 controller are paired, they are automatically set to /dev/input/js0 by default.

  2. And when I plug in the ps3 controller to the pc using a usb cable, this new instance of a joystick is now set to /dev/input/js1

  3. So, looking at the launch file created to launch our nodes, under node pkg = joy, value = /dev/input/js0. So I just set that to js1 instead, and now my code runs off whatever is identified as js1, which in this case is the ps3 controller hooked up using usb.

So, if I ever want to go back to using the bluetooth dongle, I'll just reset that /dev/input/ value to js0...

Thanks.


Originally posted by mte2010 with karma: 80 on 2012-12-11

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Ben_S on 2012-12-12:
Removing the bluetooth-dongle wasnt an option?

$\endgroup$

Your Answer

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