0
$\begingroup$

Rosanswers logo

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
pair <MAC_ADDRESS>
trust <MAC_ADDRESS>
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
Devices:
    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?


Originally posted by Py on ROS Answers with karma: 501 on 2021-03-31

Post score: 0


Original comments

Comment by pedro1713 on 2021-03-31:
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.

Comment by vinny on 2021-03-31:
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

Comment by Py on 2021-04-01:
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.

Comment by vinny on 2021-04-01:
Can you check /dev/input/ for a js* device

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Py with karma: 501 on 2021-04-06

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.