Automatic geometry fix for multiple drones

Topics related to the Lighthouse positioning system, configuration and use
Post Reply
Leopardopt
Beginner
Posts: 25
Joined: Wed Mar 31, 2021 2:40 am

Automatic geometry fix for multiple drones

Post by Leopardopt »

Hello,

I was just wondering if there is a snippet of code that I could use within the swarmsequence.py which would make all the connected drones fix geometry automatically when running (Is "def wait_for_position_estimator(scf):" within the code what I am looking for?). Until this point, I have been connecting them to the cfclient and managing geometry for stable flights individually if I have changed their positions. I am mostly wondering about what has been done regarding the videos taken with group of 10 drones with lighthouse decks... Have you also used my method to fix the geometry of the drones when moving them to different locations each time?

Sincerely,

Leopardopt
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Automatic geometry fix for multiple drones

Post by kimberly »

Hi!

It is not immediately clear what you mean with geometry fix... are you talking about resetting the state/position estimation?

So technically, if you are flying in a swarm, each crazyflie should have the same position and orientation of the basestations in their system (which we call geometry ourselves), so that the global coordinate system is the same for the swarm. The Kalman estimator within the crazyflie, uses that basestation geometry that is saves within the crazyflie, to estimate it's own position with the Light Sweep measurements that it gets from the sensors
on the lighthouse decks. The wait_for_position_estimator function will just wait for the position estimate of the Crazyflie (based on the lighthouse system) to converge and be stable, which is usually quite quick, but sometimes like for the Loco positioning deck, it might take a little while.

So I don't think it is necessary to reset the kalman filter every time you move to a new location, and I don't think it is wise either... Just once just before take off, but after that you won't need to do anything with the position estimate anymore.

Do have a certain issue that you hope to fix with this? Could you please describe that and perhaps we can discuss what is the right way to solve that?
Leopardopt
Beginner
Posts: 25
Joined: Wed Mar 31, 2021 2:40 am

Re: Automatic geometry fix for multiple drones

Post by Leopardopt »

Hello!

Yes, the stability is my issue which I manually used to set the geometry for each drone from the cfclient on the lighthouse positioning tab. So I would connect each drone separately and reset their position to make them stable based on the flight control view which would otherwise shake all over the place. I believe using that function "reset_estimator(scf)" in the main function would solve the stability issue automatically (for both drones at the same time) with the wait_for_position_estimator included with it. I will test this after I test it again without using that function. I will try to move the same crazyflies around the house and fly them with swarm sequence without turning them off to see if they stay stable.
Sincerely,

Leopardopt
Leopardopt
Beginner
Posts: 25
Joined: Wed Mar 31, 2021 2:40 am

Re: Automatic geometry fix for multiple drones [SOLVED]

Post by Leopardopt »

Hey,

So it turns out that the geometry config that would cause crashes in drones was my fault. I would reset the drones after each flight with Python codes which I guess would need me to reconfigure the geometry again for lighthouse. I tried them without restarting them to fly with code multiple times and they didn’t crash or complain. So this issue is resolved thank you and sorry for the confusion.

Sincerely,

Leopardopt
Post Reply