搭建无人机仿真环境之PX4安装中出现的一些问题的解决
摘自:https://blog.csdn.net/wangdongjiab/article/details/107230585
搭建无人机仿真环境之PX4安装
Djarea 2020-07-09 16:02:23 583 收藏 6
分类专栏: Gazebo PX4 文章标签: linux
版权
搭建无人机仿真环境之PX4安装
- 安装依赖包
- 下载固件
- git submodule update --init --recursive中遇到的问题
- make posix_sitl_default gazebo中遇到的问题
- 运行roslaunch px4 mavros_posix_sitl.launch遇到的问题
安装依赖包
sudo apt install python3-pip
pip3 install --user pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip3 install --user jinja2 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip3 install --user empy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip3 install --user packaging -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip3 install --user toml -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip3 install --user numpy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip3 install --user pyquaternion -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
下载固件
git clone https://github.com/PX4/Firmware
mv Firmware PX4_Firmware
cd PX4_Firmware
git checkout -b xtdrone/dev v1.11.0-beta1
git submodule update --init --recursive
make posix_sitl_default gazebo
git submodule update --init --recursive中遇到的问题
如果使用镜像github.com.cnpmjs.org进行git clone ,在执行git submodule update --init --recursive时出现:
~/PX4_Firmware$ git submodule update --init --recursive
子模组 'Tools/jMAVSim'(https://github.com.cnpmjs.org/PX4/jMAVSim.git)未对路径 'Tools/jMAVSim' 注册
子模组 'Tools/sitl_gazebo'(https://github.com.cnpmjs.org/PX4/sitl_gazebo.git)未对路径 'Tools/sitl_gazebo' 注册
子模组 'boards/atlflight/cmake_hexagon'(https://github.com.cnpmjs.org/PX4/cmake_hexagon.git)未对路径 'boards/atlflight/cmake_hexagon' 注册
子模组 'mavlink/include/mavlink/v2.0'(https://github.com.cnpmjs.org/mavlink/c_library_v2.git)未对路径 'mavlink/include/mavlink/v2.0' 注册
子模组 'platforms/nuttx/NuttX/apps'(https://github.com.cnpmjs.org/PX4/NuttX-apps.git)未对路径 'platforms/nuttx/NuttX/apps' 注册
子模组 'platforms/nuttx/NuttX/nuttx'(https://github.com.cnpmjs.org/PX4/NuttX.git)未对路径 'platforms/nuttx/NuttX/nuttx' 注册
子模组 'platforms/qurt/dspal'(https://github.com.cnpmjs.org/ATLFlight/dspal.git)未对路径 'platforms/qurt/dspal' 注册
子模组 'src/drivers/gps/devices'(https://github.com.cnpmjs.org/PX4/GpsDrivers.git)未对路径 'src/drivers/gps/devices' 注册
子模组 'src/drivers/uavcan/libuavcan'(https://github.com.cnpmjs.org/PX4/uavcan.git)未对路径 'src/drivers/uavcan/libuavcan' 注册
子模组 'src/lib/ecl'(https://github.com.cnpmjs.org/PX4/ecl.git)未对路径 'src/lib/ecl' 注册
子模组 'src/lib/matrix'(https://github.com.cnpmjs.org/PX4/Matrix.git)未对路径 'src/lib/matrix' 注册
子模组 'src/modules/micrortps_bridge/micro-CDR'(https://github.com.cnpmjs.org/PX4/micro-CDR.git)未对路径 'src/modules/micrortps_bridge/micro-CDR' 注册
解决方法:
检查 .gitmodule文件中的url格式
按照以下方法更换一下即可:
gedit .gitmodules
git submodule sync
dj@dj-virtual-machine:~/PX4_Firmware$ git submodule update --init --recursive
fatal: Needed a single revision
无法在子模组路径 'Tools/jMAVSim' 中找到当前版本
make posix_sitl_default gazebo中遇到的问题
CMake Error at CMakeLists.txt:32 (find_package):By not providing "Findgazebo.cmake" in CMAKE_MODULE_PATH this project hasasked CMake to find a package configuration file provided by "gazebo", butCMake did not find one.Could not find a package configuration file provided by "gazebo" with anyof the following names:gazeboConfig.cmakegazebo-config.cmakeAdd the installation prefix of "gazebo" to CMAKE_PREFIX_PATH or set"gazebo_DIR" to a directory containing one of the above files. If "gazebo"provides a separate development package or SDK, be sure it has beeninstalled.
sudo apt-get install libgazebo9-dev
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GSTREAMER_LIBRARIES (ADVANCED)linked by target "gazebo_vision_plugin" in directory /home/dj/PX4_Firmware/Tools/sitl_gazebolinked by target "gazebo_uuv_plugin" in directory /home/dj/PX4_Firmware/Tools/sitl_gazebo... ...-- Configuring incomplete, errors occurred!
See also "/home/dj/PX4_Firmware/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeOutput.log".
See also "/home/dj/PX4_Firmware/build/px4_sitl_default/build_gazebo/CMakeFiles/CMakeError.log".
[143/573] Building CXX object platform...CMakeFiles/px4_layer.dir/px4_sem.cpp.o
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-configure
cd /home/dj/PX4_Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSEND_VISION_ESTIMATION_DATA=ON -GNinja /home/dj/PX4_Firmware/Tools/sitl_gazebo && /usr/bin/cmake -E touch /home/dj/PX4_Firmware/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure
[151/573] Building CXX object platform...n/CMakeFiles/px4_layer.dir/tasks.cpp.o
ninja: build stopped: subcommand failed.
Makefile:198: recipe for target 'px4_sitl_default' failed
make: *** [px4_sitl_default] Error 1
sudo apt-get install libgstreamer-plugins-base1.0-dev
运行Gazebo出现:[Err] [REST.cc:205] Error in REST request
解决方法:
打开编辑~/.ignition/fuel/config.yaml文件
sudo gedit ~/.ignition/fuel/config.yaml
首先注释 url : https://api.ignitionfuel.org
然后添加 url: https://api.ignitionrobotics.org
servers:-name: osrfurl: https://api.ignitionrobotics.org
# url: https://api.ignitionfuel.org
运行roslaunch px4 mavros_posix_sitl.launch遇到的问题
VMware: vmw_ioctl_command error 无效的参数.
Aborted (core dumped)
[gazebo_gui-4] process has died [pid 2104, exit code 134, cmd /opt/ros/melodic/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/home/dj/.ros/log/92926e0c-c1e4-11ea-b959-000c2928d800/gazebo_gui-4.log].
log file: /home/dj/.ros/log/92926e0c-c1e4-11ea-b959-000c2928d800/gazebo_gui-4*.log
$ export SVGA_VGPU10=0
Resource not found: gazebo_ros
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/opt/ros/melodic/share
ROS path [2]=/home/dj/PX4_Firmware
ROS path [3]=/home/dj/PX4_Firmware/Tools/sitl_gazebo
The traceback for the exception was written to the log file
$ sudo apt-get install ros-melodic-gazebo-ros-pkgs ros-melodic-gazebo-ros-control
RLException: [indoor1.launch] is neither a launch file in package [px4] nor is [px4] a launch file name
The traceback for the exception was written to the log file
source ~/PX4_Firmware/Tools/setup_gazebo.bash ~/PX4_Firmware/ ~/PX4_Firmware/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/PX4_Firmware
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/PX4_Firmware/Tools/sitl_gazebo
搭建无人机仿真环境之PX4安装中出现的一些问题的解决相关推荐
- XTDorne平台搭建无人机仿真环境时遇到的问题及解决
XTDorne平台搭建无人机仿真环境时遇到的问题及解决 PX4安装过程中遇到的问题及解决 PX4安装过程中遇到的问题及解决 执行make px4_sitl_default gazebo遇到的问题 问题 ...
- 【rotors】多旋翼无人机仿真(一)——搭建rotors仿真环境
[rotors]多旋翼无人机仿真(一)--搭建rotors仿真环境 [rotors]多旋翼无人机仿真(二)--设置飞行轨迹 [rotors]多旋翼无人机仿真(三)--SE3控制 [rotors]多旋翼 ...
- Modbus通信从入门到精通_2_Modbus TCP通信详解及仿真(搭建ModbusTCP仿真环境:创建虚拟PLC并进行ModbusTCP通讯;寄存器与PLC中映射关系;适合理解如何编写上位机)
本篇将会以西门子PLC软件搭建ModbusTCP仿真环境,并通过仿真环境,介绍基础知识及模拟实际应用中写一个简单的通信读取PLC数据方法,并简介了编写上位机的方法. 文章目录 1. 搭建ModbusT ...
- 联想R7000 2020双系统+无人机仿真环境配置
Ubuntu18.04 无人机仿真环境搭建 背景 电脑配置 一.启动盘制作 二.电脑设置 (一)创建硬盘空白分区 1.打开此电脑->管理->磁盘管理 (二)设置BIOS 1.重启打开BIO ...
- 机架搭建_【新阁教育】穷学上位机系列——搭建STEP7仿真环境
经常有学员问我,学习上位机要不要买PLC硬件? 我一般的回答是:富则自行购买,穷则搭建仿真. PLC硬件,对于学习上位机来说,是锦上添花的事,经济条件允许,有则更好,条件不允许,新阁教育告诉您也可以通 ...
- 搭建 Verilog 仿真环境
搭建 Verilog 仿真环境 对于 Verilog 的初学者,有一个仿真环境是必要的.这就好比是刚开始接触 C 语言,连 C 语言的开发环境都没有,怎么学习 C 语言呢,难道靠大脑模拟运行吗? 本文 ...
- 信捷plc485通信上位机_【新阁教育】穷学上位机系列——搭建STEP7仿真环境
经常有学员问我,学习上位机要不要买PLC硬件? 我一般的回答是:富则自行购买,穷则搭建仿真. PLC硬件,对于学习上位机来说,是锦上添花的事,经济条件允许,有则更好,条件不允许,新阁教育告诉您也可以通 ...
- 一生一芯 预学习阶段 搭建verilator仿真环境 之 示例:双控开关
一生一芯 预学习阶段 搭建verilator仿真环境 之 示例:双控开关 1.前言 一生一芯预学习 中需要安装4.210版本Verilator,通过git方式下载所需要版本. 2.步骤 1.官网链接: ...
- 记一下终于用iverilog搭建好仿真环境
动机 一开始准备在linux系统里仿真的,看了非常多的教程,写的已经非常详细了,但是我这脑子还招架不住啊,最后转向在windows进行仿真,过程跟linux中其实是一样的,但是我电脑的linux系统始 ...
- 基于eclipse搭建LittleVGL仿真环境
基于eclipse搭建LittleVGL仿真环境 环境 Windows 10 64位 工具 Eclipse IDE for C/C++ 4.15 --开发IDE SDL2 --提供仿真显示 MinGW ...
最新文章
- Ubuntu 系统打开任务管理
- oracle rac应急_Support for Oracle RAC 框架资源组故障
- dlib的编译和安装
- 使用docker部署一个直接可用的puppet服务端
- 《JavaScript应用程序设计》一一2.17 回调函数
- 将项目导入eclipse中出现的jsp页面报错
- DoTWeen常用方法
- Tensorflow2.0 之 SSD 网络结构
- 侏罗纪开发实施工作管理平台
- 下载歌曲的时候嫌麻烦?打造专属你的音乐下载器
- 阿里云 SDK 动态IP域名解析
- PHP compact() 函数,好用!
- 为什么书呆子不受欢迎?
- 单片机0804AD转换c语言程序,模数转换芯片ADC0804的应用
- css 实现 图片旋转
- 小米商城项目总结(一)
- ( 转载)改变人类历史的17大数学方程
- javaIO——PipedReader 和 PipedWriter 实现模拟即时聊天
- FPGA学习笔记2-FPGA的主要厂商
- 蓝牙大师(新十代硬件)拆机