qgroundcontrol在LINUX下的编译与调试
2017-09-24 10:10
513 查看
/***************************************************************************************************************/
*
* (c) 光明工作室 2017-2037 COPYRIGHT
*
* 光明工作室团队成员大部分来自全国著名985、211工程院校。具有丰富的工程实践经验,
*本工作室热忱欢迎大家的光临。工作室长期承接嵌入式开发、PCB设计、算法仿真等软硬件设计。
*
*
*1)基于C8051、AVR、MSP430单片机开发。
*2)基于STM32F103、STM32F407等ARM处理器开发。(IIC、SPI、485、WIFI等相关设计)
*3)基于C6678、DM388等DSP处理器开发。(视频、网络、通信协议相关设计)
*4)基于QT、C#软件开发。
*5)基于OPENCV、OPENGL图像处理算法开发。(基于LINUX、WINDOWS、MATLAB等)
*6)无人机飞控、地面站程序开发。(大疆、PIX、 qgroundcontrol、missionplanner、MAVLINK)
*7) ROS机器人操作系统下相关开发。
*8)LINUX、UCOSII、VXWORKS操作系统开发。
*
*
* 联系方式:
* QQ:2468851091 call:18163325140
* Email:2468851091@qq.com
*
/ ****************************************************************************************************************/
Compile and run qgroundcontrol
for Linux Ubuntu .
在LINUX UBUNTU下面编译和运行qgroundcontrol。
Perquisites:
Open a terminal
and check the followings:----测试环境,看看是什么LINUX版本。
# ubuntu version
cat
/etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.04
DISTRIB_CODENAME=raring
DISTRIB_DESCRIPTION="Ubuntu 13.04"
# compiler (gcc and g++) versions (should be 4.7.X or greater)---查看编译器版本。
g++
--version
g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
gcc --version
gcc (Ubuntu/Linaro
4.7.3-1ubuntu1) 4.7.3
#install following
packages (qt,regex,sdl,osg,osgearth,osg phonon...I hope they are all)安装相关依赖项。
sudo
apt-get update
sudo
apt-get install build-essential
sudo
apt-get install libopenscenegraph-dev
sudo
apt-get install regexxer
sudo
apt-get install libsdl1.2-dev
sudo
apt-get install flite-dev
sudo
apt-get install libosgViewer
sudo
apt-get install libosgearth-dev
sudo
apt-get install libphonon(4) # try with 4 or without
sudo
apt-get install phonon-backend-gstreamer
sudo
apt-get install qt4-default-------这里是缺省安装QT4。但是现在的qgroundcontrol的编译可能要更高版本的QT环境了。
sudo
apt-get install libqt4-dev (optional)
#(I
don't know if this is mandatory, I just have it in history)
sudo
apt-get install libglade2.0-cil-dev
sudo
apt-get install git
Repos:
# get the sources
for mavlink from git, and build it-----安装MAVLINK数据链路通信协议。
git
clone https://github.com/mavlink/mavlink
cd mavlink
git submodule update --init --recursive
mkdir
build
cd
build
cmake
.. #<----------------------------correction from qmake ..
make
configure
make
sudo
make install
# if you get any
errors (repo changes always), in building mavlink crap,
just
forget it and, https://github.com/downloads/mavlink/mavlink/mavlink-1.0.9.deb
and install it
with package manager. Right click, open with 'package|system|* whatever installer'
then continue
with the procedure...
#get the sources
for qgroundcontrol, and build ir
git
clone git://github.com/mavlink/qgroundcontrol.git
cd qgroundcontrol
git clone http://github.com/LorenzMeier/qupgrade/
qmake
qgroundcontrol.pro
make
# If you get linker
errors as: Geometry::set*Array and View::checkErrors type
of..
#apply
the attached patch. PATCH.TXT obsolette
#apply
this patch: patch2.txt
#
fixes for linkage errors and FlightModes current PWM value
#Read here how
to apply a patch file to a tree (Linux): howto-patch
#then continue
make
clean && make
# it should
build without errors
# copy the qml/
resources folder where the qgroundcontrol binary was made
cp -r qml /release
cd release
#
start qground control application
./qgroundcontol
#select APM.
Now let's connect the USB cable from PC to the 3DR arducopter 2.5/6
#open
another terminal, and clean the kernel message log
sudo
dmesg -c # clean the log
#
insert the usb cable from the PC to the APM 2.5(6). (for telemetry connection radio 3DR scroll a bit down)
sudo
dmesg -c #
check (visually in the output) the device tty* which
was installed... ttyACM0
[30856.087388]
usb 3-2: new full-speed USB device number 3 using xhci_hcd
[30856.160058] usb 3-2: New USB device found, idVendor=2341, idProduct=0010
[30856.160066] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[30856.160072] usb 3-2: Product: Arduino Mega 2560
[30856.160076] usb 3-2: Manufacturer: Arduino (www.arduino.cc)
[30856.160081] usb 3-2: SerialNumber: 64036363039351715080
[30856.160398] usb 3-2: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[30856.162093] cdc_acm 3-2:1.0: ttyACM0:
USB ACM device
Go
on the right top corner of the QGrouncControl and select ttyACM0 and
the speed 115200
Click: Connect.
![](https://oscdn.geek-share.com/Uploads/Images/Content/202010/27/4bfce6b4567b4c2c6d3ba462c388b75a)
Using
3DR Telemetry Radio module 915 MHz
The mavlink build manually, above did not do it's
magic, so on top of it, I installed the Debian binary package.
Download @ https://github.com/mavlink/mavlink/downloads the: mavlink-1.0.9.deb
in to your ~/Downloads folder. Open a file browser,
right-click it and Open it
with Ubuntu Software Centre (or Debian installer).
Install. Ignore all the messages
about the stability of the package. After install
it might say INSTALL again. Just exit the
Installer, if you have seen the progress bar going
to the end.
Close the connection to APM. Unplug the USB.Close
the qgroundcontrol application.
Power the APM from a USB power or from the battery
(don't forget the safety procedures).
Make sure the radio (s) TX/RX are plugged, RX on
APM, ant TX on the USB.
Look here for details: http://code.google.com/p/ardupilot-mega/wiki/3DRadio
Check the dmesg when you plug the USB radio module.
On my computer it assigns it to ttyUSB0 device.
Start qgroundcontrol. Change the device by clicking
on the [ttyACM0] (previous your device) square
(right-top corner) to ttyUSB0 (new
dmesg detected device), and Bit rate to 57600. Press CONNECT.
![](https://oscdn.geek-share.com/Uploads/Images/Content/202010/27/7170e7d4347f6e37a87105b54652774d)
#The patch has been updated to add current PWM feature to flight modes page: (Nov/23/2013)
![](https://oscdn.geek-share.com/Uploads/Images/Content/202010/27/9c404c234b946ba6e78fe30b430f23d5.png)
-re-edited
on Nov 22 (added the radio 3DR mavlink guideline)
-re-edited
on Nov 23 (added current PWM on flight modes page to tune up the PWM's)
Ubuntu 14-04 86_64 x86_64 GNU/Linux
Qgc source code is the same as the one in Ubuntu 13.XX.
required packages for compiling.
sudo apt-get install libsdl-dev
sudo apt-get install phonon-backend-gstreamer
sudo apt-get install libphonon4qt5-dev
sudo apt-get install flite-dev
sudo apt-get install libprotoc-dev libosgearth-dev
qmake ./qgroundcontrol.pro
make
*
* (c) 光明工作室 2017-2037 COPYRIGHT
*
* 光明工作室团队成员大部分来自全国著名985、211工程院校。具有丰富的工程实践经验,
*本工作室热忱欢迎大家的光临。工作室长期承接嵌入式开发、PCB设计、算法仿真等软硬件设计。
*
*
*1)基于C8051、AVR、MSP430单片机开发。
*2)基于STM32F103、STM32F407等ARM处理器开发。(IIC、SPI、485、WIFI等相关设计)
*3)基于C6678、DM388等DSP处理器开发。(视频、网络、通信协议相关设计)
*4)基于QT、C#软件开发。
*5)基于OPENCV、OPENGL图像处理算法开发。(基于LINUX、WINDOWS、MATLAB等)
*6)无人机飞控、地面站程序开发。(大疆、PIX、 qgroundcontrol、missionplanner、MAVLINK)
*7) ROS机器人操作系统下相关开发。
*8)LINUX、UCOSII、VXWORKS操作系统开发。
*
*
* 联系方式:
* QQ:2468851091 call:18163325140
* Email:2468851091@qq.com
*
/ ****************************************************************************************************************/
Compile and run qgroundcontrol
for Linux Ubuntu .
在LINUX UBUNTU下面编译和运行qgroundcontrol。
Perquisites:
Open a terminal
and check the followings:----测试环境,看看是什么LINUX版本。
# ubuntu version
cat
/etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.04
DISTRIB_CODENAME=raring
DISTRIB_DESCRIPTION="Ubuntu 13.04"
# compiler (gcc and g++) versions (should be 4.7.X or greater)---查看编译器版本。
g++
--version
g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
gcc --version
gcc (Ubuntu/Linaro
4.7.3-1ubuntu1) 4.7.3
#install following
packages (qt,regex,sdl,osg,osgearth,osg phonon...I hope they are all)安装相关依赖项。
sudo
apt-get update
sudo
apt-get install build-essential
sudo
apt-get install libopenscenegraph-dev
sudo
apt-get install regexxer
sudo
apt-get install libsdl1.2-dev
sudo
apt-get install flite-dev
sudo
apt-get install libosgViewer
sudo
apt-get install libosgearth-dev
sudo
apt-get install libphonon(4) # try with 4 or without
sudo
apt-get install phonon-backend-gstreamer
sudo
apt-get install qt4-default-------这里是缺省安装QT4。但是现在的qgroundcontrol的编译可能要更高版本的QT环境了。
sudo
apt-get install libqt4-dev (optional)
#(I
don't know if this is mandatory, I just have it in history)
sudo
apt-get install libglade2.0-cil-dev
sudo
apt-get install git
Repos:
# get the sources
for mavlink from git, and build it-----安装MAVLINK数据链路通信协议。
git
clone https://github.com/mavlink/mavlink
cd mavlink
git submodule update --init --recursive
mkdir
build
cd
build
cmake
.. #<----------------------------correction from qmake ..
make
configure
make
sudo
make install
# if you get any
errors (repo changes always), in building mavlink crap,
just
forget it and, https://github.com/downloads/mavlink/mavlink/mavlink-1.0.9.deb
and install it
with package manager. Right click, open with 'package|system|* whatever installer'
then continue
with the procedure...
#get the sources
for qgroundcontrol, and build ir
git
clone git://github.com/mavlink/qgroundcontrol.git
cd qgroundcontrol
git clone http://github.com/LorenzMeier/qupgrade/
qmake
qgroundcontrol.pro
make
# If you get linker
errors as: Geometry::set*Array and View::checkErrors type
of..
#apply
the attached patch. PATCH.TXT obsolette
#apply
this patch: patch2.txt
#
fixes for linkage errors and FlightModes current PWM value
#Read here how
to apply a patch file to a tree (Linux): howto-patch
#then continue
make
clean && make
# it should
build without errors
# copy the qml/
resources folder where the qgroundcontrol binary was made
cp -r qml /release
cd release
#
start qground control application
./qgroundcontol
#select APM.
Now let's connect the USB cable from PC to the 3DR arducopter 2.5/6
#open
another terminal, and clean the kernel message log
sudo
dmesg -c # clean the log
#
insert the usb cable from the PC to the APM 2.5(6). (for telemetry connection radio 3DR scroll a bit down)
sudo
dmesg -c #
check (visually in the output) the device tty* which
was installed... ttyACM0
[30856.087388]
usb 3-2: new full-speed USB device number 3 using xhci_hcd
[30856.160058] usb 3-2: New USB device found, idVendor=2341, idProduct=0010
[30856.160066] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[30856.160072] usb 3-2: Product: Arduino Mega 2560
[30856.160076] usb 3-2: Manufacturer: Arduino (www.arduino.cc)
[30856.160081] usb 3-2: SerialNumber: 64036363039351715080
[30856.160398] usb 3-2: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[30856.162093] cdc_acm 3-2:1.0: ttyACM0:
USB ACM device
Go
on the right top corner of the QGrouncControl and select ttyACM0 and
the speed 115200
Click: Connect.
Using
3DR Telemetry Radio module 915 MHz
The mavlink build manually, above did not do it's
magic, so on top of it, I installed the Debian binary package.
Download @ https://github.com/mavlink/mavlink/downloads the: mavlink-1.0.9.deb
in to your ~/Downloads folder. Open a file browser,
right-click it and Open it
with Ubuntu Software Centre (or Debian installer).
Install. Ignore all the messages
about the stability of the package. After install
it might say INSTALL again. Just exit the
Installer, if you have seen the progress bar going
to the end.
Close the connection to APM. Unplug the USB.Close
the qgroundcontrol application.
Power the APM from a USB power or from the battery
(don't forget the safety procedures).
Make sure the radio (s) TX/RX are plugged, RX on
APM, ant TX on the USB.
Look here for details: http://code.google.com/p/ardupilot-mega/wiki/3DRadio
Check the dmesg when you plug the USB radio module.
On my computer it assigns it to ttyUSB0 device.
Start qgroundcontrol. Change the device by clicking
on the [ttyACM0] (previous your device) square
(right-top corner) to ttyUSB0 (new
dmesg detected device), and Bit rate to 57600. Press CONNECT.
#The patch has been updated to add current PWM feature to flight modes page: (Nov/23/2013)
![](https://oscdn.geek-share.com/Uploads/Images/Content/202010/27/9c404c234b946ba6e78fe30b430f23d5.png)
-re-edited
on Nov 22 (added the radio 3DR mavlink guideline)
-re-edited
on Nov 23 (added current PWM on flight modes page to tune up the PWM's)
Ubuntu 14-04 86_64 x86_64 GNU/Linux
Qgc source code is the same as the one in Ubuntu 13.XX.
required packages for compiling.
sudo apt-get install libsdl-dev
sudo apt-get install phonon-backend-gstreamer
sudo apt-get install libphonon4qt5-dev
sudo apt-get install flite-dev
sudo apt-get install libprotoc-dev libosgearth-dev
qmake ./qgroundcontrol.pro
make
相关文章推荐
- Linux下C程序的编辑,编译和运行以及调试
- Linux 下 C程序编译与调试
- Linux重要命令行摘记_编译与调试篇
- Linux中使用VS Code编译调试C++项目详解
- 在Linux中使用VS Code编译调试C++项目(gcc/g++、Makefile入门、vs code)
- linux下c语言的编译调试运行
- 5.2嵌入式linux程序编译与调试
- Linux 下编译及调试 C 代码的简易指南
- Linux下的avr系列的编译烧录调试方法 — 大工CSDN – EE01工作室【附件】
- Linux 编译与调试
- 使用VS+VisualGDB编译调试Linux程序
- Q113:PBRT-V3分别在Linux和Mac下的编译与调试(汇总)
- Linux RedHat 9 QT4的编译、调试环境的搭建
- Linux下的MCU开发之AVR系列1-avr系列的编译烧录调试方法
- Linux下编译调试C程序(GCC,GDB)
- linux下预处理、编译、汇编、链接及gdb调试
- 使用QT CREATOR2.4.1创建工程,并在LINUX上运行,能编译,GDB+GDBSERVER调试(例子工程,dvrgui)
- LINUX下汇编的编译,调试命令
- Linux RedHat 9 QT4的编译、调试环境的搭建
- Linux 0.11 在ubuntu-11和gcc-4.6.1下编译调试至正常运行的过程详解