Windows下使用Airsim+QGC进行PX4硬件在环HITL(二)

2024-06-05 08:28

本文主要是介绍Windows下使用Airsim+QGC进行PX4硬件在环HITL(二),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

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.​

文章目录

  • Windows下使用Airsim+QGC进行PX4硬件在环HITL
    • (一)Required softwares
    • (二)Preperation for HITL
      • 1, Bootloader preperation
      • 2, Firmware download
      • 3, Hardware in the loop(HITL) Configuration
      • 4, Configure AirSim
    • (三)HITL Testing
    • (四)Virtual flight in HITL

(一)Required softwares

Windows下使用Airsim+QGC进行PX4硬件在环HITL(一)

(二)Preperation for HITL

1, Bootloader preperation

If you have programmed the pixhawk board using self-written code, then it cannot work as flight controller any more. To restore the flight controller function, the firmware should be programmed into the board. This is usually done by QGroundControl. However, before downloading firmware, a bootloader program should first be downloaded using STLink Utility into the board for the purpose of initialization.

The prebuilt bootloader hex files(one for co-mcu, the other for main-mcu) are provided. You can also refer to the following links to do it on your own.

Official Github Repository: PX4/PX4-Bootloader: PX4 Bootloader for PX4FMU, PX4IO and PX4FLOW (github.com)

Blogs: pixhawk FMU/IO板bootloader烧写_pixhawk4 bootload烧写-CSDN博客

关于PX4-Bootloader编译的几个小问题 - 知乎 (zhihu.com)

2, Firmware download

Connect the board using micro-usb to your computer.
Open QGC, and click the upper-right icon.
请添加图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
Reboot your device(unplug and plug the USB), you will see interface like this. There may be some error windows popping up, just ignore them.
在这里插入图片描述
在这里插入图片描述

3, Hardware in the loop(HITL) Configuration

Follow the user guide(all the content before section Simulator-Specific Setup): Hardware in the Loop Simulation (HITL) | PX4 User Guide (v1.13)

4, Configure AirSim

You can find the configuration file for AirSim in path like this:

"C:\Users\YourUserName\Documents\AirSim\settings.json"

Copy the code to your own file. Note you should look up your own serial port number for Pixhawk after connecting it to your computer and modify this line: "SerialPort": "COM5",.

{"SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/main/docs/settings.md","SettingsVersion": 1.2,"SimMode": "Multirotor","ClockType": "SteppableClock","Vehicles": {"PX4": {"SerialBaudRate": 921600, "SerialPort": "COM5","VehicleType": "PX4Multirotor","ControlIp": "127.0.0.1","ControlPort": 14580,"LogViewerHostIp": "127.0.0.1","LogViewerPort": 14388,"QgcHostIp": "127.0.0.1","QgcPort": 14550,"UseSerial": true,"LockStep": true,"UdpIp": "127.0.0.1","UdpPort": 14560,"TcpPort": 14560,"UseTcp": true,"Model": "Generic","LocalHostIp":"127.0.0.1","Sensors":{"Barometer":{"SensorType": 1,"Enabled": true,"PressureFactorSigma": 0.0001825}},"Parameters": {"NAV_RCL_ACT": 0,"NAV_DLL_ACT": 0,"COM_OBL_ACT": 1,"LPE_LAT": 47.641468,"LPE_LON": -122.140165}}}}

(三)HITL Testing

Windows下使用Airsim+QGC进行PX4硬件在环HITL(三)

(四)Virtual flight in HITL

Windows下使用Airsim+QGC进行PX4硬件在环HITL(四)

这篇关于Windows下使用Airsim+QGC进行PX4硬件在环HITL(二)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1032569

相关文章

SpringBoot结合Docker进行容器化处理指南

《SpringBoot结合Docker进行容器化处理指南》在当今快速发展的软件工程领域,SpringBoot和Docker已经成为现代Java开发者的必备工具,本文将深入讲解如何将一个SpringBo... 目录前言一、为什么选择 Spring Bootjavascript + docker1. 快速部署与

深入理解Go语言中二维切片的使用

《深入理解Go语言中二维切片的使用》本文深入讲解了Go语言中二维切片的概念与应用,用于表示矩阵、表格等二维数据结构,文中通过示例代码介绍的非常详细,需要的朋友们下面随着小编来一起学习学习吧... 目录引言二维切片的基本概念定义创建二维切片二维切片的操作访问元素修改元素遍历二维切片二维切片的动态调整追加行动态

prometheus如何使用pushgateway监控网路丢包

《prometheus如何使用pushgateway监控网路丢包》:本文主要介绍prometheus如何使用pushgateway监控网路丢包问题,具有很好的参考价值,希望对大家有所帮助,如有错误... 目录监控网路丢包脚本数据图表总结监控网路丢包脚本[root@gtcq-gt-monitor-prome

Python通用唯一标识符模块uuid使用案例详解

《Python通用唯一标识符模块uuid使用案例详解》Pythonuuid模块用于生成128位全局唯一标识符,支持UUID1-5版本,适用于分布式系统、数据库主键等场景,需注意隐私、碰撞概率及存储优... 目录简介核心功能1. UUID版本2. UUID属性3. 命名空间使用场景1. 生成唯一标识符2. 数

linux解压缩 xxx.jar文件进行内部操作过程

《linux解压缩xxx.jar文件进行内部操作过程》:本文主要介绍linux解压缩xxx.jar文件进行内部操作,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、解压文件二、压缩文件总结一、解压文件1、把 xxx.jar 文件放在服务器上,并进入当前目录#

SpringBoot中如何使用Assert进行断言校验

《SpringBoot中如何使用Assert进行断言校验》Java提供了内置的assert机制,而Spring框架也提供了更强大的Assert工具类来帮助开发者进行参数校验和状态检查,下... 目录前言一、Java 原生assert简介1.1 使用方式1.2 示例代码1.3 优缺点分析二、Spring Fr

Android kotlin中 Channel 和 Flow 的区别和选择使用场景分析

《Androidkotlin中Channel和Flow的区别和选择使用场景分析》Kotlin协程中,Flow是冷数据流,按需触发,适合响应式数据处理;Channel是热数据流,持续发送,支持... 目录一、基本概念界定FlowChannel二、核心特性对比数据生产触发条件生产与消费的关系背压处理机制生命周期

java使用protobuf-maven-plugin的插件编译proto文件详解

《java使用protobuf-maven-plugin的插件编译proto文件详解》:本文主要介绍java使用protobuf-maven-plugin的插件编译proto文件,具有很好的参考价... 目录protobuf文件作为数据传输和存储的协议主要介绍在Java使用maven编译proto文件的插件

SpringBoot线程池配置使用示例详解

《SpringBoot线程池配置使用示例详解》SpringBoot集成@Async注解,支持线程池参数配置(核心数、队列容量、拒绝策略等)及生命周期管理,结合监控与任务装饰器,提升异步处理效率与系统... 目录一、核心特性二、添加依赖三、参数详解四、配置线程池五、应用实践代码说明拒绝策略(Rejected

C++ Log4cpp跨平台日志库的使用小结

《C++Log4cpp跨平台日志库的使用小结》Log4cpp是c++类库,本文详细介绍了C++日志库log4cpp的使用方法,及设置日志输出格式和优先级,具有一定的参考价值,感兴趣的可以了解一下... 目录一、介绍1. log4cpp的日志方式2.设置日志输出的格式3. 设置日志的输出优先级二、Window