ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Question realting to interfacing of ps4 gamepad

asked 2018-09-28 06:04:45 -0500

Hamza Ali gravatar image

with very due respect it is stated I am working on unmanned ground vehicle, which is more or less look like a fighting robot with robotic arm mounted on it, I want to know how to control my robot with ps4 gamepad and using ROS.

any advice would be highly appreciated.

I am using raspberry pi 3 as a SBC

edit retag flag offensive close merge delete

Comments

This is a HUGE question. We'll need to know a lot more about your setup to help. Maybe start with just the mobile base, how do you control the motors? Do you have encoders or and IMU?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-09-28 09:14:16 -0500 )edit

Yes,i have a motor with encoders

Hamza Ali gravatar image Hamza Ali  ( 2018-09-29 04:34:36 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-09-28 12:01:15 -0500

lucasw gravatar image

The ps4 gamepad should work with http://wiki.ros.org/joy in at least usb wired mode, otherwise bluetooth needs to be set up with your pi.

Some of these instructions https://github.com/solbach/ps4-ros regarding ds4drv should help with running bluetooth (not sure if working that on a pi is different- there are posts in forums elsewhere from people using a ps4 controller to connect to a pi to play games that could help). The actual code in that github repository maybe is a useful example, but not probably not necessary for your robot (it looks specific to someone else's custom robot).

Maybe this https://lifehacker.com/everything-you... is still relevant but it could be easier/different now.

http://wiki.ros.org/teleop_twist_joy converts joy messages to messages you could design your robot to be able to drive with, or you could make a custom node that translates joy messages to something that works for you.

Rumble/vibration feedback #q281388

edit flag offensive delete link more

Comments

Thank you very much

Hamza Ali gravatar image Hamza Ali  ( 2018-09-29 04:36:27 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-09-28 06:04:45 -0500

Seen: 505 times

Last updated: Sep 28 '18