Pixhawk原生固件PX4之HIL硬件在环仿真

欢迎交流~ 个人 Gitter 交流平台,点击直达:Gitter


硬件在环仿真可以接遥控器进行调试。

串口设置

下载minicom

sudo apt-get install minicom

配置飞控的设备号(/dev/ttyACM0)以及波特率(921600 8N1)

sudo minicom -s

nicom1

Serial port setup -> Save setup as dfl -> Exit

minicom2

配置完以后save as dfl然后exit

编译jmavsim

cd src/Firmware/Tools/jMAVSim
# Build and run:
ant

硬件在环仿真 (HITL)

根据PX4官网教程

Here is an example for quadrotor X.

  1. Configure PX4 autopilot for HIL setup using either of these methods:

    a. Using QGroundControl: Connect to board, click Setup, click Airframe, check the box in the Simulation selection (last one in list) and pick the type of HIL setup you want from the drop-down. Apply and Restart, Reconnect

    b. By hand: Set parameter SYS_AUTOSTART = 1001, save parameters and reboot(推荐使用)

  2. Run jMAVSim in HITL mode. Change the serial port to the port of Pixhawk and make sure to have QGroundControl NOT connected to serial.

java -Djava.ext.dirs= -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -serial /dev/ttyACM0 921600 -qgc
  1. The console will display mavlink text messages from the autopilot

  2. To connect QGroundControl to this system: Select the default UDP link from the “connect” button in the top right corner and connect it.

  3. Ready to fly!

飞控连上Linux后先启动仿真GUI,再打开地面站。


                                          By Fantasy

  • 2
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值