Formation Control of Crazyfile using LPS

All discussions related to the Loco Positioning system
Post Reply
yuhsiang
Beginner
Posts: 22
Joined: Wed Mar 03, 2021 11:53 am

Formation Control of Crazyfile using LPS

Post by yuhsiang »

Hi,

I am planning to do formation control of Crazyfile using LPS. The basic idea is to update the commander setpoint (either position or velocity) of each Crazyfile with a high-level formation controller. The high-level formation controller will take the position of the Crazyfile as the input.
Therefore, my question is if it is possible to access the position of each Crazyfile simultaneously with the LPS and Crazyradio so it can be used to update the commander setpoint of each Crazyfile at runtime.

Thank you in advance.

Yu-Hsiang
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Formation Control of Crazyfile using LPS

Post by whoenig »

Software: The position information for LPS is only known onboard the drone. However, you can easily setup a logging configuration that streams that information back to your PC using the Crazyradio. Then, you can process this information for all drones, and send commander setpoints back over the radio. Depending on the update frequency you need, you should plan to use only 2-4 CFs per Crazyradio in that mode.

Hardware: Keep in mind that the LPS accuracy is only +/-10cm, so flying a swarm just based on LPS will require fairly large safety distances to avoid collisions. You can get better results if you combine LPS and flowdeck, and even better results if you use the LightHouse positioning system.
yuhsiang
Beginner
Posts: 22
Joined: Wed Mar 03, 2021 11:53 am

Re: Formation Control of Crazyfile using LPS

Post by yuhsiang »

Hi whoenig,

Thank you for your reply.

I understand the idea of creating the logging configuration to send back the position data. However, I have noticed that the maximum byte length for each logging packet is 26 bytes which allows 6 floats and 1 unit16_t. Due to this limitation, I will need to create a logging configuration for each Crazyfile's position data. In that case, is it possible to synchronize all the logging configuration, in other words, sample the position data of each Crazyfile simultaneously?

Yu-Hsiang
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Formation Control of Crazyfile using LPS

Post by whoenig »

You can have multiple logging configurations per quadrotor. Each logging configuration packet will be timestamped with the local clock. The 26 bytes are sufficient to get the current state estimate of the quadrotor within a single, timestamped, packet.

For a swarm, you would configure each quadrotor individually to send you the data you want. For time synchronization, you can synchronize the clocks with about 10ms accuracy using broadcast messages (for the latter, I don't think there is an official example yet, but I have done so in prior research.) Unless you are doing research in high-speed flight, this sort of time synchronization is usually fine, since it is not visible to the human eye, and the quadrotors can't move too far within a few milliseconds.
Post Reply