slim71 / SpartanLIFT

MSc thesis regarding the application of a teleoperated multi-UAV system for cooperative payload transport.
Apache License 2.0
1 stars 1 forks source link

Leader Election #3

Closed slim71 closed 1 year ago

slim71 commented 1 year ago

The leader election algorithm must be coded.

The fleet managed in the project should have a leader (to be chosen in some way) which constitutes the main "entry-point" for all data in the user-fleet interaction (built later on). All other agents will then be followers, receiving commands and directions from the leader node.

Since the aim is to build a distributed system, the leader election should be coded in the same way: when selecting a leader, the overall fleet will cooperatively do it. Due to this requirements, a vote-based algorithm seems to be the way to go.

slim71 commented 1 year ago

After some review, I've found an algorithm that seems promising and easy enough for what I want to achieve: Raft. This is vote-based and has a lot of interesting properties, including the support for maintenance of the network I might add later in the project.

slim71 commented 1 year ago

I might do some minor changes to the "classic" algorithm to adapt it to my needs. Here's one.

Normally, in Raft the agents vote a candidate following a FIFO approach. I'll be using a data-based decision instead. Since a good choice for the leader seems to be based on its thrust, but I also don't want to mix code and hardware too much, I'll take the mass of the candidate (from its model) as base to decide. This, in some way, is indeed linked to the required rotors the copter would have, which in turn would be reflected in their output thrust (thus, the total thrust of the copter).

slim71 commented 1 year ago

Raft implementation completed with commit 8b8322afa654d233ae732fe9803ef4fd4c69cc46. I've done tests with up to three agent. Before closing, I'll try to get more agents involved, carry out more test and maybe add some other enhancements.

slim71 commented 1 year ago

Closing after v0.1.0 release