Hello all,
I tried to configure my Rasperry Pi for flying with the Crazyfly, but the auto-plug-in-start of the headless client doesn't work... (xboxdrv works perfektly while plugging in the controller).
While plugging in the crazyradio, I'am getting this message in /var/log/syslog:
Jul 8 20:43:01 RaspPi-Jonas kernel: [ 95.752615] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
Jul 8 20:43:01 RaspPi-Jonas kernel: [ 95.856406] usb 1-1.2: New USB device found, idVendor=1915, idProduct=7777
Jul 8 20:43:01 RaspPi-Jonas kernel: [ 95.856435] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=29
Jul 8 20:43:01 RaspPi-Jonas kernel: [ 95.856451] usb 1-1.2: Product: Crazyradio USB Dongle
Jul 8 20:43:01 RaspPi-Jonas kernel: [ 95.856465] usb 1-1.2: Manufacturer: Bitcraze
Jul 8 20:43:01 RaspPi-Jonas kernel: [ 95.856478] usb 1-1.2: SerialNumber: 189751B3D7
Jul 8 20:43:01 RaspPi-Jonas udevd[2191]: failed to execute '/root/bin/cfheadless' '/root/bin/cfheadless': Exec format error
And if I start the shell script /root/bin/cfheadless manually (with sudo) while the crazyradio is plugged in, I get this message: "cfheadless: Kein Prozess gefunden" (translated: no process found).
But with "python ~/crazyflie-pc-client/bin/cfheadless" all things work well...
Raspberry Pi Troubles
Re: Raspberry Pi Troubles
Did you set the executable flag for the file?
The reason for the error message when launched manually is probably that you end up in the else branch and it's trying to kill the process, but it's not found anymore.
Code: Select all
chmod +x /root/bin/cfheadless
Re: Raspberry Pi Troubles
Yes, I already set the executable flag for the file. I think, otherwise it would not be possible to start the script manually...
Re: Raspberry Pi Troubles
Could you please post the first line of your /root/bin/cfheadless file?
Also: AR.Drone 2.0 (RC-enabled thanks to self-soldered MiruMod) and Hubsan X4 H107
Re: Raspberry Pi Troubles
Hi,
I tried the RPi Config and it works well. There is only one question:
How do I program to fly with XBOX Controller Mode 2 ?
Thanks for help.
I tried the RPi Config and it works well. There is only one question:
How do I program to fly with XBOX Controller Mode 2 ?
Thanks for help.
Re: Raspberry Pi Troubles
Now ist works!
I copied my WinPC Config File onto the PRi (/home/bitcraze/projects/crazyflie-pc-client/bin), here it is:
The next step is to make a Shutdown-Botton for my Raspberri Pi.
I copied my WinPC Config File onto the PRi (/home/bitcraze/projects/crazyflie-pc-client/bin), here it is:
Code: Select all
{
"inputconfig": {
"inputdevice": {
"updateperiod": 10,
"name": "XBOX_ Mode_2",
"axis": [
{
"scale": -1.0,
"type": "Input.AXIS",
"name": "thrust",
"key": "thrust",
"id": 1
},
{
"scale": 1.0,
"type": "Input.AXIS",
"name": "yaw",
"key": "yaw",
"id": 0
},
{
"scale": 1.0,
"type": "Input.AXIS",
"name": "roll",
"key": "roll",
"id": 4
},
{
"scale": -1.0,
"type": "Input.AXIS",
"name": "pitch",
"key": "pitch",
"id": 3
},
{
"scale": -1.0,
"type": "Input.BUTTON",
"id": 0,
"key": "pitchcal",
"name": "pitchNeg"
},
{
"scale": 1.0,
"type": "Input.BUTTON",
"id": 3,
"key": "pitchcal",
"name": "pitchPos"
},
{
"scale": 1.0,
"type": "Input.BUTTON",
"id": 7,
"key": "estop",
"name": "killswitch"
},
{
"scale": -1.0,
"type": "Input.BUTTON",
"id": 2,
"key": "rollcal",
"name": "rollNeg"
},
{
"scale": 1.0,
"type": "Input.BUTTON",
"id": 1,
"key": "rollcal",
"name": "rollPos"
},
{
"scale": 1.0,
"type": "Input.BUTTON",
"id": 6,
"key": "exit",
"name": "exitapp"
}
]
}
}
}
Re: Raspberry Pi Troubles
Hey guys,
I've been working on setting up a base station with the raspberry pi, based on all the instructions posted by the community on the website, and this forum. I've successfully been running off battery power, and am using peripherals using a hub. I think I am very close to being able to fly.
I am encountering a problem when I start up the software. Here is the status script that prints to the raspberry pi screen:
I look forward to reading anyone's suggestions, in helping to identify the problem and the solution.
I've been working on setting up a base station with the raspberry pi, based on all the instructions posted by the community on the website, and this forum. I've successfully been running off battery power, and am using peripherals using a hub. I think I am very close to being able to fly.
I am encountering a problem when I start up the software. Here is the status script that prints to the raspberry pi screen:
- pi@raspberrypi ~ $ python ~/crazyflie-pc-client/bin/cfheadless -i PS_#1 -c 0
Info: Using config path: /home/pi/crazyflie-pc-client/lib/../conf
Info: sys.path= ['/home/pi/crazyflie-pc-client/lib', '/home/pi/crazyflie-pc-client/lib/../conf', '/home/pi/crazyflie-pc-client/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/pymodules/python2.7']
Disabling standard output for libraries!
INFO:cfclient.utils.config:Dist config read from /home/pi/crazyflie-pc-client/lib/cfclient/configs/config.json
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_2.json]
INFO:cfclient.utils.config_manager:Parsing [xbox360_mode1.json]
INFO:cfclient.utils.config_manager:Parsing [PS_#1.json]
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_3.json]
INFO:cfclient.utils.config_manager:Parsing [Generic_OS_X.json]
INFO:cfclient.utils.config_manager:Parsing [xbox360_mode1_linux.json]
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_1.json]
Will use [Twin USB Joystick] for input
INFO:cflib.crazyflie:Callback->Connection initialized[radio://0/10/250K]
INFO:cflib.crazyflie:We are connected[radio://0/10/250K], request connection setup
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [5]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [5]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [5]
INFO:cflib.crazyflie:Callback->Connected to [radio://0/10/250K]
ERROR:cflib.crazyflie.toc:Got packet that was not on TOC channel, TOC fetch will probably not succeed
INFO:cflib.crazyflie.toc:TOC for port [5] found in cache
INFO:cflib.crazyflie:Log TOC finished updating
INFO:cflib.crazyflie.toc:TOC for port [2] found in cache
INFO:cflib.crazyflie:Param TOC finished updating
INFO:cflib.crazyflie:Callback->Connection setup finished [radio://0/10/250K]
I look forward to reading anyone's suggestions, in helping to identify the problem and the solution.