CN112034733A - A city simulation method of quadrotor UAV based on Unity3D - Google Patents

A city simulation method of quadrotor UAV based on Unity3D Download PDF

Info

Publication number
CN112034733A
CN112034733A CN202010827691.8A CN202010827691A CN112034733A CN 112034733 A CN112034733 A CN 112034733A CN 202010827691 A CN202010827691 A CN 202010827691A CN 112034733 A CN112034733 A CN 112034733A
Authority
CN
China
Prior art keywords
unmanned aerial
aerial vehicle
model
unity3d
quad
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010827691.8A
Other languages
Chinese (zh)
Other versions
CN112034733B (en
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202010827691.8A priority Critical patent/CN112034733B/en
Publication of CN112034733A publication Critical patent/CN112034733A/en
Application granted granted Critical
Publication of CN112034733B publication Critical patent/CN112034733B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

本发明公开了一种基于Unity3D的四旋翼无人机城市仿真方法,包括以下步骤:S1、基于Maya软件构建四旋翼无人机模型、传感器、城市街道、建筑、环境以及人和动物模型;S2、将Maya软件的模型导入Unity3D软件,利用Unity3D软件进行实时渲染;S3、利用Unity3D中的物理引擎开发四旋翼无人机的动态模型;利用四旋翼无人机的动力学模型和电机特性开发四旋翼无人机的静态模型;利用激光和碰撞检测开发超声波传感器、红外线传感器、激光雷达传感器和相机传感器;S4、获取传感器数据,根据给定的任务,实现四旋翼无人机在城市环境的飞行任务仿真。本发明具有能全方位模拟、灵活在线修改和配置、实时交互等优点。

Figure 202010827691

The invention discloses a city simulation method of a quadrotor unmanned aerial vehicle based on Unity3D, comprising the following steps: S1, building a quadrotor unmanned aerial vehicle model, sensors, urban streets, buildings, environments and human and animal models based on Maya software; S2 、 Import the Maya software model into the Unity3D software, and use the Unity3D software for real-time rendering; S3, use the physics engine in Unity3D to develop the dynamic model of the quadrotor UAV; use the dynamics model and motor characteristics of the quadrotor UAV to develop four Static model of rotor UAV; use laser and collision detection to develop ultrasonic sensor, infrared sensor, lidar sensor and camera sensor; S4, acquire sensor data, and realize the flight of quadrotor UAV in urban environment according to the given task Mission simulation. The invention has the advantages of omnidirectional simulation, flexible online modification and configuration, real-time interaction and the like.

Figure 202010827691

Description

一种基于Unity3D的四旋翼无人机城市仿真方法A city simulation method of quadrotor UAV based on Unity3D

技术领域technical field

本发明涉及无人机仿真的技术领域,尤其涉及到一种基于Unity3D的四旋翼无人机城市仿真方法。The invention relates to the technical field of unmanned aerial vehicle simulation, in particular to a city simulation method of a quadrotor unmanned aerial vehicle based on Unity3D.

背景技术Background technique

随着微机电系统(MEMS)技术的不断成熟,无人机MEMS关系导航系统的重量大幅下降,同时微电子技术的蓬勃发展,无人机技术得到快速发展。各种消费级多旋翼无人机进入平常的生活中。各类企业级无人机活跃在航拍、巡检、农业、灾害、气象、测绘、矿产勘探、物流等各个领域。但是在复杂的城市环境中由于人流、车流的影响进行无人机作业存在风险和任务实施失败等问题,在城市无人机开发过程中构建一个接近真实的城市环境进行无人机仿真成为急需解决的问题。With the continuous maturity of Micro-Electro-Mechanical System (MEMS) technology, the weight of the MEMS-related navigation system for UAVs has dropped significantly. At the same time, with the vigorous development of microelectronics technology, UAV technology has developed rapidly. Various consumer-grade multi-rotor drones have entered ordinary life. Various enterprise-level drones are active in various fields such as aerial photography, inspection, agriculture, disasters, meteorology, surveying and mapping, mineral exploration, and logistics. However, in the complex urban environment due to the influence of the flow of people and vehicles, there are risks and task implementation failures in UAV operations. In the process of urban UAV development, building a near-real urban environment for UAV simulation has become an urgent need to solve. The problem.

针对四旋翼无人机的仿真现有方案是论文宋凯《基于Unity3D的四旋翼无人机模拟训练系统设计与实现》中介绍的根据四旋翼无人机的推力和控制力矩产生原理、姿态和位置的动力学与运动规律,建立四旋翼无人机飞控规律,实现飞行控制和训练。但是该方案只是作为四旋翼无人机的飞行训练系统,其缺少环境的交互、传感器的开发,而且该方案的模型是固定的并不能根据需求更改,更重要的是该方案是单一的仿真只是针对四旋翼飞行训练仿真,没有考虑多无人机协作等方面。The existing solution for the simulation of quadrotor UAV is introduced in Song Kai's paper "Design and Implementation of Quadrotor UAV Simulation Training System Based on Unity3D" based on the thrust and control torque generation principle, attitude and implementation of quadrotor UAV. Position dynamics and motion laws, establish four-rotor UAV flight control laws, and realize flight control and training. However, this scheme is only used as a flight training system for a quadrotor UAV, which lacks the interaction of the environment and the development of sensors, and the model of the scheme is fixed and cannot be changed according to requirements. More importantly, the scheme is a single simulation only For the quadrotor flight training simulation, the multi-UAV cooperation and other aspects are not considered.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于克服现有技术的不足,提供一种能全方位模拟、灵活在线修改和配置、实时交互的基于Unity3D的四旋翼无人机城市仿真方法。The purpose of the present invention is to overcome the deficiencies of the prior art, and to provide a Unity3D-based quadrotor unmanned aerial vehicle city simulation method capable of all-round simulation, flexible online modification and configuration, and real-time interaction.

为实现上述目的,本发明所提供的技术方案为:For achieving the above object, the technical scheme provided by the present invention is:

一种基于Unity3D的四旋翼无人机城市仿真方法,包括以下步骤:A method for urban simulation of quadrotor UAV based on Unity3D, including the following steps:

S1、基于Maya软件构建四旋翼无人机模型、传感器、城市街道、建筑、环境以及人和动物模型;S1. Build quadrotor UAV models, sensors, city streets, buildings, environments, and human and animal models based on Maya software;

S2、将Maya软件的模型导入Unity3D软件,利用Unity3D软件进行实时渲染;S2. Import the Maya software model into the Unity3D software, and use the Unity3D software for real-time rendering;

S3、利用Unity3D中的物理引擎开发四旋翼无人机的动态模型;利用四旋翼无人机的动力学模型和电机特性开发四旋翼无人机的静态模型;利用激光和碰撞检测开发超声波传感器、红外线传感器、激光雷达传感器和相机传感器;S3. Use the physics engine in Unity3D to develop the dynamic model of the quad-rotor UAV; use the dynamic model and motor characteristics of the quad-rotor UAV to develop the static model of the quad-rotor UAV; use the laser and collision detection to develop ultrasonic sensors, Infrared sensors, lidar sensors and camera sensors;

S4、结合建立的城市环境,获取传感器数据,根据给定的任务,实现四旋翼无人机在城市环境的飞行任务仿真。S4. Combine the established urban environment, obtain sensor data, and realize the flight mission simulation of the quadrotor UAV in the urban environment according to the given task.

进一步地,所述步骤S1中,四旋翼无人机模型的构建过程包括四部分:四分之一的机身采用圆柱基本体进行拉伸、剪切、移动顶点构建出扁球形;Further, in the step S1, the construction process of the quadrotor UAV model includes four parts: a quarter of the fuselage adopts a cylindrical basic body to stretch, shear, and move the vertices to construct an oblate sphere;

机臂部分采用一个圆柱,分别选择圆柱的连接面与机身的连接面,利用桥接工具构建出机臂的机臂形状,之后利用挤压和移动工具实现机臂形状的调整;The arm part adopts a cylinder, select the connection surface of the cylinder and the connection surface of the fuselage respectively, use the bridge tool to construct the arm shape of the machine arm, and then use the extrusion and moving tools to adjust the shape of the machine arm;

电机部分采用一个圆柱来构建;The motor part is constructed with a cylinder;

螺旋桨采用一个圆柱,利用多边切割工具在圆柱的侧面切割螺旋桨的基本形状,利用挤出工具实现螺旋桨的构建;The propeller adopts a cylinder, and the basic shape of the propeller is cut on the side of the cylinder by using a polygon cutting tool, and the construction of the propeller is realized by using an extrusion tool;

脚架采用两个矩形构建;The tripod is constructed with two rectangles;

激光传感器采用两个半径不同的圆柱构建,相机采用矩形和圆柱构建;The laser sensor is built with two cylinders with different radii, and the camera is built with a rectangle and a cylinder;

人和动物模型采用曲面、矩形构建和圆柱构建。Human and animal models are constructed using surfaces, rectangles, and cylinders.

进一步地,所述步骤S2具体包括:Further, the step S2 specifically includes:

S2-1、Unity3D导入Maya软件构建的模型;S2-1, Unity3D imports the model built by Maya software;

S2-2、地形构建和风力的环境因子的设置;S2-2, setting of environmental factors of terrain construction and wind;

S2-3、模型材质的添加、碰撞类型的添加和Shade Lab语言进行实时渲染环境。S2-3, the addition of model materials, the addition of collision types, and the Shade Lab language for real-time rendering environments.

进一步地,所述步骤S3中,利用Unity3D中的物理引擎开发四旋翼无人机的动态模型的具体过程如下:Further, in the described step S3, the specific process of utilizing the physics engine in Unity3D to develop the dynamic model of the quadrotor unmanned aerial vehicle is as follows:

四旋翼无人机的动力学模型为:The dynamics model of the quadrotor UAV is:

拉力:Fi=kiω2 i(i=1,2,3,4);Pulling force: F i = ki ω 2 i (i=1, 2, 3, 4);

ki:第i个螺旋桨拉力系数,

Figure BDA0002636821290000031
第i个螺旋桨的转速平方;k i : i-th propeller tension coefficient,
Figure BDA0002636821290000031
The square of the rotational speed of the i-th propeller;

控制量:垂直升降控制量:U1=F1+F2+F3+F4Control amount: vertical lift control amount: U 1 =F 1 +F 2 +F 3 +F 4 ;

横滚控制量:U2=2(F1-F3);Roll control amount: U 2 =2(F 1 -F 3 );

俯仰控制量:U3=2(F1-F4);Pitch control amount: U 3 =2(F 1 -F 4 );

偏航控制量:U4=F1+F2-F3-F4Yaw control amount: U 4 =F 1 +F 2 -F 3 -F 4 ;

旋转角:θ:横滚角roll;Φ:俯仰角pitch;

Figure BDA0002636821290000032
偏航角yaw;Rotation angle: θ: roll angle roll; Φ: pitch angle pitch;
Figure BDA0002636821290000032
yaw angle yaw;

Figure BDA0002636821290000033
d:旋翼中心到无人机坐标系x轴的垂直距离,k11:横滚角速度系数,Ix:无人机x轴的转动惯量;
Figure BDA0002636821290000033
d: the vertical distance from the rotor center to the x-axis of the UAV coordinate system, k 11 : the roll angular velocity coefficient, I x : the moment of inertia of the UAV x-axis;

Figure BDA0002636821290000034
Iy:无人机y轴的转动惯量,k22:俯仰角速度系数;
Figure BDA0002636821290000034
I y : the moment of inertia of the y-axis of the drone, k 22 : the pitch angular velocity coefficient;

Figure BDA0002636821290000035
Iz:无人机z轴的转动惯量,k33:偏航角速度系数;
Figure BDA0002636821290000035
I z : moment of inertia of the z-axis of the drone, k 33 : yaw angular velocity coefficient;

运动模型:Movement model:

Figure BDA0002636821290000041
Figure BDA0002636821290000041

Figure BDA0002636821290000042
Figure BDA0002636821290000042

Figure BDA0002636821290000043
Figure BDA0002636821290000043

m:无人机质量,kx:x轴方向的空气阻力系数,ky:y轴方向空气阻力系数,kZ:z轴方向空气阻力系数,ɡ:重力加速度系数;m: mass of the drone, k x : air resistance coefficient in the x-axis direction, ky : air resistance coefficient in the y-axis direction, k Z : air resistance coefficient in the z-axis direction, ɡ: gravitational acceleration coefficient;

无人机的动态模型利用Unity3D提供的物理引擎中的刚体模拟。The dynamic model of the drone utilizes rigid body simulation in the physics engine provided by Unity3D.

进一步地,所述步骤S4具体的实施过程包括以下六部分:Further, the specific implementation process of step S4 includes the following six parts:

S4-1、接收飞行任务:S4-1. Receive flight mission:

S4-2、获取激光射线与物体碰撞的坐标和相机拍摄的图像并保存;S4-2. Obtain the coordinates of the collision between the laser ray and the object and the image captured by the camera and save it;

S4-3、利用情况排序法对IMU和各传感器的数据进行融合,根据城市仿真场景的天气状况,对多传感器收集的数据进行优先级排序如由于下雨的天气,摄像头容易受到雨水干扰,故将摄像头数据优先级降低,激光雷达的数据将拥有最高优先级。对所有优先级设置评分系数,根据当前排序状况,对收集的传感器数据进行可靠性评估及融合;;S4-3. Use the situation sorting method to fuse the data of the IMU and each sensor, and prioritize the data collected by multiple sensors according to the weather conditions of the urban simulation scene. For example, due to rainy weather, the camera is easily disturbed by rain, so Lower the priority of camera data, and lidar data will have the highest priority. Set scoring coefficients for all priorities, and conduct reliability evaluation and fusion of collected sensor data according to the current sorting status;

S4-4、利用无人机的动力学模型和PID控制算法控制无人机位置和姿态,控制无人机到达指定任务点;S4-4. Use the dynamic model of the UAV and the PID control algorithm to control the position and attitude of the UAV, and control the UAV to reach the designated mission point;

S4-5、飞行任务结束判断;S4-5. Judgment of the end of the flight mission;

S4-6、无人机返航。S4-6, the drone returns.

与现有技术相比,本方案原理及优点如下:Compared with the prior art, the principle and advantages of this scheme are as follows:

1)针对四旋翼无人机的模型仿真,本方案将四旋翼无人机模型分成两部分:动态模型和静态模型。利用物理引擎实现动态模型,利用动力学规律和电气特性实现静态模型。两个方面融合模拟将能够全方面真实的模拟四旋翼无人机的动力学特性和电气特性。1) For the model simulation of the quad-rotor UAV, this scheme divides the quad-rotor UAV model into two parts: a dynamic model and a static model. Use the physics engine to realize the dynamic model, and use the dynamic laws and electrical characteristics to realize the static model. The fusion simulation of the two aspects will be able to fully simulate the dynamic and electrical characteristics of the quadrotor UAV.

2)针对模型的可配置,本方案融合Maya软件和Unity3D软件,利用Maya软件的模型构建和Unity的模型在线导入,实现模型的灵活在线修改和配置,能够灵活配置城市仿真环境。2) For the configurability of the model, this solution integrates Maya software and Unity3D software, uses Maya software model construction and Unity model online import, realizes flexible online modification and configuration of the model, and can flexibly configure the urban simulation environment.

3)针对环境交互,本方案利用射线和碰撞检测模拟超声波传感器、红外线传感器、激光雷达传感器、相机传感器等无人机通用传感器,实现四旋翼无人机在城市环境的感知仿真并且实时交互。3) For environmental interaction, this solution uses ray and collision detection to simulate common sensors for UAVs such as ultrasonic sensors, infrared sensors, lidar sensors, camera sensors, etc., to realize the perception simulation and real-time interaction of quadrotor UAVs in urban environments.

4)针对现有仿真功能单一,本方案将各部分模型特性比如无人机静态模型模块化,传感器模型特性模块化并且提供配置的接口。利用各个模块可以实现四旋翼无人机在城市环境的各类型仿真。4) In view of the single existing simulation function, this scheme modularizes the characteristics of each part of the model, such as the static model of the UAV, and the characteristics of the sensor model, and provides a configuration interface. Various modules can be used to realize various types of simulation of quadrotor UAV in urban environment.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的服务作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the services required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only For some embodiments of the present invention, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1为本发明一种基于Unity3D的四旋翼无人机城市仿真方法的流程图。FIG. 1 is a flowchart of a method for urban simulation of a quadrotor UAV based on Unity3D of the present invention.

具体实施方式Detailed ways

下面结合具体实施例对本发明作进一步说明:Below in conjunction with specific embodiment, the present invention will be further described:

如图1所示,本实施例所述的一种基于Unity3D的四旋翼无人机城市仿真方法,包括以下步骤:As shown in FIG. 1 , a method for simulating a city of a quadrotor UAV based on Unity3D described in this embodiment includes the following steps:

S1、基于Maya软件构建四旋翼无人机模型、传感器、城市街道、建筑、环境以及人和动物模型,具体包括:S1. Build quadrotor UAV models, sensors, city streets, buildings, environments, and human and animal models based on Maya software, including:

S11:四旋翼无人机、传感器物理模型构建;S11: Four-rotor UAV, sensor physical model construction;

S12:城市建筑如楼宇、路灯等和城市树木、花草、湖泊等模型的构建;S12: Construction of urban buildings such as buildings, street lamps, and models of urban trees, flowers, and lakes;

S13:城市人模型以及动物模型的构建;S13: Construction of urban human model and animal model;

更具体地,四旋翼无人机模型的构建过程包括四部分:四分之一的机身采用圆柱基本体进行拉伸、剪切、移动顶点构建出扁球形;More specifically, the construction process of the quadrotor UAV model consists of four parts: a quarter of the fuselage uses a cylindrical primitive to stretch, shear, and move the vertices to construct an oblate sphere;

机臂部分采用一个圆柱,分别选择圆柱的连接面与机身的连接面,利用桥接工具构建出机臂的机臂形状,之后利用挤压和移动工具实现机臂形状的调整;The arm part adopts a cylinder, select the connection surface of the cylinder and the connection surface of the fuselage respectively, use the bridge tool to construct the arm shape of the machine arm, and then use the extrusion and moving tools to adjust the shape of the machine arm;

电机部分采用一个圆柱来构建;The motor part is constructed with a cylinder;

螺旋桨采用一个圆柱,利用多边切割工具在圆柱的侧面切割螺旋桨的基本形状,利用挤出工具实现螺旋桨的构建;The propeller adopts a cylinder, and the basic shape of the propeller is cut on the side of the cylinder by using a polygon cutting tool, and the construction of the propeller is realized by using an extrusion tool;

脚架采用两个矩形构建;The tripod is constructed with two rectangles;

激光传感器采用两个半径不同的圆柱构建,相机采用矩形和圆柱构建;The laser sensor is built with two cylinders with different radii, and the camera is built with a rectangle and a cylinder;

人和动物模型采用曲面、矩形构建和圆柱构建。Human and animal models are constructed using surfaces, rectangles, and cylinders.

S2、将Maya软件的模型导入Unity3D软件,利用Unity3D软件进行实时渲染;本步骤具体包括:S2. Import the model of the Maya software into the Unity3D software, and use the Unity3D software for real-time rendering; this step specifically includes:

S2-1、Unity3D导入Maya软件构建的模型;S2-1, Unity3D imports the model built by Maya software;

S2-2、地形构建和风力的环境因子的设置;S2-2, setting of environmental factors of terrain construction and wind;

S2-3、模型材质的添加、碰撞类型的添加和Shade Lab语言进行实时渲染环境。S2-3, the addition of model materials, the addition of collision types, and the Shade Lab language for real-time rendering environments.

上述中,模型导入的具体是在Maya软件中打开大纲视图,选择导出的对象,发送到Unity,保存在Unity工程中。In the above, the model import is to open the outline view in the Maya software, select the exported object, send it to Unity, and save it in the Unity project.

地形的构建具体是在Unity3D软件中创建地面,在地面的说明界面设置地面的长、宽、高、表面贴质。地形的起伏可通过高度刷子进行设置,地面的草或路面可通过贴图实现。The construction of the terrain is to create the ground in the Unity3D software, and set the length, width, height and surface texture of the ground in the description interface of the ground. The undulation of the terrain can be set with the height brush, and the grass or pavement on the ground can be achieved with maps.

环境的实时渲染是通过编写Shade Lab程序,包括:Shade着色根命令、Properties属性命令、Subshader命令、Subshader Tags命令、Pass命令、Fallback命令、Category命令。The real-time rendering of the environment is done by writing Shade Lab programs, including: Shade root command, Properties attribute command, Subshader command, Subshader Tags command, Pass command, Fallback command, Category command.

S3、利用Unity3D中的物理引擎开发四旋翼无人机的动态模型;利用四旋翼无人机的动力学模型和电机特性开发四旋翼无人机的静态模型;利用激光和碰撞检测开发超声波传感器、红外线传感器、激光雷达传感器和相机传感器;S3. Use the physics engine in Unity3D to develop the dynamic model of the quad-rotor UAV; use the dynamic model and motor characteristics of the quad-rotor UAV to develop the static model of the quad-rotor UAV; use the laser and collision detection to develop ultrasonic sensors, Infrared sensors, lidar sensors and camera sensors;

其中,利用Unity3D中的物理引擎开发四旋翼无人机的动态模型的具体过程如下:Among them, the specific process of using the physics engine in Unity3D to develop the dynamic model of the quadrotor UAV is as follows:

四旋翼无人机的动力学模型为:The dynamics model of the quadrotor UAV is:

拉力:Fi=kiω2 i(i=1,2,3,4);Pulling force: F i = ki ω 2 i (i=1, 2, 3, 4);

ki:第i个螺旋桨拉力系数,

Figure BDA0002636821290000071
第i个螺旋桨的转速平方;k i : i-th propeller tension coefficient,
Figure BDA0002636821290000071
The square of the rotational speed of the i-th propeller;

控制量:垂直升降控制量:U1=F1+F2+F3+F4Control amount: vertical lift control amount: U 1 =F 1 +F 2 +F 3 +F 4 ;

横滚控制量:U2=2(F1-F3);Roll control amount: U 2 =2(F 1 -F 3 );

俯仰控制量:U3=2(F1-F4);Pitch control amount: U 3 =2(F 1 -F 4 );

偏航控制量:U4=F1+F2-F3-F4Yaw control amount: U 4 =F 1 +F 2 -F 3 -F 4 ;

旋转角:θ:横滚角roll;

Figure BDA0002636821290000076
俯仰角pitch;
Figure BDA0002636821290000072
偏航角yaw;Rotation angle: θ: roll angle roll;
Figure BDA0002636821290000076
pitch angle pitch;
Figure BDA0002636821290000072
yaw angle yaw;

Figure BDA0002636821290000073
d:旋翼中心到无人机坐标系x轴的垂直距离,k11:横滚角速度系数,Ix:无人机x轴的转动惯量;
Figure BDA0002636821290000073
d: the vertical distance from the rotor center to the x-axis of the UAV coordinate system, k 11 : the roll angular velocity coefficient, I x : the moment of inertia of the UAV x-axis;

Figure BDA0002636821290000074
Iy:无人机y轴的转动惯量,k22:俯仰角速度系数;
Figure BDA0002636821290000074
I y : the moment of inertia of the y-axis of the drone, k 22 : the pitch angular velocity coefficient;

Figure BDA0002636821290000075
Iz:无人机z轴的转动惯量,k33:偏航角速度系数;
Figure BDA0002636821290000075
I z : moment of inertia of the z-axis of the drone, k 33 : yaw angular velocity coefficient;

运动模型:Movement model:

Figure BDA0002636821290000081
Figure BDA0002636821290000081

Figure BDA0002636821290000082
Figure BDA0002636821290000082

Figure BDA0002636821290000083
Figure BDA0002636821290000083

m:无人机质量,kx:x轴方向的空气阻力系数,ky:y轴方向空气阻力系数,kZ:z轴方向空气阻力系数,ɡ:重力加速度系数;m: mass of the drone, k x : air resistance coefficient in the x-axis direction, ky : air resistance coefficient in the y-axis direction, k Z : air resistance coefficient in the z-axis direction, ɡ: gravitational acceleration coefficient;

无人机的动态模型利用Unity3D提供的物理引擎中的刚体模拟;The dynamic model of the drone utilizes the rigid body simulation in the physics engine provided by Unity3D;

激光和碰撞模拟超声波传感器、红外线传感器、激光雷达传感器和相机传感器采用射线和碰撞检测,在回调函数中获取射线与物体碰撞的位置。Laser and collision simulation Ultrasonic sensors, infrared sensors, lidar sensors, and camera sensors use ray and collision detection to get the position where the ray collides with the object in a callback function.

S4、结合建立的城市环境,获取传感器数据,根据给定的任务,实现四旋翼无人机在城市环境的飞行任务仿真,具体过程如下:S4. Combine the established urban environment, obtain sensor data, and realize the flight mission simulation of the quadrotor UAV in the urban environment according to the given task. The specific process is as follows:

S4-1、接收飞行任务:S4-1. Receive flight mission:

S4-2、获取激光射线与物体碰撞的坐标和相机拍摄的图像并保存;S4-2. Obtain the coordinates of the collision between the laser ray and the object and the image captured by the camera and save it;

S4-3、利用情况排序法对IMU和各传感器的数据进行融合,根据城市仿真场景的天气状况,对多传感器收集的数据进行优先级排序如由于下雨的天气,摄像头容易受到雨水干扰,故将摄像头数据优先级降低,激光雷达的数据将拥有最高优先级。对所有优先级设置评分系数,根据当前排序状况,对收集的传感器数据进行可靠性评估及融合;;S4-3. Use the situation sorting method to fuse the data of the IMU and each sensor, and prioritize the data collected by multiple sensors according to the weather conditions of the urban simulation scene. For example, due to rainy weather, the camera is easily disturbed by rain, so Lower the priority of camera data, and lidar data will have the highest priority. Set scoring coefficients for all priorities, and conduct reliability evaluation and fusion of collected sensor data according to the current sorting status;

S4-4、利用无人机的动力学模型和PID控制算法控制无人机位置和姿态,控制无人机到达指定任务点;S4-4. Use the dynamic model of the UAV and the PID control algorithm to control the position and attitude of the UAV, and control the UAV to reach the designated mission point;

S4-5、飞行任务结束判断;S4-5. Judgment of the end of the flight mission;

S4-6、无人机返航。S4-6, the drone returns.

以上所述之实施例子只为本发明之较佳实施例,并非以此限制本发明的实施范围,故凡依本发明之形状、原理所作的变化,均应涵盖在本发明的保护范围内。The above-mentioned embodiments are only preferred embodiments of the present invention, and are not intended to limit the scope of implementation of the present invention. Therefore, any changes made according to the shape and principle of the present invention should be included within the protection scope of the present invention.

Claims (5)

1. A city simulation method of a quad-rotor unmanned aerial vehicle based on Unity3D is characterized by comprising the following steps:
s1, constructing a four-rotor unmanned aerial vehicle model, a sensor, a city street, a building, an environment, a human model and an animal model based on Maya software;
s2, importing the Maya software model into Unity3D software, and performing real-time rendering by utilizing Unity3D software;
s3, developing a dynamic model of the quad-rotor unmanned aerial vehicle by using a physical engine in the Unity 3D; developing a static model of the quad-rotor unmanned aerial vehicle by utilizing a dynamic model and motor characteristics of the quad-rotor unmanned aerial vehicle; developing an ultrasonic sensor, an infrared sensor, a laser radar sensor and a camera sensor by using laser and collision detection;
and S4, acquiring sensor data by combining the established urban environment, and realizing flight task simulation of the quad-rotor unmanned aerial vehicle in the urban environment according to a given task.
2. The city simulation method for quad-rotor unmanned aerial vehicle based on Unity3D according to claim 1, wherein in step S1, the construction process of the quad-rotor unmanned aerial vehicle model comprises four parts: one quarter of the machine body adopts a cylindrical basic body to stretch, cut and move the vertex to construct an oblate sphere;
the horn part adopts a cylinder, the connecting surface of the cylinder and the connecting surface of the machine body are respectively selected, the horn shape of the horn is constructed by using a bridging tool, and then the horn shape is adjusted by using an extruding and moving tool;
the motor part is constructed by a cylinder;
the propeller adopts a cylinder, the basic shape of the propeller is cut on the side surface of the cylinder by a polygonal cutting tool, and the propeller is constructed by an extrusion tool;
the foot rest is constructed by two rectangles;
the laser sensor is constructed by two cylinders with different radiuses, and the camera is constructed by a rectangle and a cylinder;
human and animal models are constructed using curved surfaces, rectangles and cylinders.
3. The city simulation method for quad-rotor unmanned aerial vehicles based on Unity3D according to claim 1, wherein the step S2 specifically comprises:
s2-1 and Unity3D are imported into a model constructed by Maya software;
s2-2, setting of environmental factors of terrain construction and wind power;
s2-3, adding model materials, adding collision types and rendering environment in the Shade Lab language in real time.
4. The city simulation method of quad-rotor unmanned aerial vehicle based on Unity3D according to claim 1, wherein in step S3, the specific process of developing the dynamic model of quad-rotor unmanned aerial vehicle by using the physics engine in Unity3D is as follows:
the dynamics model of the quad-rotor unmanned aerial vehicle is as follows:
tension force: fi=kiω2 i(i=1,2,3,4);
ki: the coefficient of tension of the ith propeller,
Figure FDA0002636821280000021
the square of the rotational speed of the ith propeller;
control amount: vertical lift control: u shape1=F1+F2+F3+F4
Roll control amount: u shape2=2(F1-F3);
Pitch control amount: u shape3=2(F1-F4);
Yaw control amount: u shape4=F1+F2-F3-F4
Rotation angle: θ: a roll angle roll;
Figure FDA0002636821280000026
a pitch angle pitch;
Figure FDA0002636821280000022
yaw angle yaw;
Figure FDA0002636821280000023
d: perpendicular distance, k, from rotor center to x-axis of coordinate system of unmanned aerial vehicle11: coefficient of roll angular velocity, Ix: the rotational inertia of the x-axis of the unmanned aerial vehicle;
Figure FDA0002636821280000024
Iy: moment of inertia, k, of the unmanned plane y axis22: pitchingAn angular velocity coefficient;
Figure FDA0002636821280000025
Izrotational inertia k of the z-axis of the unmanned aerial vehicle33: a yaw rate coefficient;
and (3) motion model:
Figure FDA0002636821280000031
Figure FDA0002636821280000032
Figure FDA0002636821280000033
m: mass of unmanned aerial vehicle, kx: coefficient of air resistance, k, in the x-axis directiony: coefficient of air resistance, k, in the y-axis directionz: z-axis coefficient of air resistance, Ag: a gravitational acceleration coefficient;
the dynamic model of the drone utilizes rigid body simulations in the physics engine provided by Unity 3D.
5. The city simulation method of quad-rotor unmanned aerial vehicle based on Unity3D according to claim 1, wherein the specific implementation process of step S4 includes the following six steps:
s4-1, receiving a flight mission:
s4-2, acquiring and storing the coordinates of the collision of the laser ray and the object and the image shot by the camera;
s4-3, fusing data of the IMU and each sensor by using a situation sorting method;
s4-4, controlling the position and the posture of the unmanned aerial vehicle by using a dynamic model and a PID control algorithm of the unmanned aerial vehicle, and controlling the unmanned aerial vehicle to reach a specified task point;
s4-5, judging the ending of the flight mission;
s4-6, and returning the unmanned aerial vehicle.
CN202010827691.8A 2020-08-17 2020-08-17 Four-rotor unmanned aerial vehicle city simulation method based on Unity3D Active CN112034733B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010827691.8A CN112034733B (en) 2020-08-17 2020-08-17 Four-rotor unmanned aerial vehicle city simulation method based on Unity3D

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010827691.8A CN112034733B (en) 2020-08-17 2020-08-17 Four-rotor unmanned aerial vehicle city simulation method based on Unity3D

Publications (2)

Publication Number Publication Date
CN112034733A true CN112034733A (en) 2020-12-04
CN112034733B CN112034733B (en) 2024-08-02

Family

ID=73577778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010827691.8A Active CN112034733B (en) 2020-08-17 2020-08-17 Four-rotor unmanned aerial vehicle city simulation method based on Unity3D

Country Status (1)

Country Link
CN (1) CN112034733B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112286079A (en) * 2020-12-29 2021-01-29 中航金城无人系统有限公司 High fidelity unmanned aerial vehicle avionics semi-physical scene simulation system
CN113656918A (en) * 2021-08-30 2021-11-16 四川中烟工业有限责任公司 Four-rotor simulation test method applied to finished product elevated warehouse scene

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118622A (en) * 2007-05-25 2008-02-06 清华大学 Three-dimensional Trajectory Simulation Method of MAV in Urban Environment
CN104269078A (en) * 2014-09-23 2015-01-07 苏州天益航空科技有限公司 Method for collision detection for agricultural plant protection unmanned aerial vehicle
CN105759832A (en) * 2016-05-20 2016-07-13 武汉科技大学 Four-rotor aircraft sliding mode variable structure control method based on inversion method
CN106652001A (en) * 2016-12-29 2017-05-10 河南职业技术学院 Method and system for implementing three-dimensional virtual fire drill on basis of Unity 3D
CN106710362A (en) * 2016-11-30 2017-05-24 中航华东光电(上海)有限公司 Flight training method implemented by using virtual reality equipment
CN107608371A (en) * 2016-07-12 2018-01-19 何守印 Four rotor automatic obstacle avoiding unmanned plane under the environment of community in urban areas
CN108427430A (en) * 2018-03-30 2018-08-21 南京航空航天大学 Quadrotor control method based on network-control
CN108681327A (en) * 2018-04-24 2018-10-19 电子科技大学 Quadrotor flight control method based on fractional order saturation function switching law
US20190004519A1 (en) * 2017-06-30 2019-01-03 Intel Corporation Methods and apparatus to implement nonlinear control of vehicles moved using multiple motors
CN109270834A (en) * 2018-11-05 2019-01-25 吉林大学 A kind of design method based on PID four-rotor aircraft control system
CN109977628A (en) * 2019-05-27 2019-07-05 奥特酷智能科技(南京)有限公司 A method of the efficient simulation laser radar in Unity
CN110609567A (en) * 2019-09-16 2019-12-24 中国人民解放军国防科技大学 A terminal spoofing method for satellite inertial integrated navigation for quadrotor UAV
US20200013307A1 (en) * 2017-03-31 2020-01-09 SZ DJI Technology Co., Ltd. Flight simulation method based on multi-sensor data fusion, device, and apparatus
CN111354240A (en) * 2018-12-05 2020-06-30 西安谷禾航空科技有限公司 Ejection and/or parachute jumping life-saving training method based on VR
CN111413994A (en) * 2020-03-13 2020-07-14 浙江树人学院(浙江树人大学) A direct adaptive fuzzy control method for quadrotor UAV

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118622A (en) * 2007-05-25 2008-02-06 清华大学 Three-dimensional Trajectory Simulation Method of MAV in Urban Environment
CN104269078A (en) * 2014-09-23 2015-01-07 苏州天益航空科技有限公司 Method for collision detection for agricultural plant protection unmanned aerial vehicle
CN105759832A (en) * 2016-05-20 2016-07-13 武汉科技大学 Four-rotor aircraft sliding mode variable structure control method based on inversion method
CN107608371A (en) * 2016-07-12 2018-01-19 何守印 Four rotor automatic obstacle avoiding unmanned plane under the environment of community in urban areas
CN106710362A (en) * 2016-11-30 2017-05-24 中航华东光电(上海)有限公司 Flight training method implemented by using virtual reality equipment
CN106652001A (en) * 2016-12-29 2017-05-10 河南职业技术学院 Method and system for implementing three-dimensional virtual fire drill on basis of Unity 3D
US20200013307A1 (en) * 2017-03-31 2020-01-09 SZ DJI Technology Co., Ltd. Flight simulation method based on multi-sensor data fusion, device, and apparatus
US20190004519A1 (en) * 2017-06-30 2019-01-03 Intel Corporation Methods and apparatus to implement nonlinear control of vehicles moved using multiple motors
CN108427430A (en) * 2018-03-30 2018-08-21 南京航空航天大学 Quadrotor control method based on network-control
CN108681327A (en) * 2018-04-24 2018-10-19 电子科技大学 Quadrotor flight control method based on fractional order saturation function switching law
CN109270834A (en) * 2018-11-05 2019-01-25 吉林大学 A kind of design method based on PID four-rotor aircraft control system
CN111354240A (en) * 2018-12-05 2020-06-30 西安谷禾航空科技有限公司 Ejection and/or parachute jumping life-saving training method based on VR
CN109977628A (en) * 2019-05-27 2019-07-05 奥特酷智能科技(南京)有限公司 A method of the efficient simulation laser radar in Unity
CN110609567A (en) * 2019-09-16 2019-12-24 中国人民解放军国防科技大学 A terminal spoofing method for satellite inertial integrated navigation for quadrotor UAV
CN111413994A (en) * 2020-03-13 2020-07-14 浙江树人学院(浙江树人大学) A direct adaptive fuzzy control method for quadrotor UAV

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
姚灵灵 等: "四旋翼飞行控制系统的模糊PID控制策略研究", 自动化与仪器仪表, no. 2015, 25 October 2015 (2015-10-25) *
宋凯: "基于Unity3D的四旋翼无人机模拟训练系统设计与实现", 《中国优秀硕士学位论文全文数据库》工程科技II辑, vol. 2020, no. 03, pages 16 - 19 *
欧阳瑞斌: "无人机群通信技术研究", 《中国优秀硕士学位论文全文数据库》工程科技II辑, vol. 2016, no. 11 *
马忠丽等: "微型多旋翼无人机半物理虚拟飞行和控制实验平台", 实验技术与管理, vol. 115, no. 05 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112286079A (en) * 2020-12-29 2021-01-29 中航金城无人系统有限公司 High fidelity unmanned aerial vehicle avionics semi-physical scene simulation system
CN112286079B (en) * 2020-12-29 2021-03-30 中航金城无人系统有限公司 High fidelity unmanned aerial vehicle avionics semi-physical scene simulation system
CN113656918A (en) * 2021-08-30 2021-11-16 四川中烟工业有限责任公司 Four-rotor simulation test method applied to finished product elevated warehouse scene
CN113656918B (en) * 2021-08-30 2024-04-16 四川中烟工业有限责任公司 Four-rotor simulation test method applied to finished product overhead warehouse scene

Also Published As

Publication number Publication date
CN112034733B (en) 2024-08-02

Similar Documents

Publication Publication Date Title
CN107368091B (en) A stable flight control method for multi-rotor unmanned aerial vehicles based on finite-time neural dynamics
Ahmed et al. Recent advances in unmanned aerial vehicles: a review
EP3971674B1 (en) Systems and methods for uav flight control
Scherer et al. Flying fast and low among obstacles
CN106155076B (en) A stable flight control method for a multi-rotor unmanned aerial vehicle
JP2018165930A (en) Drone navigation device, drone navigation method and drone navigation program
CN109283937A (en) A method and system for plant protection spraying operation based on UAV
CN107390545A (en) A kind of simulation training system of unmanned plane and its load
CN114488848B (en) Unmanned aerial vehicle autonomous flight system and simulation experiment platform for indoor building space
CN110333738A (en) A UAV swarm verification method based on simulation software
CN110955261A (en) A ROS-based simulation method for fixed-wing UAV autopilot
CN109062252A (en) Quadrotor drone cluster control method and its device based on Artificial Potential Field Method
CN113419428A (en) USV-UAV cooperative path tracking adaptive controller design method based on 3D mapping guidance
CN112034733A (en) A city simulation method of quadrotor UAV based on Unity3D
Bogatov et al. Control and analysis of quadcopter flight when setting a complex trajectory of motion
Muralidharan et al. Structural analysis of mini drone developed using 3D printing technique
Doukhi et al. Deep reinforcement learning for autonomous map-less navigation of a flying robot
De Nardi et al. Swarmav: A swarm of miniature aerial vehicles
Valenti et al. An autonomous flyer photographer
Aleksandrov et al. Optimization of lift force of mini quadrotor helicopter by changing of gap size between rotors
CN113138608B (en) A Visual Servo Control Method for Quadrotor UAV Using Disturbance Observer and Nonlinear Velocity Observer
CN117252011A (en) Heterogeneous ground-air unmanned cluster simulation system construction method based on distributed architecture
CN115758687A (en) Unmanned aerial vehicle autopilot simulation platform
CN114063650A (en) Simulated unmanned aerial vehicle flight control method oriented to unreal engine
Ertugrul et al. Autonomous aerial navigation and mapping for security of smart buildings

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant