Skip to content

Fix: PS4 UDEV Symlink Rule #219

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

Merged
merged 1 commit into from
May 29, 2025
Merged

Fix: PS4 UDEV Symlink Rule #219

merged 1 commit into from
May 29, 2025

Conversation

luis-camero
Copy link
Contributor

@luis-camero luis-camero commented May 29, 2025

Disable symlink rule to rely on DS4DRV instead.

The clearpath_bt_joy rule is installed with priority 60, which is higher than the ds4drv rules, 50-ds4drv.rules. Therefore, the clearpath_bt_joy rules would symlink the ps4 device to the latest js* device with name Wireless Controller, instead of the DS4DRV Managed Wireless Controller.

The issue with the controller was caused by the clearpath_bt_joy rule mapping the ps4 device to the js1 input. When the controller was disconnected, the ps4 device would map to js0, which would coincidentally allow the joy node to open the right device. When the controller was connected, the ps4 device would switch to js1, but because the joy node had already launched, it would continue to read from js0 and successfully get the commands to the robot. When the joy node was restarted, the ps4 device would be pointing to js1 and now the node would open the incorrect device.

@luis-camero luis-camero requested a review from a team as a code owner May 29, 2025 17:53
@luis-camero luis-camero requested review from tonybaltovski, roni-kreinin and civerachb-cpr and removed request for a team May 29, 2025 17:53
@civerachb-cpr
Copy link
Contributor

civerachb-cpr commented May 29, 2025

Rather than removing the symlink, which will break any robot.yaml files that reference /dev/input/ps4 & invalidate some of our existing documentation, would a better solution be to just change the priority?

e.g. if we remove the symlink at /dev/input/ps4 we also need to update our default teleop configurations, e.g.

Copy link
Contributor

@civerachb-cpr civerachb-cpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above: we can't just arbitrarily remove the symlink if we don't also update the default PS4 teleop configurations.

Is simply changing the priority of the udev rule in our package an option instead of removing the symlink?

@tonybaltovski
Copy link
Member

The symlink happens in the ds4drv package. It will continue to exist and provide /dev/input/ps4. Therefore, it will not break anything correct? This package is not used at the moment and was supposed to replace ds4drv but that isn't the case currently.

@civerachb-cpr
Copy link
Contributor

The symlink happens in the ds4drv package. It will continue to exist and provide /dev/input/ps4. Therefore, it will not break anything correct? This package is not used at the moment and was supposed to replace ds4drv but that isn't the case currently.

My mistake! I thought the ds4drv package was providing /dev/input/ds4 (or something similar). If it's already providing an identical symlink then there's not much need to override it with our own rule.

@tonybaltovski tonybaltovski merged commit 29fda45 into jazzy May 29, 2025
11 of 13 checks passed
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.

3 participants