Repository navigation
Add PS5 DualSense controller support on Windows - #26
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
yassinsolim
left a comment
There was a problem hiding this comment.
Thanks Karis, this is a clean addition. The bridge sends the same packets as the XInput bridge, and requiring released controls on every connect and reconnect is a good safety touch.
What I checked:
- The
waybionic_teleoptests pass in the ROS image (67, including flake8 and pep257). - With the real Pygame 2.6.1, every
CONTROLLER_AXIS_*andCONTROLLER_BUTTON_*constant and every controller call the bridge uses exists, and the bridge starts without a controller and stops cleanly on Ctrl+C. - It merges cleanly with #22 and with #27 (Cartesian teleop). On a DualSense, L1 is the axis lock and the D-pad tilts in the Cartesian group, so nothing else is needed.
Please add the Python version note (inline) before this merges, since the install step fails on Python 3.14.
Small follow-ups, not blocking:
joy_udp_receiverstill says "run xinput_bridge on the host" when no packets arrive. It could name both bridges.package.xmlstill describes the package as Xbox-only, whilesetup.pywas updated.- The bridge prints nothing while it can't find a controller (inline).
|
Karis, I merged main into this branch so it can go to main now that the stack has landed. Nothing was rewritten, so pull before you push again.
The base is now main, and the full suite passes (1035 tests). There's no DualSense here, so please check each row of the controls table and rumble at a limit over USB and Bluetooth. |
Opt into SDL extended Bluetooth reports before controller initialization and report rejected rumble requests. Document the DirectInput tradeoff and cover the flag and failure path in tests. Refs #26
|
Tested the DualSense with the ground station over USB and Bluetooth. Controls worked, and the controller rumbled at a limit on both connections; Bluetooth used --bluetooth-rumble. The full local Compose run passed 1,036 tests, and PR CI is green. L1 axis lock was not visually confirmed. I also saw one “Host paused” safety stop while the controller stayed connected; I’ll investigate if it recurs. |
yassinsolim
left a comment
There was a problem hiding this comment.
Thanks, Karis, and thanks for testing over both USB and Bluetooth. --bluetooth-rumble works well as an opt-in:
- the hint is set before pygame starts SDL;
rumble()reports whether SDL accepted the request;- the bridge says once how to turn on Bluetooth rumble when SDL refuses it.
The tests cover both modes, and CI is green.
About the "Host paused" stop: it comes from the simulated drive node, not the controller. The node stops the arm when its own control loop stalls for longer than the drive heartbeat. That can happen when Docker or RViz briefly starves the container of CPU, so it can happen with any controller. If you see it again, note what else was running on the computer at the time.
…r-support # Conflicts: # BuildInstructions.md # waybionic_bringup/CMakeLists.txt # waybionic_bringup/launch/ground_station.launch.py # waybionic_teleop/setup.py
|
Karis, #22 and this PR both changed |
Summary
Adds PS5 DualSense controller support on Windows through an SDL/Pygame bridge.
The bridge translates the DualSense controls into the existing teleop layout:
The bridge requires neutral controls when connecting or reconnecting and sends a disconnected state when controller input is lost.
Validation
DualSense Wireless Controller.Dependency
Depends on #24. Retarget this PR to
mainafter #24 merges.