socrob / autonomous_systems

Material used for learning ROS and robotics, as part of the Autonomous Systems course at Instituto Superior Tecnico
34 stars 9 forks source link

PS3 controller issue #11

Open jnisa opened 7 years ago

jnisa commented 7 years ago

problem2 We have solved the problem about turtle_teleop package but now I have this issue presented in the image. Do you know how to solve it? Thank you for your attention.

oscar-lima commented 7 years ago

Looks like a udev rules problem. When you plug a usb device in your computer it creates a “file” where you can access the device, for example: /dev/ttyUSB0 or /dev/ttyACM0 , you need to identify which is the one that the ps3 joystick generates. Once you know that please post here again so that i can give more guidance.

oscar-lima commented 7 years ago

Try:

ls /dev/joy0

With and without the joypad connected for example.

jnisa commented 7 years ago

problem3 As you can see with the controller already connected I can't access to the folder /dev/joy0.

oscar-lima commented 7 years ago
  1. try:

ls /dev/input/js0

  1. try:

sudo usermod -a -G dialout your_username

sudo nano /etc/udev/rules.d/80-ps3-joypad.rules

paste this line inside:

SUBSYSTEM=="usb",ATTRS{idProduct}=="0268",ATTRS{idVendor}=="054c",SYMLINK+="pioneer/joypad",GROUP="dialout"

sudo service udev restart

plug in and out the ps3 controller

done, your device should be available under:

ls /dev/pioneer/joypad

Please tell me if this solved the issue, thanks

jnisa commented 7 years ago

problem4 The problems keeps appearing :(

oscar-lima commented 7 years ago

Please do:

sudo usermod -a -G dialout joao

cat /etc/udev/rules.d/80-ps3-joypad.rules

udevadm info -a -n /dev/input/js0

jnisa commented 7 years ago

problem5

oscar-lima commented 7 years ago

ok, you missed to execute one instructions properly... -.-

please do:

echo "SUBSYSTEM=="usb",ATTRS{idProduct}=="0268",ATTRS{idVendor}=="054c",SYMLINK+="pioneer/joypad",GROUP="dialout"" | sudo tee /etc/udev/rules.d/80-ps3-joypad.rules

sudo service udev restart

plug in and out the ps3 controller

done, your device should be available under:

ls /dev/pioneer/joypad

please let me know if worked

oscar-lima commented 7 years ago

ps3_controller

jnisa commented 7 years ago

problem6 Keeps saying that is not possible to access to that directory

oscar-lima commented 7 years ago

Did you plugged in and out the ps3 controller? (Disconect and conect the usb device) after doing:

sudo service usev restart

Also please do not execute several times the sudo... tee command. The file under /etc/udev/rules.d should only have this information one time.

Just drop anytime by 8.18 today between 10:30 - 12:00 or 14:00-18:00 and we can take a look