776

阿木币

1

精华

1378 小时

在线时间

管理员

Rank: 9Rank: 9Rank: 9

发表于 2020-4-1 14:45:17 53331 浏览 42 回复

[飞控嵌入式] 《无人机仿真开发》课程问答专用贴(答疑汇总更新至0401)

《无人机仿真开发》课程问答专用贴,关于该课的所有问题,请在本贴进行跟帖回复。小编将会定期整理答疑内容进行汇总,为避免提交重复问题,各位小伙伴在提问前请先查看答疑汇总尝试自行解决问题,提高学习效率。

《无人机仿真开发》课程学习链接:
Q1:可以利用这个平台中的imu验证自己开发的姿态估计算法,然后与常规算法所得姿态角进行对比能够获取无人机的真实姿态角嘛?
A1:验证姿态估计还是matlab的模型开发课程靠谱,这个平台做路径规划算法比较好!

Q2:购买课程后,资料如何获取?      
A2:添加课程客服微信: jiayue199506获取也可参考github 上的源码:
https://github.com/amov-lab/some
Q3:请问用虚拟机的话,安装完成后,make px4_sitl_default gazebo,会有[wrn],无法启动gazebo,必须要用实体机吗?
A3:推荐使用实体机,性能更好。虚拟机也可以,估计你某个步骤出错了。请提供以下,你使用的具体镜像。

Q4:我用的虚拟机,怎么安装QGC地面站呢,直接把这个文件QGroundControl.AppImage拷贝到虚拟机桌面吗?以下命令是直接进入终端输入吗? sudo usermod -a -G dialout $USER sudo apt-get remove modemmanager -y sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-libav -y chmod +x ./QGroundControl.AppImage ./QGroundControl.AppImage (or double click)
我进行到这一步chmod +x ./QGroundControl.AppImage ,会提示chmod: cannot access \'./QGroundControl.AppImage\': No such file or directory
A4:chmod命令要sudo权限,./命令要是这个文件是可以运行的。你sudo chmod +x QGroundControl.AppImage,就好了

Q5:请问为啥我QGC放在桌面,可以打开。但是在执行roslaunch simulation obstacle_avoidance_2Dlaser_vfh_px4.launch的时候,QGC无法连接,显示waiting for vehicle connection;还有就是roslaunch simulation circular_px4.launch,显示RLException: [circular_px4.launch] is neither a launch file in package [simulation] nor is [simulation] a launch file name The traceback for the exception was written to the log file
source source_enviroment.sh, 已经配置了环境路径, 这个roslaunch simulation obstacle_avoidance_2Dlaser_vfh_px4.launch可以执行,就是无法连接QGC
我在从Windows拷贝3.5.6版本QGC到虚拟机的时候,直接把原来的3.5.4复制了,是不是会有什么问题?
A5:sudo apt-get remove modemmanager -y 这个语句看你执行没有如果拷贝复制不当,导致可执行文件需要高的可执行权限,也会有问题,还有 ubuntu下下载最新的QGC,或者用我们文件夹里面提供的。

Q6:segmentation fault
运行画圈圈程序时,gazebo一直卡住不动
启动 roslaunch simulation circular_px4.launch ,之后一直卡在Calling service /gazebo/spawn_sdf_model,过不去,一会[ WARN] [1582258310.586639825]: CMD: Command 400 -- wait ack timeout,之后在一个窗口切换模式,arm,之后就出现MODE: Unsupported FCU
A6:这是因为模型加载的问题,没有放到合适的目录

Q7:执行roslaunch出现[circular_px4.launch] is neither a launch file in package [simulation] nor is [simulation] a launch file name错误
A7:没有找到包,都是没有执行source的缘故,首次启动GAZEBO有点慢,还有就是确保内存在8G以上,我所使用的物理机跑这些仿真,内存使用率在50%,用的8G内存。最好物理机,或者高配的虚拟机,要不然会出现timeout的问题。
Q8:这个能装在虚拟机里面么?
A8:可以如果电脑性能比较好的化,但是我们还是推荐安装双系统,win10+ubuntu
Q9:请问在哪里设置飞机的起点坐标
A9:代码里面,原点坐标一般是解锁位置。home点可以通过mavlink 指令设置。
Q10:多进程和多线程有什么可以推荐的基础视频学习吗
A10:如果学习C++的化,在后面一般会讲这个。网上找到一些网站分享如下:https://www.runoob.com/cplusplus/cpp-multithreading.html 在ubunut命令行中直接编译执行,就可以看到效果。



扫一扫浏览分享
回复

使用道具 举报

110

阿木币

0

精华

142 小时

在线时间

技术大V

Rank: 4

发表于 2020-4-1 16:31:06
{:4_88:}{:4_88:}{:4_88:}赞一个!!!
回复

使用道具 举报

0

阿木币

0

精华

182 小时

在线时间

技术大V

Rank: 4

发表于 2020-4-3 13:50:39
这个必须顶
回复 点赞

使用道具 举报

3

阿木币

0

精华

6 小时

在线时间

应届白菜

Rank: 1

发表于 2020-4-7 15:20:52
使用视觉SLAM作为位置估计,没带GPS的px4怎么获取来自视觉SLAM的信息?
回复 点赞

使用道具 举报

131

阿木币

0

精华

272 小时

在线时间

管理员

Rank: 9Rank: 9Rank: 9

发表于 2020-4-7 23:34:43
ct8080808 发表于 2020-4-7 15:20
使用视觉SLAM作为位置估计,没带GPS的px4怎么获取来自视觉SLAM的信息?

视觉SLAM的位置信息通过串口的mavlink协议发送给飞控,飞控就知道了位置信息。
我不为己,谁人为我,但我只为己,那我又是谁?
回复 点赞

使用道具 举报

3

阿木币

0

精华

6 小时

在线时间

应届白菜

Rank: 1

发表于 2020-4-8 17:10:19
amov_msq 发表于 2020-4-7 23:34
视觉SLAM的位置信息通过串口的mavlink协议发送给飞控,飞控就知道了位置信息。 ...

飞控接收位置信息的接口是什么?
回复 点赞

使用道具 举报

131

阿木币

0

精华

272 小时

在线时间

管理员

Rank: 9Rank: 9Rank: 9

发表于 2020-4-9 08:57:25
ct8080808 发表于 2020-4-8 17:10
飞控接收位置信息的接口是什么?

飞控的数传1口,数传2口都可以
我不为己,谁人为我,但我只为己,那我又是谁?
回复 点赞

使用道具 举报

3

阿木币

0

精华

6 小时

在线时间

应届白菜

Rank: 1

发表于 2020-4-10 20:36:06
amov_msq 发表于 2020-4-9 08:57
飞控的数传1口,数传2口都可以

不不不,我的意思的软件的接口,板载电脑通过mavros和飞控进行连接 ,然后发布的关于位置信息的软件接口是哪一个,哪一个消息?
回复 点赞

使用道具 举报

3

阿木币

0

精华

11 小时

在线时间

应届白菜

Rank: 1

发表于 2020-4-10 23:49:28
本帖最后由 nescat 于 2020-4-11 00:15 编辑

你好,我在ubuntu18.04_20-02-12.iso镜像里执行 make px4_sitl_default gazebo,每次发生同样的错误 ,make px4_sitl_default可以通过
[3/7] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- Using C++17 compiler
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   thread
--   system
--   filesystem
--   program_options
--   regex
--   iostreams
--   date_time
--   chrono
--   atomic
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0")
-- Boost version: 1.65.1
-- Looking for OGRE...
-- Found Ogre Ghadamon (1.9.0)
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread (found suitable version "3.0.0", minimum required is "2.3.0")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.2.5
-- Checking for module 'uuid'
--   Found uuid, version 2.31.1
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 6.0.0
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- FreeImage.pc not found, we will search for FreeImage_INCLUDE_DIRS and FreeImage_LIBRARIES
-- Checking for module 'gts'
--   Found gts, version 0.7.6
-- Checking for module 'libswscale'
--   Found libswscale, version 4.8.100
-- Checking for module 'libavdevice >= 56.4.100'
--   Found libavdevice , version 57.10.100
-- Checking for module 'libavformat'
--   Found libavformat, version 57.83.100
-- Checking for module 'libavcodec'
--   Found libavcodec, version 57.107.100
-- Checking for module 'libavutil'
--   Found libavutil, version 55.78.100
-- Checking for module 'jsoncpp'
--   Found jsoncpp, version 1.7.4
-- Checking for module 'yaml-0.1'
--   Found yaml-0.1, version 0.1.7
-- Checking for module 'libzip'
--   Found libzip, version 1.1.2
-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- catkin DISABLED
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread;-lpthread (found version "3.0.0")
Gazebo version: 9.13
-- Configuring done
-- Generating done
-- Build files have been written to: /home/amov/project/some/Firmware/build/px4_sitl_default/build_gazebo
[4/7] Performing build step for 'sitl_gazebo'
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-build
cd /home/amov/project/some/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/cmake --build . && /usr/bin/cmake -E touch /home/amov/project/some/Firmware/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-build
[1/64] Building CXX object CMakeFiles/sensor_msgs.dir/Pressure.pb.cc.o
[2/64] Building CXX object CMakeFiles/sensor_msgs.dir/MagneticField.pb.cc.o
[3/64] Building CXX object CMakeFiles/nav_msgs.dir/Odometry.pb.cc.o
[4/64] Building CXX object CMakeFiles/gazebo_magnetometer_plugin.dir/src/geo_mag_declination.cpp.o
[5/64] Building CXX object CMakeFiles/gazebo_motor_model.dir/src/gazebo_motor_model.cpp.o
FAILED: CMakeFiles/gazebo_motor_model.dir/src/gazebo_motor_model.cpp.o
/usr/bin/c++  -DLIBBULLET_VERSION=2.87 -DLIBBULLET_VERSION_GT_282 -Dgazebo_motor_model_EXPORTS -isystem /usr/include/gazebo-9 -isystem /usr/include/bullet -isystem /usr/include/simbody -isystem /usr/include/sdformat-6.2 -isystem /usr/include/ignition/math4 -isystem /usr/include/OGRE -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/ignition/transport4 -isystem /usr/include/ignition/msgs1 -isystem /usr/include/ignition/common1 -isystem /usr/include/ignition/fuel_tools1 -I/home/amov/project/some/Firmware/Tools/sitl_gazebo/include -I. -I/usr/include/eigen3 -I/usr/include/eigen3/eigen3 -I/usr/include/gazebo-9/gazebo/msgs -I/home/amov/project/some/Firmware/mavlink/include -I/usr/include/Paging -isystem /usr/include/opencv -I/home/amov/project/some/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include -isystem /usr/include/uuid -isystem /usr/include/x86_64-linux-gnu -Wno-deprecated-declarations -fPIC   -I/usr/include/uuid -I/usr/include/x86_64-linux-gnu -std=gnu++1z -MD -MT CMakeFiles/gazebo_motor_model.dir/src/gazebo_motor_model.cpp.o -MF CMakeFiles/gazebo_motor_model.dir/src/gazebo_motor_model.cpp.o.d -o CMakeFiles/gazebo_motor_model.dir/src/gazebo_motor_model.cpp.o -c /home/amov/project/some/Firmware/Tools/sitl_gazebo/src/gazebo_motor_model.cpp
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
[6/64] Building CXX object CMakeFiles/gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o
FAILED: CMakeFiles/gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o
/usr/bin/c++  -DLIBBULLET_VERSION=2.87 -DLIBBULLET_VERSION_GT_282 -Dgazebo_mavlink_interface_EXPORTS -isystem /usr/include/gazebo-9 -isystem /usr/include/bullet -isystem /usr/include/simbody -isystem /usr/include/sdformat-6.2 -isystem /usr/include/ignition/math4 -isystem /usr/include/OGRE -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/ignition/transport4 -isystem /usr/include/ignition/msgs1 -isystem /usr/include/ignition/common1 -isystem /usr/include/ignition/fuel_tools1 -I/home/amov/project/some/Firmware/Tools/sitl_gazebo/include -I. -I/usr/include/eigen3 -I/usr/include/eigen3/eigen3 -I/usr/include/gazebo-9/gazebo/msgs -I/home/amov/project/some/Firmware/mavlink/include -I/usr/include/Paging -isystem /usr/include/opencv -I/home/amov/project/some/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include -isystem /usr/include/uuid -isystem /usr/include/x86_64-linux-gnu -Wno-deprecated-declarations -fPIC   -I/usr/include/uuid -I/usr/include/x86_64-linux-gnu -std=gnu++1z -MD -MT CMakeFiles/gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o -MF CMakeFiles/gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o.d -o CMakeFiles/gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o -c /home/amov/project/some/Firmware/Tools/sitl_gazebo/src/gazebo_mavlink_interface.cpp
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
[7/64] Building CXX object CMakeFiles/LiftDragPlugin.dir/src/liftdrag_plugin/liftdrag_plugin.cpp.o
[8/64] Building CXX object CMakeFiles/gazebo_barometer_plugin.dir/src/gazebo_barometer_plugin.cpp.o
[9/64] Building CXX object CMakeFiles/gazebo_magnetometer_plugin.dir/src/gazebo_magnetometer_plugin.cpp.o
[10/64] Building CXX object CMakeFiles/gazebo_multirotor_base_plugin.dir/src/gazebo_multirotor_base_plugin.cpp.o
ninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.
Makefile:193: recipe for target 'px4_sitl_default' failed
make: *** [px4_sitl_default] Error 1


回复 点赞

使用道具 举报

20

阿木币

0

精华

10 小时

在线时间

应届白菜

Rank: 1

发表于 2020-4-11 12:22:25
nescat 发表于 2020-4-10 23:49
你好,我在ubuntu18.04_20-02-12.iso镜像里执行 make px4_sitl_default gazebo,每次发生同样的错误 ,make ...

你这是因为内存不够了,可以加大内存或者创建交换分区来解决。
回复 点赞

使用道具 举报

下一页 »
12345下一页
返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表