Perl based script for making a robot with an RPI3 and PS3 controller. PS3 tutorial below describes how to get PS3 controller to show up in Linux as a /dev/js0 (a standard joystick device) from which Perl libraries for reading joysticks can use.
Tutorial on the PS3 pairing- https://pimylifeup.com/raspberry-pi-playstation-controllers/
Perl CPAN lib for getting Pulse Width Modulation (PWM) on the PI board for the servos - https://metacpan.org/pod/RPi::PIGPIO
Perl CPAN lib for reading the PS3 controller - https://metacpan.org/pod/Linux::Joystick