ArduPilot-sitl仿真-Mission Planner联合显示

2023-05-16

ArduPilot-sitl仿真-Mission Planner联合显示

To start the simulator first change directory to the vehicle directory. For example, for the multicopter code change to ardupilot/ArduCopter:

cd ardupilot/ArduCopter

Then start the simulator using sim_vehicle.py. The first time you run it you should use the -w option to wipe the virtual EEPROM and load the right default parameters for your vehicle.

sim_vehicle.py -w

After the default parameters are loaded you can start the simulator normally. First kill the sim_vehicle.py you are running using Ctrl-C. Then:

sim_vehicle.py --console --map

如果要采用flightgear 额外需要

Install FlightGear from the terminal:

sudo apt-get install flightgear

Open a new command prompt and run the appropriate shell file for your
vehicle in /ardupilot/Tools/autotest/: fg_plane_view.sh (Plane) and
fg_quad_view.sh (Copter).

This will start FlightGear.

Start SITL in the terminal in the normal way. In this case we’re
specifying the start location as San Francisco airport (KSFO) as this
is an interesting airport with lots to see:

sim_vehicle.py -L KSFO

SITL with MAVProxy (UDP)
SITL can connect to multiple ground stations by using MAVProxy to forward UDP packets to the GCSs network address (for example, forwarding to another Windows box or Android tablet on your local network). The simulated vehicle can then be controlled and viewed through any attached GCS.

First find the IP address of the machine running the GCS. How you get the address is platform dependent (on Windows you can use the ‘ipconfig’ command to find the computer’s address).

Assuming the IP address of the GCS is 192.168.14.82, you would add this address/port as a MAVProxy output using:

output add 192.168.14.82:14550

在电脑中打开Mission Planner , 选择UDP连接,并设置对应的端口号。如下图所示。
在这里插入图片描述

此时,就可以完成代码sitl仿真与电脑的通信。

本人采用的是Vmware 虚拟机和主机进行链接,在ubuntu 中,
Enter the following commands in the MAVProxy Command Prompt.

mode guided
arm throttle
takeoff 40

Copter should take off to an altitude of 40 metres and then hover (while it waits for the next command).解锁,起飞后。
可以在地面站中采用mavlink形式读取日志信息,也可以通过地面站实时显示飞行数据。并通过MP中的转换成matlab文件完成在Matlab中的数据显示(日志文件有两种格式,都表示同样的信息)。 亲测有效!

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ArduPilot-sitl仿真-Mission Planner联合显示 的相关文章

随机推荐

  • SecureCRT连接超时设置-The semaphore timeout period has expired

    设置 设置后就不会出现短时间没有操作连接超时的局面 xff0c 要求需要再次重连的问题 FR 徐海涛 xff08 hunk Xu xff09 QQ技术交流群 xff1a 386476712
  • CANoe-Trace-CAN Error

    CANoe软件CAN Error排查经验案例 系统模拟充电桩 xff0c 和实车车辆通过枪线连接 xff0c 启动充电流程 xff0c 在Trace界面看到CAN1有故障 xff0c CAN Error xff0c 并且是TxError 原
  • Makefile的使用

    Makefile规则 规则解析 一个简单的 Makefile 文件包含一系列的 规则 xff0c 样式如下 xff1a 目标 target 依赖 prerequiries lt tab gt 命令 command 目标 xff08 targ
  • STM32用一个定时器输出多路不同频率及占空比的PWM(输出比较模式)

    我们使用STM32输出PWM时会使用定时器的PWM输出模式来进行生成 xff0c 但是这样子生成PWM是有局限的 xff0c 它只能生成四路频率相同的PWM xff0c 当你设定了TIMx PSC xff08 预分频寄存器 xff09 和T
  • 虚拟机的安装与开发环境的配置

    前言 最近开始接触嵌入式 xff0c 之前也就学过C语言 xff0c 但是都是是非常基础的一些知识 知识最高峰的时期就是为了过国家计算机二级C 而一通猛学 下面就放入我最近学习笔记的内容 一 Linux开发环境的搭建 下载VirtualBo
  • C语言:基础知识

    基础C语言 基本知识 如何在虚拟机上写代码 1 打开终端 xff08 Ctrl xff0b Alt xff0b t xff09 xff0c mkdir day01 创建目录 cd 目录名 2 vim file c xff0c 进入vim文本
  • 详解scanf、gets、getchar和getch 使用及其原理。

    scanf gets getchar和getch 使用及其原理 一 说在最前 xff1a 回车及换行 概念 在计算机还没有出现之前 xff0c 有一种叫做电传打字机 在电传打字机打字时 xff0c 在每行后面加两个表示结束的字符 xff0c
  • 小项目:学生成绩管理系统

    学生成绩管理系统 前言 xff1a 此项目不具有商业价值 xff0c 旨在总结C语言所学知识点及各知识点在项目中的运用 xff0c 主要锻炼编码能力 xff0c 程序设计能力 xff0c 对业务逻辑的理解能力 文章目录 学生成绩管理系统系统
  • C语言:指针学习以及理解

    C语言 xff1a 关于指针学习以及理解 文章目录 C语言 xff1a 关于指针学习以及理解一 什么是指针二 为什么使用指针 什么情况下使用指针三 如何使用指针四 使用指针要注意的问题五 指针与数组的关系六 指针的运算七 指针与const配
  • 二叉树的性质及计算式

    二叉树的性质 1 一般二叉树的性质 2 完全二叉树的性质 3 满二叉树性质
  • 消息队列函数(msgget、msgctl、msgsnd、msgrcv)详细说明

    消息队列函数由msgget msgctl msgsnd msgrcv四个函数组成 下面的表格列出了这四个函数的函数原型及其具体说明 1 msgget函数原型 msgget 得到消息队列标识符或创建一个消息队列对象 所需头文件 include
  • 什么是C++

    什么是C 43 43 C 43 43 是一种使用广泛的计算机程序设计语言 它是一种通用程序设计语言 xff0c 支持多重编程模式 xff0c 例如过程化程序设计 数据抽象 面向对象程序设计 泛型程序设计和设计模式等 比雅尼 斯特劳斯特鲁普博
  • 小项目:网络版ATM(C)

    网络版ATM 设计结构体 span class token macro property span class token directive keyword ifndef span STRUCT H span span class tok
  • c++中 new的使用方法

    c 43 43 中 xff0c new的用法很灵活 xff0c 这里进行了简单的总结 1 new 分配这种类型的一个大小的内存空间 并以括号中的值来初始化这个变量 2 new 分配这种类型的n个大小的内存空间 并用默认构造函数来初始化这些变
  • C中表达式、语句、代码块

    表达式 Expression 表达式 61 运算符 43 操作数 表达式必须有一个执行结果 xff0c 这个结果必须是一个值 xff0c 例如 3 4 43 5 的结果 17 xff0c a 61 c 61 d 61 10 的结果是 10
  • #ifndef #define #endif 防止头文件被重复引用

    想必很多人都看过 头文件中的 ifndef define endif 防止该头文件被重复引用 但是是否能理解 被重复引用 是什么意思 是不能在不同的两个文件中使用include来包含这个头文件吗 xff1f 如果头文件被重复引用了 xff0
  • C/C++报错:全局变量重定义或是多次定义

    很多人可能直接把全局变量写进 h文件 xff0c 然后用多个文件包含这个头文件 xff0c 编译时就会报错 xff1a 变量重定义 头文件的作用就是要给外部提供接口使用的 xff0c 所以请记住 xff0c 只在 h中做声明 xff0c 在
  • 字符串查找函数:strchr、strrchr、strchrnul、strstr、strrstr

    strchr char strchr const char str int ch 功能 xff1a 寻找字符串中某字符第一次出现的位置 参数 str 要查找的字符串或字符串指针 ch 要查找的字符 返回值 成功返回一个指向在字符串str中第
  • PX4 代码中 position_estimator_inav(互补滤波)理解

    Local position estimator 为卡尔曼滤波估计 position estimator inav 需要解决三个问题 xff1a 如何由加速度进行速度和位置估计 xff1b 加速度偏差的计算 xff1b 如何使用融合过程 借
  • ArduPilot-sitl仿真-Mission Planner联合显示

    ArduPilot sitl仿真 Mission Planner联合显示 To start the simulator first change directory to the vehicle directory For example