This ROS package enables control of ROS-compatible robots using a PS5 DualSense controller. It features both analog stick and D-pad control modes, with customizable speed settings and a turbo mode.
- D-pad control mode for precise digital input
- Turbo mode for faster movement
- Compatible with any ROS robot publishing to /cmd_vel topic
- PlayStation 5 DualSense Controller
- USB-C cable for wired connection
- Ubuntu 18.04 or newer
- First, install the required ROS packages:
sudo apt-get update
sudo apt-get install ros-${ROS_DISTRO}-joy ros-${ROS_DISTRO}-teleop-twist-joy
- Clone this repository into your catkin workspace:
cd ~/catkin_ws/src
git clone https://github.com/sirackerman/ps5_teleop.git
- Build the package:
cd ~/catkin_ws
catkin_make
source devel/setup.bash
- Connect your PS5 controller to your computer using a USB-C cable
- Verify the connection:
ls /dev/input/js*
- Set permissions for the controller:
sudo chmod a+rw /dev/input/js*
# In terminal 1
roscore
# In terminal 2
rosrun joy joy_node
# In terminal 3
rostopic echo /joy
Press buttons on the controller - you should see the values change in terminal 3.
- Launch your robot's main launch file (example with Turtlebot3):
export TURTLEBOT3_MODEL=burger # Replace with your robot model
roslaunch turtlebot3_gazebo turtlebot3_world.launch
- Launch the PS5 controller node:
roslaunch ps5_teleop ps5_teleop.launch
- Hold L1 (enable button)
- Up Arrow: Move Forward
- Down Arrow: Move Backward
- Left Arrow: Turn Left
- Right Arrow: Turn Right
- Hold L2 while moving: Turbo Mode (faster movement)
Check customization_and_troubleshooting.txt file.
This project is licensed under the MIT License - see the LICENSE file for details.