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

ps3joy slow output

asked 2013-11-19 02:12:43 -0600

Hansg91 gravatar image

updated 2013-11-19 02:13:06 -0600

Hi all,

I am using p3joy to get feedback from my ps3 controller on an Odroid u2 running Ubuntu 12.10, however it is incredibly slow. There appears to be a delay of a few seconds before messages arrive regarding changes of the controller. evtest and jstest give me the same kind of delay. I 'debugged' ps3joy_node.py and it does seem like its update function is called often enough, where could this delay then be coming from?

In addition, I noticed that if I don't move the controller (this also happens on a laptop with Ubuntu), no events get sent. For example if I keep the controller laying still and press the X button, no messages/events are being sent. If I then move the controller slightly, I get the message/event.

Any suggestions?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
5

answered 2014-01-15 14:06:57 -0600

Chad Rockey gravatar image

updated 2014-04-21 14:10:52 -0600

Update (4/21): I found a PPA that contains a different PS3 driver: https://help.ubuntu.com/community/Six...

I currently recommend installing this, then: sudo sixad --start rosrun joy joy_node

You should see usable output now.


OK I just ran into this issue. Here's what I know:

I see rates through rostopic hz that are absolutely terrible (1.5Hz through 6 to maybe 10 Hz). Even --continuous-output doesn't help. I expect something around 40Hz normal and 90Hz using --continuous-output. Tried multiple dongles, built-in bluetooth, nothing worked.

I tried it on another computer and it worked perfectly there. Eventually I found out that it's due to the kernel version. The latest kernel that works for me is way back to linux-generic-quantal (3.5). 3.8 and 3.11 are both terribly broken.

You can try testing this by installing the linux-generic-quantal package, then holding shift as your computer boots and selection "previous kernels" -> 3.5 from the grub menu. Let me know if this resolves it for you as well. If you don't need a newer kernel, I would uninstall any later kernels and stick with quantal's kernel.

As for fixing this, I have no idea in the slightest. I would personally ask @ahendrix as he was my go to Kernel guy at Willow Garage.

edit flag offensive delete link more

Comments

I tried to install 3.5, but all my drivers stopped working (including bluetooth and internet), so I couldn't test it there. I tried 3.13rc8, it still gives the same frequency (around 13hz for me). Adding continuous output does not change anything for me.

Hansg91 gravatar image Hansg91  ( 2014-01-16 01:40:23 -0600 )edit

I just tried it on an old Pandaboard with Ubuntu and kernel 3.1, it gave me 40hz there. Curious :)

Hansg91 gravatar image Hansg91  ( 2014-01-16 03:11:23 -0600 )edit
1

Sadly, I don't have a PS3 controller, so I can't play around with this. @chad-rockey if you have one that I can borrow, I could play around with it. I'm also interested to see if the newer kernels have native support for the PS3 controller.

ahendrix gravatar image ahendrix  ( 2014-01-17 17:21:03 -0600 )edit
2

@ahendrix, Yeah, please feel free to drop by Savioke and borrow one. I also have two USB bluetooth adapters if you want to borrow those, though it doesn't seem to make a difference between an X230, ASUS Bluetooth, and el-cheapo Bluetooth.

Chad Rockey gravatar image Chad Rockey  ( 2014-01-17 17:38:33 -0600 )edit

Hi @Hansg91 are you fixed the problem slow output in new kernels? I need working bluetooth joystick with kernel 3.8 and BeagleBone Black. I dont understand where to begin to solve...

tuuzdu gravatar image tuuzdu  ( 2014-02-19 10:17:27 -0600 )edit

Nop, no idea. I just know its due to the kernel now.

Hansg91 gravatar image Hansg91  ( 2014-02-21 21:02:04 -0600 )edit
1

answered 2014-12-19 09:57:05 -0600

anqixu gravatar image

For those that are curious, you can make the ps3 gamepad rumble, both in wired and wireless (sixad). I wrote a thin wrapper, which is based on fftest:

https://github.com/anqixu/sixad_rumble

(You will need to identify the proper /dev/input/event# handle associated to your gamepad. I use 'ls'.)

edit flag offensive delete link more
1

answered 2014-03-02 10:41:30 -0600

tuuzdu gravatar image

updated 2014-03-02 10:43:23 -0600

I solved the problem with slow output on BeagleBone Black Ubuntu 13.04 and kernel 3.8. I used this great instruction. But I had problem with compile sixad:

error: ... was not declared in this scope

It can be fixed by adding unistd.h to sources files.

With my bluetooth adapter, joystick became detected after echo "DisablePlugins = input" >> /etc/bluetooth/main.conf

Rates through rostopic hz 60-70 Hz

edit flag offensive delete link more

Comments

Chad Rockey gravatar image Chad Rockey  ( 2014-04-21 14:09:25 -0600 )edit

Yes, I've seen it. But not in this PPA version for arm-linux :)

tuuzdu gravatar image tuuzdu  ( 2014-04-21 20:07:58 -0600 )edit
0

answered 2013-11-19 03:28:48 -0600

Not sure about the delay, what you could try is running the ps3 controller in wired mode using the normal joy_node as also described here.

As for the "no event" problem: According to the ps3joy documentation there is a command line option "--continuous-output" that should solve that problem.

edit flag offensive delete link more

Comments

I tried connecting it with a wire, which works fast then. It would seem to be somewhere between ps3joy_node.py and receiving the event in joy_node. Any other suggestions to debug this further? And also, the "no event" problem did not occur when wired, but that was expected.

Hansg91 gravatar image Hansg91  ( 2013-11-19 03:54:16 -0600 )edit

Also, I see what you mean in their documentation, but I see no such option in the script itself ... where did it go?

Hansg91 gravatar image Hansg91  ( 2013-11-19 04:04:30 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2013-11-19 02:12:43 -0600

Seen: 2,343 times

Last updated: Apr 21 '14