Page 1 of 2

Get raw measurement from the flow deck V2

Posted: Sat Feb 08, 2020 5:32 pm
by emoyers
Hello I'm trying to get the raw measurement from the flow deck v2 but I was not able to do it. Does anyone can point what is the way to do in using crazyflie-lib-python repository? Currently, I'm using the example mutiranger_psuh.py in the same repo, in that I can get the measurements from the multiranger deck but not from the flow deck. Any help will be appreciated.

Re: Get raw measurement from the flow deck V2

Posted: Mon Feb 10, 2020 10:24 am
by tobias
The raw flow measurements you can get from the motion logging variables located here. motion.deltaX and moton.deltaY is the raw flow outputs.

Re: Get raw measurement from the flow deck V2

Posted: Tue Feb 18, 2020 2:05 am
by emoyers
how can I access this raw measurement if I'm using the crazyflie-lib-python?

Re: Get raw measurement from the flow deck V2

Posted: Tue Feb 18, 2020 7:40 am
by kristoffer
There are two examples in the python lib repository (examples/basiclogSync.py and examples/basiclog.py) that is a good starting point.

Re: Get raw measurement from the flow deck V2

Posted: Mon Feb 24, 2020 2:22 am
by emoyers
hello @kristoffer, I don't see in any of those files raw measurement from the flow deck, can you expand more on why you recommend me those files for reading the flow deck measuremets?

Re: Get raw measurement from the flow deck V2

Posted: Mon Feb 24, 2020 7:50 am
by kimberly
Hi!

So you need to also look at Tobias' answer as well. The logging names for the values you are looking for are motion.deltaX and motion.deltaY, which you will need to retrieve by the scripts that Kristoffer is referring too. Right now, those scripts show different logging variables as an example, so you will need to replace those with the ones you want to read out.

This is the way how to read out logging variables from the crazyflie python lib if you do not want to use the cfclient to do this. Just give it a try and let us know if you have managed to do this.

Re: Get raw measurement from the flow deck V2

Posted: Wed Mar 11, 2020 2:49 am
by emoyers
Thanks for the reply @kimberly, @kristoffer and @tobias :) . I know understood. Another question, with which variable or variable I can get the actual distance to the ground or at least to the closest object down the CF instead of just the delta? or do I need to use the deltas to calculate it myself?

Re: Get raw measurement from the flow deck V2

Posted: Wed Mar 11, 2020 11:53 am
by tobias
The distance from the laser ranger sensor, VL53L01, can be retrieved from the range.zrange logging variable.

Re: Get raw measurement from the flow deck V2

Posted: Thu Mar 12, 2020 1:14 am
by emoyers
Ok. to read the value, do I need to use " cflib.crazyflie.log import LogConfig" or can I use "cflib.utils.multiranger import Multiranger" ?

Re: Get raw measurement from the flow deck V2

Posted: Thu Mar 12, 2020 9:25 am
by tobias
You could use the Multiranger class but it would be a bit inefficient as it will also start logging 5 other none present sensors that would just give 0. Perhaps use the Multiranger class as inspiration to setup you own log config or check the basiclog.py, basiclogSync.py examples.