第一章 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*

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

被折叠的 条评论
为什么被折叠?



