💥1 概述
空中机器人作为近年来新兴的热点得到了广泛的关注。小型空中机器人在没有外界卫星定位信号的前提下的导航是空中机器人的研究内容中比较重要的一个问题,也提出了很多新的导航方法,视觉导航是其中比较重要的一个。
本项目旨在实现多机器人任务分配(MRTA)问题的任务分配算法。
📚2 运行结果
🎉3 参考文献
[1] Chen, Xia, and Yan-zhi Qiao. "Summary of unmanned aerial vehicle task allocation." Journal of Shenyang Aerospace University 33.6 (2016): 1-7.
[2] Wang, Jianping, Yuesheng Gu, and Xiaomin Li. "Multi-robot task allocation based on ant colony algorithm." Journal of Computers 7.9 (2012): 2160-2167.
👨💻4 Matlab代码
主函数部分代码:
clc; clear; %% initialization % Define the position of the robots % % Robot_position=[1,2;1,4;1,6;1,8;1,10]; % UAV_position=[5,7;3,2;7,13;6,9;5,5]; UAV_position = [70,69;89,25;86,45]; % % Define the target positions % Target_position=[3,6;5,4;5,6;5,8;8,6]; Target_position = [80,63;22,49;61,40]; % Random position UAV_number=3; % The number of UAVs task_number=3; % The number of Target positions SizeofMap = [1 100]; size_UAV = 0; size_task = 0; % while (size_UAV<UAV_number && size_task < task_number) % UAV_position = randi(SizeofMap,UAV_number,2); % Target_position = randi(SizeofMap,task_number,2); % % UAV_position = unique(UAV_position,'rows'); % % Target_position = unique(Target_position,'rows'); % size_UAV = size(unique(UAV_position,'rows'),1); % size_task = size(unique(Target_position,'rows'),1); % end % Initial the speed of UAVs UAV_speed=ones(UAV_number,1)*50; %% Construct the cost matrix % while( task_number >= UAV_number) judge = 1; while (isempty(Target_position) == 0) if (judge == 1) Cost=CostMatrixConstruction(UAV_position,Target_position,UAV_number,UAV_speed,task_number); %% Hungarian Algorithm Best_Strategy = HungarianAlgorithm(Cost); % find the allocation method for at that moment Best_Strategy=Best_Strategy(:,1:UAV_number); Best_Strategy = unique(Best_Strategy,'rows'); if (size(Best_Strategy,1)>1) Best_Strategy = Best_Strategy( randi(size(Best_Strategy,1)) ,:); end end