💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
动态配置空间中的规划和重新规划 在动态配置空间中进行规划和重新规划是应对不断变化环境的关键任务。动态配置空间指的是环境中的各种因素和条件处于不断变化的状态,例如移动的障碍物、变化的地形或资源可用性的改变等。 规划阶段涉及在初始状态下确定一条从起始点到目标点的可行路径。这需要对动态配置空间进行分析和建模,以了解不同因素对路径选择的影响。规划算法通常考虑诸如距离、时间、安全性和效率等因素,以生成最优或接近最优的路径。 然而,由于动态配置空间的变化性,初始规划可能很快变得不再适用。这就需要进行重新规划。重新规划是在环境发生变化后,对现有路径进行调整或完全重新生成一条新路径的过程。重新规划的触发因素可以包括新障碍物的出现、目标点的改变或资源的重新分配等。 为了有效地进行规划和重新规划,需要采用能够快速响应变化的算法和技术。这可能包括实时监测环境变化、高效的路径搜索算法和灵活的决策机制。此外,还需要考虑规划和重新规划的计算成本,以确保在动态环境中能够及时做出决策。 总之,在动态配置空间中的规划和重新规划是一个具有挑战性但至关重要的问题。通过采用合适的算法和技术,可以提高系统在动态环境中的适应性和性能,确保能够始终找到可行的路径来实现目标。
📚2 运行结果
主函数部分代码:
clear all; close all;
searchAlgs = {@DStarLite2};
% Make timeTest true to run time tests.
timeTest = false;
repetitions = 50; % number of repeated running times for time measurements.
%% The movement scenario
if timeTest
reps = repetitions;
ax = [];
else
reps = 1;
figure
ax = gca;
end
times = [];
expands = [];
paths = [];
for j = 1:length(searchAlgs)
time = 0;
expand = 0;
path = 0;
for i = 1:reps
grid = complexGrid;
searchAlg = searchAlgs{j};
startC = [];
expandedC = [];
pathL = [];
searchInfo = [];
% move for 3 steps
for x = 1:2
[startC, expandedC, pathL, grid, searchInfo, time0, expanded] = ...
planMove(ax, startC, expandedC, pathL, grid, searchInfo, searchAlg);
time = time + time0;
expand = expand + expanded;
path = path + 1;
end
% the grid is changed so replanning is needed
grid = removeObstacle(grid, [5 6]);
% move for 8 steps
for x = 1:8
[startC, expandedC, pathL, grid, searchInfo, time0, expanded] = ...
planMove(ax, startC, expandedC, pathL, grid, searchInfo, searchAlg);
time = time + time0;
expand = expand + expanded;
path = path + 1;
end
% the grid is changed so replanning is needed
grid = addObstacle(grid, [23 1]);
grid = addObstacle(grid, [23 2]);
% move for 7 steps
for x = 1:7
[startC, expandedC, pathL, grid, searchInfo, time0, expanded] = ...
planMove(ax, startC, expandedC, pathL, grid, searchInfo, searchAlg);
time = time + time0;
expand = expand + expanded;
path = path + 1;
end
% the grid is changed so replanning is needed
grid = removeObstacle(grid, [21 13]);
% move until the goal
while size(searchInfo.path,1) > 1
[startC, expandedC, pathL, grid, searchInfo, time0, expanded] = ...
planMove(ax, startC, expandedC, pathL, grid, searchInfo, searchAlg);
time = time + time0;
expand = expand + expanded;
path = path + 1;
end
end
times = [times time/reps];
expands = [expands expand/reps];
paths = [paths path/reps];
end
🎉3 参考文献
文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。
[1]王修业,周贤,孙芹芹,等.复杂场景下无人机自主路径规划与避障控制:穿越迷宫[J/OL].控制工程,1-10[2024-10-23].https://doi.org/10.14107/j.cnki.kzgc.20240590.
[2]林硕,金恒江,韩忠华,等.随机地图下改进A*路径规划算法研究[J/OL].制造技术与机床,1-9[2024-10-23].http://kns.cnki.net/kcms/detail/11.3398.TH.20241018.1454.026.html.