Skip to content

[ROS] Sony PlayStation 4 DualShock®4 node joy_msg to twist_msg

License

Notifications You must be signed in to change notification settings

solbach/ps4-ros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ps4_ros

Sony PlayStation 4 DualShock®4 node joy_msg to twist_msg

Installation

  1. Install ds4dr: $sudo pip install ds4drv
  2. Install ros-joy: http://wiki.ros.org/joy
  3. Go into pairing mode with PS4: Playstation button + share button for ~5 sec
  4. Run $ds4drv from command line to connect to PS4
  5. This will output something like _Created devices /dev/input/jsX
  6. remember /dev/input/js__X__ and update the launch file (default X=0)
  7. $sudo chmod a+rw /dev/input/jsX

Starting

One by one

  1. $ds4drv if it is not running already.
  2. $rosparam set joy_node/dev "/dev/input/jsX"
  3. $rosrun joy joy_node
  4. $rosrun ps4_ros ps4_ros

roslaunch

  1. $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"/>

Troubleshooting

  • Display raw ds4drv data
    • $sudo jstest /dev/input/jsX

To Do (v.2.0)

  • Pan-and-Tilt on second joystick

About

[ROS] Sony PlayStation 4 DualShock®4 node joy_msg to twist_msg

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published