Page 4 of 5

Re: Raspberry Pi Troubles

Posted: Mon May 20, 2013 3:13 pm
by skube
I finally got it working! By looking in "/tmp/cfheadless.log" I could see the errors.

One was that I had changed the default user from "pi" to "skube" but missed changing both instances of "pi" in the cfheadless shell script.

The other was I got the error message that python2 could not be found. So I edited the file "~/crazyflie-pc-client/bin/cfheadless" and changed the python2 in the first line to python

Thanks again for all the help foosel. I definitely don't understand everything but at least I'm making progress.

Up next, portable power :D

Re: Raspberry Pi Troubles

Posted: Tue May 21, 2013 12:00 pm
by foosel
Just updated the instructions on the Wiki after a pull request of mine got accepted that adds a couple of command line options to the client:

Code: Select all

usage: cfheadless [-h] [-u URI] [-i INPUT] [-d] [-c CONTROLLER]
                  [--controllers]

optional arguments:
  -h, --help            show this help message and exit
  -u URI, --uri URI     URI to use for connection to the Crazyradio dongle,
                        defaults to radio://0/10/250K
  -i INPUT, --input INPUT
                        Input mapping to use for the controller, defaults to
                        PS3_Mode_1
  -d, --debug           Enable debug output
  -c CONTROLLER, --controller CONTROLLER
                        Use controller with specified id, id defaults to 0
  --controllers         Only display available controllers and exit
Should make installation more user friendly, no need to edit the source anymore.

Re: Raspberry Pi Troubles

Posted: Tue May 21, 2013 1:09 pm
by marcus
foosel wrote:Should make installation more user friendly, no need to edit the source anymore.
Nice work! I still haven't had time to look anymore at removing the QT dependency and fixing the "exiting" issue... :( At some point I'll get around to it.

Re: Raspberry Pi Troubles

Posted: Sun Jun 02, 2013 2:38 am
by Smitty79
Hi all,

So I get my Raspberry Pi to work with the help of my brother. But can't seem to get any YAW control. I'm using xbox wireless controller for windows.

using xbox_mode1 and can use throttle/pitch/thrust to fly but no Yaw.

Any suggestions?????

UPDATE: I was flying the crazyflie without yaw control and just started to push some of the unused buttons on my controller and I got yaw control with my right throttle control but in no way controllable.

Re: Raspberry Pi Troubles

Posted: Sun Jun 02, 2013 2:02 pm
by foosel
I didn't bother trying the included input mappings actually, but created my own by launching the regular client once (via VNC), using the "Configure Device Mapping" dialog, and then using the resulting json file in the headless client and be happy with it. If you want to give the one I use a try (have a wireless XBOX 360 for Windows controller myself), take a look here
foosel wrote:Mapping is as follows:
  • Left analog stick: pitch, roll
  • Right analog stick: yaw
  • Right analog trigger (shoulder button): thrust
  • Button pad: trimming for pitch and roll
  • Start: kill switch (not tested yet)
  • Back: exit app (not tested yet)

Re: Raspberry Pi Troubles

Posted: Thu Jun 06, 2013 9:58 pm
by Smitty79
foosel wrote:I didn't bother trying the included input mappings actually, but created my own by launching the regular client once (via VNC), using the "Configure Device Mapping" dialog, and then using the resulting json file in the headless client and be happy with it. If you want to give the one I use a try (have a wireless XBOX 360 for Windows controller myself), take a look here


Thanks foosel, worked like a charm.

Re: Raspberry Pi Troubles

Posted: Fri Jun 21, 2013 1:24 am
by SkyyPunk
Having some troubles with the udev stuff. The rules are working but I am getting this error when I plug in either the CR or 360 controller (with respective file being complained about):
Jun 20 21:18:26 raspi udevd[2346]: failed to execute '/root/bin/cfheadless' '/root/bin/cfheadless': No such file or directory
Image

As you can see in the image the files are definitely there, were added as root, and have execute permission. Any ideas?

Edit: I also made sure to go through the udev permission instructions. I tried the initial way (plugdev part of pi user) as well as appending plugdev being a part of root

Edit2: To be sure I got it in the right place I also copied cfheadless and xbox360 to /root/bin/ (wasn't 100% sure where i was in ssh), /bin/,/stuff/ (created a new folder, updated udev rule), all have the same error just pointed at the different directory :(

Re: Raspberry Pi Troubles

Posted: Fri Jun 21, 2013 5:57 am
by foosel
Have you made cfheadless and xbox360 executable via chmod a+x?

Never mind, you have according to the screenshot. What does happen when you call /root/bin/cfheadless directly yourself?

Re: Raspberry Pi Troubles

Posted: Fri Jun 21, 2013 1:57 pm
by SkyyPunk
foosel wrote:Never mind, you have according to the screenshot. What does happen when you call /root/bin/cfheadless directly yourself?
root@raspi:~# /root/bin/cfheadless
-bash: /root/bin/cfheadless: /bin/sh^M: bad interpreter: No such file or directory
Bah, turns out because I poked around in the files on my Win7 machine and then transferred it had dos line endings, not unix. Fixed that and it works now! Thanks :D

Re: Raspberry Pi Troubles

Posted: Mon Jul 08, 2013 8:11 pm
by jtang613
Just a note to anyone trying to use a Logitech, Inc. F310 Gamepad. The stock Raspian image does not include the xpad.ko module needed to get this controller working. You can find it pre-compiled here:
http://bucket.changeover.za.net/xpad.ko

Then load it manually using:

Code: Select all

sudo insmod xpad.ko
After that, your gamepad should be available to cfclient.