Sony PlayStation 4 DualShock®4 node joy_msg to twist_msg
- 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
$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
$ds4drv
if it is not running already.$rosparam set joy_node/dev "/dev/input/jsX"
$rosrun joy joy_node
$rosrun ps4_ros ps4_ros
$roslaunch ps4_ros ps4
-
One can adjust the following parameter inside the launch file or use rosparam by using the one by one start procedure
-
<param name="scale_angular" value="1.5"/>
-
<param name="scale_linear" value="0.5"/>
-
- Display raw ds4drv data
$sudo jstest /dev/input/jsX
- Pan-and-Tilt on second joystick