ArduSub SITL Ubuntu mavros环境搭建

本文详细介绍了在Ubuntu环境下搭建ArduSubSITL的全过程,包括环境配置、交叉编译工具安装、Mavros软件包安装及配置等关键步骤,同时提供了常见错误的解决方案。

第一章 ArduSub SITL Ubuntu环境搭建
作者:张玉梅 zhangym@pcl.ac.cn
1.1.安装过程
第一步:
http://ardupilot.org/dev/docs/building-setup-linux.html#building-setup-linux
Setting up the Build Environment (Linux/Ubuntu)
如果已经有git了。可以忽略页面中git相关的步骤。

  • git clone https://github.com/ArduPilot/ardupilot
  • cd ardupilot
  • git submodule update --init --recursive

Tools/environment_install/install-prereqs-ubuntu.sh -y  
(安装耗时很长,需要权限, 可能报错,报错再根据提示或根据经验进行修正)
. ~/.profile

找到你的路径,根据你的路径修改环境变量,例如:
export PATH=$PATH:$HOME/ardupilot/Tools/autotest
export PATH=/usr/lib/ccache:$PATH

安装交叉编译工具
cd TARGET_DIR
tar -xjvf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2

export PATH=$PATH:TARGET_DIR/gcc-arm-none-eabi-4_9-2015q3/bin

sudo apt-get install ccache

cd /usr/lib/ccache
sudo ln -s /usr/bin/ccache arm-none-eabi-g++
sudo ln -s /usr/bin/ccache arm-none-eabi-gcc

第二步:
http://ardupilot.org/dev/docs/setting-up-sitl-on-linux.html
启动SITL

$ sim_vehicle.py -v ArduSub

当显示
.....
APM: EKF2 IMU0 is using GPS
APM: EKF2 IMU1 is using GPS
Flight battery 100 percent
就成功了。
按ctrl+C。再启动sim_vehicle.py

ardupilot/Tools/autotest$ sim_vehicle.py -L RATBeach --out=udp:0.0.0.0:14550 --map –console -v ArduSub

第三步,安装运行mavros相关软件包
http://ardupilot.org/dev/docs/ros-install.html#installing-mavros

$sudo apt-get install ros-kinetic-mavros*

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值