sending/receiving data from the Python Client

Post here to get support
Post Reply
mistermzx
Beginner
Posts: 5
Joined: Thu Aug 23, 2018 2:19 pm

sending/receiving data from the Python Client

Post by mistermzx »

As part of a research project at the Technical University Berlin, I am currently implementing some nonlinear state estimation algorithms on the Crazyflie 2.0. Although I have modified the firmware, I did not change anything major at the python client.

Sometimes, the desktop GUI behaves very weirdly: I am able to connect to the client, but it seems like it does not receive any data from the Crazyflie, i.e. it does not show my attitude/position estimates as usual.

Especially if I add some compuational expensive stuff to the firmware, this happens. Normally, I can make it work again, by just flashing an older, computational less expensive version on the Crazyflie.

Has someone encountered a similar problem?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: sending/receiving data from the Python Client

Post by arnaud »

We have not seen this exact problem but it is possible that you are taking so much processing time that the connection process takes much more time.

The connection button should say "cancel" while connecting and "Disconnect" when connected, what does it show for you when you have the problem?

The first things to check is if the Crazyflie has calibrated its sensors: the red LED will blink faster to indicate that the sensor have been calibrated and before that the attitude will read 0 which looks like the logging is blocked but it is really the sensor values that are not yet used.

Finally, you could check in the "console" tab the task dump button, this prints the load per tasks. It would be interesting to know how much you are loading the Crazyflie, this way we could simulate it here and maybe exhibit the same bug.
mistermzx
Beginner
Posts: 5
Joined: Thu Aug 23, 2018 2:19 pm

Re: sending/receiving data from the Python Client

Post by mistermzx »

Thank you for your reply, I have tested a few of your things:
1.) The GUI says "Disconnect" on the connection button, but none of the data seems to be transmitted. Sometimes the Crazyflie even restarts itself, when trying to connect (in this case the connection button says "cancel").
2.) Judging from the LED signals, it seems like the sensors are calibrated.
3.) The taks dump says:
SYSLOAD: Task dump
SYSLOAD: Load Stack left Name
SYSLOAD: 0.47 87 Tmr Svc
SYSLOAD: 81.28 127 IDLE
SYSLOAD: 0.0 79 PWRMGNT
SYSLOAD: 0.14 101 CRTP-RX
SYSLOAD: 4.45 179 SENSORS
SYSLOAD: 1.30 59 SYSLINK
SYSLOAD: 10.97 326 STABILIZE
SYSLOAD: 1.33 161 SYSTEM
SYSLOAD: 0.0 111 LOG
SYSLOAD: 0.0 89 MEM
SYSLOAD: 0.01 101 CRTP-TX
SYSLOAD: 0.01 101 PARAM
SYSLOAD: 0.0 117 USBLINK


I am currently having a firmware version with works fine. However, if I add just 1-2 new variables or operations, this problem occurs. It seems like a real-time processing problem. Is there a way to check, how much processing power I am using?
Post Reply