Ask Your Question

How to use PS4 controller with CLearpath Jackal?

asked 2021-03-31 08:19:28 -0500

Py gravatar image

I am struggling to use the PS4 controller supplied with the Clearpath Jackal for manual control. I can connect to it by running sudo bluetoothctl then agent on and scan on to get the Mac address and then running:

scan off
connect <MAC_ADDRESS>

This successfully connects to the controller but I get no response when I try to use it, i.e. the robot doesn't move. I've tried to run hcitool dev and rfkill list all to get more info. Here's the output I get:

administrator@user:~$ hcitool dev
    hci0    D8:61:62:B3:2F:DE
administrator@user:~$ rfkill list all
0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

Any ideas where I am going wrong?

edit retag flag offensive close merge delete


The first time using a PS4 controller with a Husky, I wasn't aware that I needed to press one of the shoulder buttons to actually send commands.

pedro1713 gravatar image pedro1713  ( 2021-03-31 08:29:23 -0500 )edit

Few follow ups that I am not sure I understand as part of you orginal question: Is the device showing up in /dev/ ? Are you able to use something like jstest to visualize joystick outputs?

Just trying to see if the issue is at the OS level or the ROS level

vinny gravatar image vinny  ( 2021-03-31 08:29:55 -0500 )edit

I've tried holding the L1 button as well as moving the left joystick but there has been no response. The device hci0 is not showing up in the /dev directory. I've just had a quick play with the command jstest --event and I get the message jstest: No such file or directory. Not sure if this is expected given that hci0 is not in /dev or whether I've done something else wrong. jstest seemed to be preinstalled on the Jackal as the usage text displayed in the terminal after running the command jstest with no flags.

Py gravatar image Py  ( 2021-04-01 04:15:10 -0500 )edit

Can you check /dev/input/ for a js* device

vinny gravatar image vinny  ( 2021-04-01 15:16:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-04-06 10:27:20 -0500

Py gravatar image

I solved this issue by running sudo apt-get install python-ds4drv, sudo udevadm control --reload-rules and then sudo udevadm trigger which then showed /dev/input/js0 and /dev/input/ps4 after running ls -l /dev/input.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-03-31 08:19:28 -0500

Seen: 14 times

Last updated: Apr 06