![1776bafd4a0fd751c4a40928cc84fc3d.png](https://img-blog.csdnimg.cn/img_convert/1776bafd4a0fd751c4a40928cc84fc3d.png)
基于px4的无人机避障导航包
https://github.com/PX4/avoidancegithub.comPX4/avoidance算法包是深度传感器融合和避障ROS节点。这个存储库包含两个不同的实现:
- local_planner is a local VFH+* based planner that plans (including some history) in a vector field histogram
- global_planner 在八叉树(octomap )上实现的,基于图的全局规划器
- safe_landing_planner 使用local_planner完成安全区域检测与着陆
The three algorithms are standalone and they are not meant to be used together.
好吧,这个局部规划器和全局规划器没有丝毫关系
installtion
环境: ubuntu16.04 、ROS kinetic、gazebo7.19
这里假设你已经安装好ros了(没有安装没关系,网上资料一大堆)
1.使用新版的px4/Firmware
这里我使用的是1.10.2
(疫情前还是1.9.2,看来这个社区更新还是蛮快的,1.10.2增加了很多新的东西,比如对多机仿真的支持更完美了,有兴趣的可以去了解一下)
下载Firmware:
mkdir PX4
cd PX4
git clone https://github.com/PX4/Firmware.git
cd Firmware
git checkout v1.10.2
git submodule update --init --recursive
安装px4依赖:
# Install PX4 "common" dependencies.
./Tools/setup/ubuntu.sh --no-sim-tools --no-nuttx
# Gstreamer plugins (for Gazebo camera)
sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly libgstreamer-plugins-base1.0-dev
编译:
# This is necessary to prevent some Qt-related errors (feel free to try to omit it)
export QT_X11_NO_MITSHM=1
# Build and run simulation
make px4_sitl_default gazebo
如果没有问题,将自动打开gazebo
![3c9fcaca89766073c0d5d0de2219b925.png](https://img-blog.csdnimg.cn/img_convert/3c9fcaca89766073c0d5d0de2219b925.png)
配置环境:
参考之前的方法
不知名:【gazebo仿真】使用gazebo和px4做无人机仿真zhuanlan.zhihu.com在~/.bsahrc
中添加
export FIRMWARE_DIR={
path_to_your_Firmware}
source $FIRMWARE_DIR/Tools/setup_gazebo.ba