flow and lps

Discussions about all things Bitcraze
Post Reply
arix
Member
Posts: 47
Joined: Fri Sep 01, 2017 1:45 am

flow and lps

Post by arix »

Hello!
I have both use flow deck and lps deck. I have made some test, I found if i want to use flow my commander must have (vx vy ).
1、i use motion_commander up and then use turn_right . the cf fly and fly circle, then it auto land , why i don't use any land commander, it auto land.
2、I want to use lps with flow , but position_setpoint only have (x y z yaw), I want to know flow can work ? my new lps node is making so i don't test it . or you can give me some advice combine lps with flow . my old lps system can get good position data but can't fly good .
3、I want to use commander_high_level. can you give me some advice to change python-lib . I know how to change port and commander. but how to make controller_mellinger to be used by python-lib.

Thank you!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: flow and lps

Post by arnaud »

Hi,
1- The motion commander will automatically land the Crazyflie when your code leaves the scope where the motion commander object exists (ie, https://github.com/bitcraze/crazyflie-l ... emo.py#L98). Is that what you are observing?

2- When setting up your Crazyflie with both a flow and an LPS deck, both information from the flow and from the LPS will be used by the estimator to estimate the Crazyflie position and velocity. You can then send position setpoints and the Crazyflie should hover in a very stable manner with good absolute position accuracy, hence combining the characteristic of the flow and the LPS. Please note that using both flow and LPS still requires some tunning: when it works it works really well but I have observed cases where a too large position error was causing crashes.

3- I have not started digging in that personally, I would suggest looking at the crazyswarm code and porting the relevant part to the Python lib.
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: flow and lps

Post by whoenig »

Just to add to 3:
* The relevant CRTP packets are defined here: https://github.com/whoenig/crazyflie_cp ... #L672-L851. It should be pretty straight forward to implement them in the official python-lib.
* I have tested the flow deck with the new high-level commands and it does work pretty well (assuming that you fly over some structured surface and not too high).
* If you consider using ROS, there is also a Python API that can use the new high-level mode. You can find an example here: https://github.com/whoenig/crazyflie_ro ... h_level.py
* You will need to compile your firmware with controller=MELLINGER.

I am sorry that there is not much documentation as of now for the new mode. It is still in development and testing.
arix
Member
Posts: 47
Joined: Fri Sep 01, 2017 1:45 am

Re: flow and lps

Post by arix »

Thank you for help !
Post Reply