Page 1 of 1

Example script problem

Posted: Thu Apr 16, 2015 8:51 am
by umanueu
Hi all, I'm trying to run the provided example of the crazyflie client. With the XBox 360 Joystick everything works great and the CF flies well (Crazyflie 1.0). Now I want to run the ramp.py example from my linux system, I've installed the dependencies and i run "python2 ramp.py" from terminal (of course inside the example directory). This is the result:

Scanning interfaces for Crazyflies...
Crazyflies found:
radio://0/10/250K
Connecting to radio://0/10/250K

After the last line nothing happens....why???
Thank you

Re: Example script problem

Posted: Fri Apr 17, 2015 12:14 pm
by Slaxx
I had the same problem:
http://forum.bitcraze.se/viewtopic.php?f=5&t=1370

Before the while loop can start, the startup thrust protection must be unlocked:
#Unlock startup thrust protection
self._cf.commander.send_setpoint(0, 0, 0, 0)

I didn't know how to Put it in the Git ;)

Re: Example script problem

Posted: Fri Apr 17, 2015 1:46 pm
by umanueu
Hi,

I tried to insert that line of code, but nothing happens.
The situation is the same as before.

Re: Example script problem

Posted: Fri Apr 17, 2015 2:01 pm
by Slaxx
Ah i just saw you are using the Crazyflie 1.0. Mine worked with the Crazyflie 2.0 so there might be a small difference.

Re: Example script problem

Posted: Fri Apr 17, 2015 2:07 pm
by umanueu
Yes I am!

Thank you anyway!!

Re: Example script problem

Posted: Fri Apr 17, 2015 2:24 pm
by umanueu
The problem is that the connection callback is not called!

Re: Example script problem

Posted: Wed Aug 12, 2015 9:11 pm
by dgellow
Hello, I have the same problem.
When I run

Code: Select all

python2 ramp.py
from within the examples folder I have this output:

Code: Select all

Scanning interfaces for Crazyflies...
Crazyflies found:
radio://0/10/250K
Connecting to radio://0/10/250K
then it is waiting infinitely.

I am running Archlinux, my version of python is the 2.7.10.

Any idea ?

EDIT: I just tried with my raspberry pi, same problem.
EDIT 2: It works on my raspberry pi if I checkout to the branch 2014.01.0 and rerun a sudo sh setup.sh.

Re: Example script problem

Posted: Thu Aug 13, 2015 12:06 pm
by arnaud
Hi,

Usually that happens when the Crazyflie firmware is old, you can try to update it.

To be able to see what is happening you can set the logging threshold from ERROR to DEBUG, you will find the line at the beginning of ramp.py:

Code: Select all

logging.basicConfig(level=logging.DEBUG)
You will then see a lot of what the lib is doing and hopefully why it is getting stuck.

Re: Example script problem

Posted: Thu Aug 20, 2015 11:38 am
by dgellow
Hello arnaud,

Thank you for your reply, I will take some time this week-end to test what you suggest.