• 基于未知环境下四旋飞行器运动规划应用研究(Matlab代码实现)


     👨‍🎓个人主页:研学社的博客 

    💥💥💞💞欢迎来到本博客❤️❤️💥💥

    🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

    ⛳️座右铭:行百里者,半于九十。

    📋📋📋本文目录如下:🎁🎁🎁

    目录

    💥1 概述

    📚2 运行结果

    🌈3 Matlab代码实现

    🎉4 参考文献


    💥1 概述

    无人机现在利用最佳搜索策略,使用PRISM模型检查器生成,以寻找目标。本文设计并编写了一种对抗性模式搜索算法来比较性能。

    四旋翼无人机由于具有可悬停,可垂直起降,在设计速度范围内向任意方向飞行的运动特点,以及结构简单,构造容易,成本低廉等特点,被广泛运用于巡检、救灾、农业植保等各个领域。对于四旋翼无人机来说,运动规划就是在给定的障碍环境中,从无人机当前的未知到给定摘要未知找到一条安全的无人机可以执行的轨迹,而在未知环境下进行运动规划是无人机执行复杂任务的关键能力。本文以此为应用研究背景,从软件系统设计层面,本文的研究主要包括三个关键方面:路径规划、轨迹规划以及在未知环境下整个运动规划系统控制问题。本文首先针对四旋翼无人机的硬件平台及飞行系统,对未知环境下的运动规划应用进行了分析,将整个应用分成了:地图表示、运动规划、安全检测、状态管理四个关键组成。确立了以运动规划问题为主要研究对象,并结合运动规划问题的评价标准,使用路径规划加轨迹规划来解决运动规划问题。对于路径规划问题,本文采用确定性算法,采用路径搜索的思想在真实环境下规划出一条最短路径。使用状态栅格算法,基于四旋翼无人机的运动学,通过离散控制空间的方法构建搜索图并使用图搜素算法找到最优路径,并对状态栅格算法进行了改进,通过解决最优边界值问题基于运动学重新设计了算法的启发式函数,提高了图搜素过程的速度,并通过仿真实验对结果进行了验证。

    📚2 运行结果

    动态视频,这里就放几张运行结果图: 

     

    1. Transporting decreased battery by 8 ; Coordinates = (2,2); New battery value: 8
    2. Time 125.74 s: Identifying target
    3. Time 125.75 s: Moving above target
    4. Above target
    5. Time 130.56 s: Descending to grab
    6. Target within reach
    7. Time 133.59 s: Grabbing target
    8. Grabbed successfully
    9. Time 133.60 s: Ascending to transport
    10. At transport height
    11. Time 136.93 s: Transporting target
    12. Above drop zone
    13. Time 141.12 s: Descending to deposit
    14. Releasing grabber
    15. Time 144.44 s: Dropping target
    16. All targets deposited
    17. Time 144.45 s: Landing
    18. Landed
    19. Time 146.77 s: Agent idle
    20. MISSION COMPLETE
    21. Simulation complete
    22. Time taken: 31.02 s
    23. +- VISUALISATIONS -------------------------
    24. |
    25. | 1: Animate agents
    26. | 2: Compare states
    27. | 3: Compare inputs
    28. | 0: Exit
    29. | x: Exit and close all windows
    30. |
    31. | Select visualisation: 2
    32. |
    33. +------------------------------------------
    34. Generating state comparison...
    35. +- AGENT STATE COMPARISON -----------------
    36. |
    37. | Select property to compare:
    38. |
    39. | Individual rigid-body states:
    40. | x, y, z, phi, theta, psi,
    41. | xdot, ydot, zdot, p, q, r,
    42. |
    43. | Grabber arm position:
    44. | xG, yG, zG, xGdot, yGdot, zGdot
    45. |
    46. | Combined rigid-body states:
    47. | position, attitude, velocity, ang rates,
    48. | Gposition, Gvelocity
    49. |
    50. | Camera gimbal states:
    51. | phiG, thetaG
    52. |
    53. | Other properties:
    54. | battery, airspeed
    55. |
    56. | Selection: battery
    57. |
    58. | Comparing results for battery...
    59. |
    60. +------------------------------------------
    61. Returning to main menu...
    62. +- VISUALISATIONS -------------------------
    63. |
    64. | 1: Animate agents
    65. | 2: Compare states
    66. | 3: Compare inputs
    67. | 0: Exit
    68. | x: Exit and close all windows
    69. |
    70. | Select visualisation: 1
    71. |
    72. +------------------------------------------
    73. Animating agents...

    Transporting decreased battery by 8 ; Coordinates = (2,2); New battery value: 8 
    Time 125.74 s: Identifying target
    Time 125.75 s: Moving above target
        Above target
    Time 130.56 s: Descending to grab
        Target within reach
    Time 133.59 s: Grabbing target
        Grabbed successfully
    Time 133.60 s: Ascending to transport
        At transport height
    Time 136.93 s: Transporting target
        Above drop zone
    Time 141.12 s: Descending to deposit
        Releasing grabber
    Time 144.44 s: Dropping target
        All targets deposited
    Time 144.45 s: Landing
        Landed
    Time 146.77 s: Agent idle
        MISSION COMPLETE

    Simulation complete
    Time taken: 31.02 s


    +- VISUALISATIONS -------------------------
    |
    |  1: Animate agents  
    |  2: Compare states  
    |  3: Compare inputs  
    |  0: Exit  
    |  x: Exit and close all windows  
    |
    |  Select visualisation: 2
    |
    +------------------------------------------

    Generating state comparison...


    +- AGENT STATE COMPARISON -----------------
    |
    |  Select property to compare:  
    |    
    |  Individual rigid-body states:  
    |  x, y, z, phi, theta, psi,  
    |  xdot, ydot, zdot, p, q, r,  
    |    
    |  Grabber arm position:  
    |  xG, yG, zG, xGdot, yGdot, zGdot  
    |    
    |  Combined rigid-body states:  
    |  position, attitude, velocity, ang rates,  
    |  Gposition, Gvelocity  
    |    
    |  Camera gimbal states:  
    |  phiG, thetaG  
    |    
    |  Other properties:  
    |  battery, airspeed  
    |
    |  Selection: battery
    |
    |  Comparing results for battery...
    |
    +------------------------------------------

    Returning to main menu...


    +- VISUALISATIONS -------------------------
    |
    |  1: Animate agents  
    |  2: Compare states  
    |  3: Compare inputs  
    |  0: Exit  
    |  x: Exit and close all windows  
    |
    |  Select visualisation: 1
    |
    +------------------------------------------

    Animating agents...

    🌈3 Matlab代码实现

    部分代码:

    % Monte Carlo simulation script based on RunSimSingle.
    % Runs 1000 instances of the simulation recording run time and mission
    % status.

    close all
    clearvars -except h GlobalTime Count Run Runs SaveFile
    clc

    fprintf('-----------------------------------------------------\n')
    fprintf('Monte Carlo Simulation of UAV\n')
    fprintf('Douglas H Fraser\n')
    fprintf('March 2019\n')
    fprintf('-----------------------------------------------------\n\n')

    SimTime = tic;
    NumSims = 100;

    fprintf('Running %d simulations...\n\n', NumSims)
    results = ["Sim #","Time","Status","Battery Used","Remaining Objects","Initial Search Mode","Final Search Mode","Details"];

    % Simulation Loop --------------------------------------------------
    for simNum = 1:NumSims
        close all
        clearvars -except h GlobalTime row results simNum NumSims Count Run Runs SaveFile

        % Initialize controller and environment for simulation.
        DecisionsFile = 'ControllerV2/scenario3b_5x5_1'; % Initial state: 303
        [States, Transitions] = LoadDecisions(DecisionsFile);

        Environment = cEnvironment('Grid size',[5, 5]);

        Agents.Quad = cQuadrotor('Quad',Environment,'Pose',[0 0 0 0 0 0]',...
            'States', States, 'Transitions', Transitions);

        % Targets
        NumTargets = 3;
        Shapes = {'Cube','Ball','Pyramid'};
        for i = 1:NumTargets
            Agents.Target(i) = cTarget(Shapes{i},Environment);
        end

        % Simulation properties
        t = 0;          % Initialise time (s)
        tfin = 500;      % End time (s)
        dt = 0.002;      % Solver increment (s)
        tsamp = dt;    % Sample increment (s)
        tsamp = 0.05;

        % Initialise blackbox
        Data = cBlackBox;

        % Initialise
        Sim = cSimEngine(Data,Environment,Agents,t,tfin,dt,tsamp);

        % Simulation loop
        fprintf('Running instance #%d of %d\n',

    🎉4 参考文献

    部分理论来源于网络,如有侵权请联系删除。

  • 相关阅读:
    读书笔记:程序员的自我修养---第三章
    Django介绍,安装,创建
    pytorch深度学习实战lesson6
    【软考 系统架构设计师】软件架构设计⑦ 构件与中间件技术
    Docker 安装 Nginx 容器 (完整详细版)
    多标签页之间的通信
    我的docker随笔38:用 registry 搭建私有仓库
    同步电路与跨时钟域电路设计2——多bit信号的跨时钟域传输(FIFO)
    权威认可 | Smartbi为何屡获市场认可,多个权威报告给出答案
    pagehelper 的问题
  • 原文地址:https://blog.csdn.net/weixin_46039719/article/details/128082924