Tumble Detection Failing

Firmware/software/electronics/mechanics
Post Reply
bma
Beginner
Posts: 12
Joined: Fri Jun 19, 2020 9:45 pm

Tumble Detection Failing

Post by bma »

Hi all,

I recently ran into an issue where the tumble detection does not engage, and the motors continue to spin even after the crazyflie flips over. Note that I am using a smaller 150mah battery, and a controller added to the firmware. This only happens when the crazyflie takes off (the thrust is almost maxed out on all the motors). I also have a second tumble detection set up that sends a stop command to the controller if it detects that the crazyflie is flipped (I am logging the state estimates). I suspect something might be going wrong with the onboard state estimation.

Any ideas what could be going on? I'm afraid to recreate the situation without damaging the crazyflie. Thanks!
bma
Beginner
Posts: 12
Joined: Fri Jun 19, 2020 9:45 pm

Re: Tumble Detection Failing

Post by bma »

Update: I think this happens when the battery voltage drops too low, as I'm noticing a solid red light when this behavior occurs. Maybe there is not enough power for the IMU to work accurately, therefore stopping the tumble detection from working.

I noticed their are timeouts for shutting the motors off in case the voltage drops too low (https://github.com/bitcraze/crazyflie-f ... rface/pm.h), but this doesn't seem to be working either, Shouldn't' this be engaged, removing the need for tumble detection when voltage drops too low? :?:

Also, I noticed this behavior with the stock battery as well. It seems to occur more frequently on the 150mah battery since the voltage drops much faster.
kristoffer
Bitcraze
Posts: 322
Joined: Tue Jun 30, 2015 7:47 am

Re: Tumble Detection Failing

Post by kristoffer »

Hi!

I'm not sure about the IMU theory, if the IMU is not working the Crazyflie would not be able to fly at all.
But I also have a vague feeling that the tumble detection is not always working as expected. Maybe there is a bug lurking somewhere?

The code in the situation awareness module is pretty straight forward, but I think there is some special handling related to the hight level commander. Have you been using the high level commander when you have seen this issue?
bma
Beginner
Posts: 12
Joined: Fri Jun 19, 2020 9:45 pm

Re: Tumble Detection Failing

Post by bma »

I have been using the low level commander with a custom setpoint and custom controller. Any idea what kind of bug could cause this? I'm not sure where to start looking. :o

Also, the IMU does work when the crazyflies motors are first engaged. While observing the battery voltage in the cfclient, I noticed the voltage was around 3.8 prior to take off (with IMU working), but dropped to almost 2.0 when the motors were engaged. Could that possible affect the sensor reading?
kristoffer
Bitcraze
Posts: 322
Joined: Tue Jun 30, 2015 7:47 am

Re: Tumble Detection Failing

Post by kristoffer »

Any idea what kind of bug could cause this? I'm not sure where to start looking
Unfortunately I don't really have a good idea what the problem might be. If you want to try your luck, it all starts in the situation awareness module around here https://github.com/bitcraze/crazyflie-f ... #L138-L161
Post Reply