joystick_ros2
joystick_ros2 copied to clipboard
Not working with ROS2 Dashing under Ubuntu 18.04 for PS4 gamepad
Hi,
I am able to view the PS4 gamepad under /dev/input/js0 (and /dev/input/eventX) using the ds4drv --hidraw
(connected via USB). However when I run the joystick_ros2 node, it does not detect the device:
ros2 run joystick_ros2 joystick_ros2
/opt/ros/dashing/lib/python3.6/site-packages/rclpy/node.py:1053: UserWarning: Pass an explicit 'qos_profile' argument
warnings.warn("Pass an explicit 'qos_profile' argument")
Joystick not found. Will retry every second.
Joystick not found. Will retry every second.
Joystick not found. Will retry every second.
Joystick not found. Will retry every second.
Joystick not found. Will retry every second.
This is because the inputs
Python package is not detecting the device. This could be because ds4drv
uses the evdev
interface. Probably there is an incompatibility there with the Python inputs module not supporting my platform (I'm using NVIDIA Jetson). So I tried using the evdev module in joystick_ros2.py
but then that changes the whole way of accessing the input events. I'd appreciate if you have any tips on getting this to work.
Thanks.