Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ps3.config.yaml #32

Open
wants to merge 1 commit into
base: foxy
Choose a base branch
from
Open

Conversation

brianabouchard
Copy link

Corrected button numbers to reflect default ps3 controller layout. L2 is 6 and L1 is 4. The prior configuration required the use of the select button as the enable button which was extremely difficult to use.

Corrected button numbers to reflect default ps3 controller layout. L2 is 6 and L1 is 4. The prior configuration required the use of the select button as the enable button which was extremely difficult to use.
@codebot
Copy link
Member

codebot commented Aug 9, 2022

Thanks for the PR!

Which version of the ps3 controller are you using? I think there are many versions of it. How is it connected to your computer? Some of them have a switch to toggle between various modes for the D-pad, etc., which sometimes then remap the buttons internally on the controller as a side-effect, so it can be quite confusing.

@brianabouchard
Copy link
Author

I'm using the original name-brand Sony Dualshock 3 controller that came with my PS3. It is model number CECHZC2U. I've connected it to my computer via USB cable, and I've also used it via USB cable with a Raspberry Pi. I also had a colleague test a PS3 controller they had at their home, and they are having the exact same issue with the mismatch of buttons. There is no toggle switch on this controller. There is a reset pin hole on the back of the controller which I have used to ensure it is using factory settings.

@codebot
Copy link
Member

codebot commented Aug 9, 2022

Perhaps the button mapping changes when the controller is attached over USB versus over Bluetooth? The button map described in this page was derived from using the controller over Bluetooth:
http://wiki.ros.org/ps3joy

Unfortunately I don't have a PS3 controller anymore, and I have no idea if this pairing process works with more recent Linux Bluetooth stacks, but "there was a time" when this worked well:
http://wiki.ros.org/ps3joy/Tutorials/PairingJoystickAndBluetoothDongle

If it ends up that the button map over USB is different from Bluetooth, one solution could be to create a new config file for "PS3 controller connected over USB".

@brianabouchard
Copy link
Author

Hello! I've done some investigating on this and had to pull out an old computer. It turns out that starting with Mac OS Monterey, the PS3 controller is no longer supported via Bluetooth connection. Since the VM that I use to run ROS uses the Bluetooth connections from my Mac, I can't test it there easily. I did dig up an old computer with an old OS and confirmed that when connected via Bluetooth, the mapping is different (according to an app that I was able to grab to map this because I don't have a VM on that machine). However, the bigger issue I'm encountering there is that according to the joystick drivers repo needed to connect the PS3 joystick to ROS via Bluetooth, the ps3joy driver has been temporarily disabled 14 months ago. So, when I tried to connect it via Bluetooth to my RPi, it says ps3joy cannot be found.

This is all making me think that while the mapping here is correct for Bluetooth connections, it may not be possible for new folks to connect to a PS3 controller via Bluetooth.

Would it be possible to make that second config file for PS3usb? Or, given the issues with Bluetooth at the moment, could we update this file and note that it is only for USB? If not, I can just create my own package, but I thought it might benefit others having the update here :)

@codebot
Copy link
Member

codebot commented Aug 10, 2022

Very interesting! Thanks for digging into this and finding the reason for what's happening.

That's surprising that the buttons are mapped differently on different links. Because I think there may be some folks using the PS3 over bluetooth with the PR2 robot (among others), I think it's best to leave the current ps3.config.yaml untouched, and add something like ps3-usb.config.yaml instead, with the equivalent mapping for the USB link. We'd be happy to merge in a PR that adds a new file to the repo.

Thanks for digging up an old computer to get to the bottom of this mystery!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants