How to work with LPS + Flow Deck ?

All discussions related to the Loco Positioning system
Post Reply
aybarskizilay
Beginner
Posts: 11
Joined: Tue Oct 16, 2018 2:03 pm

How to work with LPS + Flow Deck ?

Post by aybarskizilay » Wed Oct 24, 2018 8:09 am

Hello everyone,

I am planning to use Flow Deck and LPS for obtaning the more stable fly.
However I have several questions regarding that. As a note, my items are not here yet; so I wasn't able to run the code and see the behaviour. that's why, I am asking those question :)
I know that MotionCommander and Commander lib are designed for flow deck and LPS respectively.
I want to use LPS for navigating CF in 3D with following code:

Code: Select all

 def send_position_setpoint(self, x, y, z, yaw):
My first question is:
  • How can I make flow deck as a supporting system to LPS, especially for calculating the altitude? I mean, just add the hardware to CF, then CF and LPS will automatically use both system for flying? or I need to do something extra in firmware or pyhton code?
My second question is:
  • There is a "velocity" attribute in MotionCommander lib, but I didn't see any velocity attribute in Commander lib, which I am going to use for navigating the CF with LPS. Is there any deafult flying speed in LPS system?
Thank you in advance

Best Regards
Aybars

arnaud
Bitcraze
Posts: 1790
Joined: Tue Feb 06, 2007 12:36 pm

Re: How to work with LPS + Flow Deck ?

Post by arnaud » Thu Oct 25, 2018 11:33 am

Hi,
  • It will work automatically: when the flow deck is detected the measurement are pushed to the same Kalman filter that receives the LPS measurements. This means that both sensor are used and the positioning become much more precise.
  • The PID controller allows to either control velocity or control position. When controlling position the velocity is limited to 1m/s by defaut. The max velocity for pid is accessible as a parameter so you can modify it.
We have had mixed result with flow and LPS though, it will usually fly very well until is 'snaps' and crash. This might be caused by the data from the flow being trusted too much in the kalman filter when the flow deck is not tracking correctly. It is possible to set the parameter "motion.disable" to 1 in order to disable the flow sensor, then you will still use the ranging sensor and enjoy a very stable Z with more noisy X,Y, but much less risk of sudden crash.

aybarskizilay
Beginner
Posts: 11
Joined: Tue Oct 16, 2018 2:03 pm

Re: How to work with LPS + Flow Deck ?

Post by aybarskizilay » Fri Oct 26, 2018 11:45 am

Hi Arnaud,

Thank you for your reply.
I think 1m/s would be just fine for my case.

The parameter that you have mentioned, "motion.disable", is it in fimware or I can change it within the pyhton code ?
What do you mean by more noisy X-Y ? more than 10cm deviation. As I remember, LOCO system can output with 10cm accuracy.

Best Regards

Aybars

arnaud
Bitcraze
Posts: 1790
Joined: Tue Feb 06, 2007 12:36 pm

Re: How to work with LPS + Flow Deck ?

Post by arnaud » Wed Oct 31, 2018 9:30 am

The parameter can be set from python using the parameter API. It would look like that:

Code: Select all

cf.param.set_value('motion.disable', '1')

As for the noise, by disabling the flow you will get a very stable height thanks to the distance sensor, but the X-Y position will still be estimated by the LPS alone. That said, by stabilizing Z you normally also help a lot the X-Y estimation.

As for using the flow with LPS, we have tested a bit more lately and I am now pretty sure the problem comes from pushing bad flow readings in the EKF. If we could estimate the quality of the flow readings and discard outliers and/or set the standard deviation accordingly when pushing the readings in the EKF we could most likely make the combo flow/lps much more stable.

Post Reply