ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I've had some issues with the stock Linux kernel that ships with Ubuntu 18.04 in the past, specifically its bluetooth device drivers for the PS4 DS4 controller. I don't recall any issues using it via USB, but that's hardly practical when using it to tele operate a mobile robot without a second computer.
For what it's worth, the stock kernel shipped with Ubuntu 20.04 is a lot more stable with the DS4, and joy_node
released into foxy seems to work out of the box, both bluetooth and USB:
$ ros2 run joy joy_node
[INFO] [1600804025.194521913] [joy_node]: Opened joystick: Sony Computer Entertainment Wireless Controller. deadzone: 0.050000
^C[INFO] [1600804101.562256221] [rclcpp]: signal_handler(signal_value=2)
$ ros2 run joy joy_node
[INFO] [1600804160.446296839] [joy_node]: Opened joystick: Wireless Controller. deadzone: 0.050000
^C[INFO] [1600804280.166092944] [rclcpp]: signal_handler(signal_value=2)
The only caveat is that the stock kernel module for the DS4 with Ubuntu 20.04 doesn't seem to report the:
That said, even using bluetooth can be kind of flaky, with the /dev/joyX
device unmounting whenever connection is lost, potentially for any program not accounting for hot swappable input devices. An alternative could be to use wireless controller with a simple USB dongle. Some examples:
2 | No.2 Revision |
I've had some issues with the stock Linux kernel that ships with Ubuntu 18.04 in the past, specifically its bluetooth device drivers for the PS4 DS4 controller. I don't recall any issues using it via USB, but that's hardly practical when using it to tele operate a mobile robot without a second computer.
For what it's worth, the stock kernel shipped with Ubuntu 20.04 is a lot more stable with the DS4, and joy_node
released into foxy seems to work out of the box, both bluetooth and USB:
$ ros2 run joy joy_node
[INFO] [1600804025.194521913] [joy_node]: Opened joystick: Sony Computer Entertainment Wireless Controller. deadzone: 0.050000
^C[INFO] [1600804101.562256221] [rclcpp]: signal_handler(signal_value=2)
$ ros2 run joy joy_node
[INFO] [1600804160.446296839] [joy_node]: Opened joystick: Wireless Controller. deadzone: 0.050000
^C[INFO] [1600804280.166092944] [rclcpp]: signal_handler(signal_value=2)
The only caveat is that the stock kernel module for the DS4 with Ubuntu 20.04 doesn't seem to report the:
That said, even using bluetooth can be kind of flaky, with the
device unmounting whenever connection is lost, potentially for any program not accounting for hot swappable input devices. An alternative could be to use wireless controller with a simple USB dongle. Some examples:/dev/joyX/dev/input/jsX
https://www.logitechg.com/en-us/products/gamepads/f710-wireless-gamepad.940-000117.html
Also, check that your using the correct device number for the connected controller, e.g. setting the parameter for /dev/input/jsX
. If left unspecified, ros_joy
will use the first available device number. With linux, some laptops can have the js0
device associated to the fall detection accelerometer, for stopping/locking older HDD before impact. So that could account for the sensor output discrepancy.
https://askubuntu.com/questions/585706/deactivate-accelerometer