Ubuntu + PS3 Controller problems

Post here to get support
Post Reply
Camper997
Beginner
Posts: 8
Joined: Thu May 23, 2013 7:05 am

Ubuntu + PS3 Controller problems

Post by Camper997 »

Hi,

I just received my Crazyflie, but since Windows 7 has wrong mappings I got bored pretty quick after flying around only with thrust and roll.

So I installed Ubuntu 13.04 Gnome and all of the necessary packages. I started the cfclient and the PS3 Controller worked immediately. After the fix, for the Crazyradio access rights, i have never received any Signal from the PS3 Controller ever again.
Ubuntu actually recognizes the controller, but the cfclient does not receive anything.

After a lot of searching, i tried to run Ubuntu as a live distribution. There, the controller worked again. I did not change any access rights for the Crazyradio and just ran the cfclient as root. For the first time, i had the full controll over my Crazyflie.

So i decided to reinstall Ubuntu with the given "delete Ubuntu 13.04 and reinstall" option in the Install window.
But without success.

Does anyone have an idea about what my problem is?
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Ubuntu + PS3 Controller problems

Post by marcus »

Hi,

Do you see the PS3 controller in Input device menu? If you run the application as root again it still doesn't work? Do you see any mappings in the Input device menu?

I think that if you run the application as root once then all the configuration files will have the wrong permissions and I'm not sure how the application will handle this. If the files are created with the permissions for only root to read them, then the client will not be able to use the controller since no input mappings will be read.

If it works as root but not as a normal user (after adding the udev rule for Crazyradio) then delete the directory crazyflie-pc-client/conf and it should work again.

/Marcus
Camper997
Beginner
Posts: 8
Joined: Thu May 23, 2013 7:05 am

Re: Ubuntu + PS3 Controller problems

Post by Camper997 »

I am able to see the PS3 controller as Input device, deleted the conf folder and started the cfclient as normal user again. Still i do not get any input from the controller. I am shure that the controller works, since i can use it under Windows (and it works with the playstation).
Camper997
Beginner
Posts: 8
Joined: Thu May 23, 2013 7:05 am

Re: Ubuntu + PS3 Controller problems

Post by Camper997 »

Problems over problems =(

Since i didn't manage to get the crazyflie to fly with my Ubuntu distribution, i tried to fly around with Windows 7 again. I played around at the "configure device mapping" option and accidentaly saved it. Now i can not even fly with my Windows distribution because of this Error message:

Image

It always shows up on start altough i reinstalled the client several times already.

So i tried to get the headless version to my raspberry. There i also do not get any controller input.

Im sitting in my kitchen, helplessly, depressed and kinda disappointed of myself.
Someone has to help me.
foosel
Expert
Posts: 175
Joined: Sat Feb 02, 2013 9:59 pm
Location: Obertshausen, Germany
Contact:

Re: Ubuntu + PS3 Controller problems

Post by foosel »

Camper997 wrote:It always shows up on start altough i reinstalled the client several times already.
Shutdown client, open "%APPDATA%/cfclient" in the explorer, (re)move config.json (alternatively (re)move whole folder), restart client, reconfigure.
So i tried to get the headless version to my raspberry. There i also do not get any controller input.
What does "cfheadless --controllers" say?
Image
Also: AR.Drone 2.0 (RC-enabled thanks to self-soldered MiruMod) and Hubsan X4 H107
Camper997
Beginner
Posts: 8
Joined: Thu May 23, 2013 7:05 am

Re: Ubuntu + PS3 Controller problems

Post by Camper997 »

Okey, i already expected such a folder but did not fint it. Thx.

I think i solved the problem with the PS3 Controller without response.
Since my Playstation is one room above my "flight-terretory" i sometimes realized that it is turned on, which happens when i press the ps-button if the controller is not connected with a usb cable, so i thought "just dont hit the button and it should work".
Since the Playstation was turned on almost every time i entered the room above, i think it tried to communicate with the Playstation rather than using its USB connection.
I got a controlleresponse in the cfclient after i unplugged my Playstation.

It at least worked for me one time. Hopefully, it will work now.
DesTinY
Member
Posts: 97
Joined: Sat Feb 09, 2013 5:18 pm
Location: Bünde, Germany

Re: Ubuntu + PS3 Controller problems

Post by DesTinY »

You can change the MAC Address where the PS3 controller connects to. To a real BT dongle in your PC or to a fake one.
Than you can push the PS button an the PlayStation will not start, until you connect your controller via USB to the PlayStation and pair it to it again.

Here is a Pairing tool for Windows SixaxisPairTool
Or you using the MotioninJoy Driver Tool.
Camper997
Beginner
Posts: 8
Joined: Thu May 23, 2013 7:05 am

Re: Ubuntu + PS3 Controller problems

Post by Camper997 »

But I'm using the Controller via USB, not Bluetooth and I still need to push the PS-Button. Am I doing anything wrong? Btw, I still do not get an input at my Raspberry Pi.

cfheadless --controllers shows the connected PS3 controller with the id 0.
The controller also shows up at the beginning when i run cfheadless. It says it is using the PS3 controller with the id 0.
DesTinY
Member
Posts: 97
Joined: Sat Feb 09, 2013 5:18 pm
Location: Bünde, Germany

Re: Ubuntu + PS3 Controller problems

Post by DesTinY »

I know you are using your controller via USB, but if you push the PS button the controller sends a signal over BT on your PlayStation to turn it on. The only way to stop this is to unplug your PS or you pair the controller to something else.
foosel
Expert
Posts: 175
Joined: Sat Feb 02, 2013 9:59 pm
Location: Obertshausen, Germany
Contact:

Re: Ubuntu + PS3 Controller problems

Post by foosel »

Camper997 wrote:Btw, I still do not get an input at my Raspberry Pi.

cfheadless --controllers shows the connected PS3 controller with the id 0.
The controller also shows up at the beginning when i run cfheadless. It says it is using the PS3 controller with the id 0.
What input mapping are you using?
Image
Also: AR.Drone 2.0 (RC-enabled thanks to self-soldered MiruMod) and Hubsan X4 H107
Post Reply