Windows下使用Airsim+QGC进行PX4硬件在环HITL
This tutorial will guide you through the installation of Airsim and QGC on Windows, so that the hardware-in-the-loop experiment can be conducted.
Hardware-in-the-Loop (HITL or HIL) is a simulation mode in which normal PX4 firmware is run on real flight controller hardware. This approach has the benefit of testing most of the actual flight code on the real hardware.
In 2017 Microsoft Research created AirSim (Aerial Informatics and Robotics Simulation) – an open-source robotics simulation platform. From ground vehicles, wheeled robotics, aerial drones, and even static IoT devices, AirSim enabled data capture data for models without costly field operations.
文章目录
(一)Required softwares
Windows下使用Airsim+QGC进行PX4硬件在环HITL(一)
(二)Preperation for HITL
Windows下使用Airsim+QGC进行PX4硬件在环HITL(二)
(三)HITL Testing
Windows下使用Airsim+QGC进行PX4硬件在环HITL(三)
(四)Virtual flight in HITL
1, Simple takeoff
See (三)HITL Testing
2, By mission
Click the paper airplane
on the left. and then follow these three steps:
Drag teh arrow to the right and the drone will fly under Mission
mode
The drone will fly along the pre-planned path.
When the drone reaches the last waypoint, it will stay at that position, this mode is called Hold
.
Command the drone to return the to the starting point. Click the Return
icon to enter the Return
mode.
After landing, QGC will report “Flight Plan Complete”.
3, Log analysis
You can inspect the log file of your flight by downloading it from QGC and then upload it to the official website Flight Review (px4.io).
Open the official website Flight Review (px4.io).
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/b5e40c047e57447da8473696476ec5a9.png#pic_center= 80%x80%)
Open 3D View:
Open Plot Page:
The below information is related to PWM output. In real flight, the PWM output by flight controller will drive the motors.
4, Using remote controller & Joystick
- Remote controller (e.g Futaba 14SG)
- Configure Radio & Flight mode in QGC
- Connect RC Receiver to Pixhawk
- Pair RC Transmitter and RC Receiver
- Joystick
- Parameter setting:
COM_RC_IN_MODE
isRC Transmitter only
by default,change it toRC or Joystick keep first
. And then, reboot the flight controller.
- Parameter setting: