This wideo is how I control my DIY Robot based on Raspberry Pi 3B+ with a PlayStation 4 controller (DualShock 4).
Connection and control realised by pyPS4Controller module.
Documentation for pyPS4Controller module is available on PyPi and GitHub.