Sony PlayStation 4 DualShock®4 node joy_msg to twist_msg. The connection with Sony PlayStation 4 DualShock®4 is established using Bluetooth.
- Install ds4dr:
$sudo pip install ds4drv
- Install ros-joy: http://wiki.ros.org/joy
- Go into pairing mode with PS4: Playstation button + share button for ~5 sec
- Run
sudo ds4drv
from command line to connect to PS4 - This will output something like _Created devices /dev/input/jsX
- remember /dev/input/js__X__ and update the launch file (default X=0)
$ sudo chmod a+rw /dev/input/jsX
- Go into pairing mode with PS4 controller: Playstation button + share button until withe led starts flashing.
sudo ds4drv
if it is not running already.$ roslaunch ps4_ros ps4
device_name
: name assigned to the device. It is the joystick name appearing when launchingsudo ds4drv
pub_topic_twist
: name of the topic where the PS4 controller publishes twist messagesmax_linear_twist
: max linear twistmax_angular_twist
: max angular twist
- Display raw ds4drv data
$sudo jstest /dev/input/jsX
- Adapted from PS4-ros