Task allocation and consensus with groups of cooperating Unmanned Aerial Vehicles