Can I stop the sensor when I use it for ten second in flow deck?

Discussions about quadcopters/multi-rotors
arnaud
Bitcraze
Posts: 2391
Joined: Tue Feb 06, 2007 12:36 pm

Re: Can I stop the sensor when I use it for ten second in flow deck?

Post by arnaud »

If you want the Crazyflie stay in the air, you do not want to disable the ToF sensor since by doing so you remove all height sensor input to the kalman filter. It is not possible to just block the last reading: the Crazyflie is not capable of hovering without continuous height sensor reading, there is always errors and drifts in the motor thrust and accelerometer readings that will make the height drift.

So if your goal is to keep height control while disabling the ToF sensor, it is not possible. You need another height sensor, there is a barometer on the Crazyflie but it has never been integrated fully to the estimator, the Kalman filter.

Why do you want to disable the ToF sensor?

If you want to fly at a fixed height, you can use the Python APIs like the motion commander to move the Crazyflie in the horizontal plane only: https://www.bitcraze.io/documentation/t ... ght-script
chengjiahao
Beginner
Posts: 19
Joined: Tue Jul 14, 2020 1:37 pm

Re: Can I stop the sensor when I use it for ten second in flow deck?

Post by chengjiahao »

arnaud wrote: Mon Sep 28, 2020 11:25 am If you want the Crazyflie stay in the air, you do not want to disable the ToF sensor since by doing so you remove all height sensor input to the kalman filter. It is not possible to just block the last reading: the Crazyflie is not capable of hovering without continuous height sensor reading, there is always errors and drifts in the motor thrust and accelerometer readings that will make the height drift.

So if your goal is to keep height control while disabling the ToF sensor, it is not possible. You need another height sensor, there is a barometer on the Crazyflie but it has never been integrated fully to the estimator, the Kalman filter.

Why do you want to disable the ToF sensor?

If you want to fly at a fixed height, you can use the Python APIs like the motion commander to move the Crazyflie in the horizontal plane only: https://www.bitcraze.io/documentation/t ... ght-script
Thank you for the anwser
Now I do some researches about cf with Fpga and based on where my research apply in I can not use the tof when the cf move,because the object below cf will be used as the reference point (0, 0),can not maintain the same height while advancing.So I want to disable the tof.by the way I use the python API too.
I just shutted down the tof when cf hold the poision but it drop directly. so I want to maintain the height when the tof been shutted.
Can I set the reference point (0,0) from the ground to somewhere in the air?
Thank you for the answer again :D
kimberly
Bitcraze
Posts: 700
Joined: Fri Jul 06, 2018 11:13 am

Re: Can I stop the sensor when I use it for ten second in flow deck?

Post by kimberly »

hi,

There seem to be confusion about what you actually want to do, but it seems that you want to fly over different height of objects with the flowdeck but still maintain the same height, if I'm correct?

Shutting down the TOF sensor is not the answer for that I'm afraid, as arnaud said already before. The TOF sensor is the only sensor that provides a good height measurement on the flowdeck and the barometer is not enough. Shutting it off will obviously, as you already saw yourself, make the crazyflie fall, since it "thinks" it's higher than it supposed to be.

There is currently a ticket open about this issue on the crazyflie firmware repo: https://github.com/bitcraze/crazyflie-f ... issues/540
chengjiahao
Beginner
Posts: 19
Joined: Tue Jul 14, 2020 1:37 pm

Re: Can I stop the sensor when I use it for ten second in flow deck?

Post by chengjiahao »

kimberly wrote: Tue Sep 29, 2020 8:05 am hi,

There seem to be confusion about what you actually want to do, but it seems that you want to fly over different height of objects with the flowdeck but still maintain the same height, if I'm correct?

Shutting down the TOF sensor is not the answer for that I'm afraid, as arnaud said already before. The TOF sensor is the only sensor that provides a good height measurement on the flowdeck and the barometer is not enough. Shutting it off will obviously, as you already saw yourself, make the crazyflie fall, since it "thinks" it's higher than it supposed to be.

There is currently a ticket open about this issue on the crazyflie firmware repo: https://github.com/bitcraze/crazyflie-f ... issues/540
Thank you for your help.
I already saw this repo,and the result is can not acheive this goal.
so how about I set the reference point (0,0) from ground to the air where cf already been there.If it can be done maybe I can slove the problem.
can I do this? And I notice the firmware where can adjust the reference point is baroReferenceHeight in estimator_kalman.c .
by the way what is the asl of crazyflie?
Thank you very much for long time helps
chengjiahao
Beginner
Posts: 19
Joined: Tue Jul 14, 2020 1:37 pm

Re: Can I stop the sensor when I use it for ten second in flow deck?

Post by chengjiahao »

kimberly wrote: Tue Sep 29, 2020 8:05 am hi,

There seem to be confusion about what you actually want to do, but it seems that you want to fly over different height of objects with the flowdeck but still maintain the same height, if I'm correct?

Shutting down the TOF sensor is not the answer for that I'm afraid, as arnaud said already before. The TOF sensor is the only sensor that provides a good height measurement on the flowdeck and the barometer is not enough. Shutting it off will obviously, as you already saw yourself, make the crazyflie fall, since it "thinks" it's higher than it supposed to be.

There is currently a ticket open about this issue on the crazyflie firmware repo: https://github.com/bitcraze/crazyflie-f ... issues/540
And I have another question.
I know have a little possible of let cf hover without any external sensors like flow deck v2.
But I always want know if have not some methods to let cf hover at some places without any external sensors? just modify the code in firmware can get that goal? don’t need to be particularly precise in terms of altitude, as long as you can stay in the air.
kimberly
Bitcraze
Posts: 700
Joined: Fri Jul 06, 2018 11:13 am

Re: Can I stop the sensor when I use it for ten second in flow deck?

Post by kimberly »

The ticket I mentioned in my last post also include suggestions on how to achieve this, so I do suggest you to look in the discussion of the ticket.

About your first question: To set the reference point to (0,0) on the ground will not work. As soon as you fly over an object, the TOF sensor will sense the object as 'the ground' and then 'thinks' it is flying lower than it's given set-point. That is why it will jump up. You could look at using the barometer as you said (since that is a more absolute height measurement) but it is a much worse height estimate too. Another option is to implement some kind of 'step detection' in the TOF sensor, of where you will add the step to the TOF measurement. The object needs to have a very sharp transition from ground to object (like a cube or table). These options have not been implemented and it is something you will need to experiment and implement yourself.

About your second question: It is very difficult to make the Crazyflie hover on only it's internal sensors alone. Even a perfect hover is difficult with the flowdeck, since that is measuring motion with is closest to velocity. Intergrating velocity to position always involves errors and if you would let the crazyflie hover for the duration of its battery, it probably would have drifted 30 cm or so (really depends on the texture on the ground though, more texture is better). If you would remove the Flowdeck, the only thing that the crazyflie would have are its accelerometers, which will need to be integrated twice in order to get position and introduce much much larger errors (exceptionally larger). You might get away with having perfect propellers and motors, have the roll and pitch be on zero, but eventually it will always glide away due to air disturbances like air conditioning or just people moving close to it (that's how little it takes). Since the crazyflie is not able to detect its position properly, it is unable to compensate for itself.
Post Reply