catkin build px4_control失败

catkin build px4_control失败

笔者是在虚拟机下运行的,Ubuntu18.04的系统,在摸索px4仿真的过程中遇到的错误

以下是报错的信息,我把它粘帖出来方便查找

[build] Found '17' packages in 0.0 seconds.                                    
[build] Package table is up to date.                                           
Starting  >>> px4_control                                                      
_______________________________________________________________________________
Errors     << px4_control:make /home/qi/volans/logs/px4_control/build.make.001.log
In file included from /home/qi/volans/src/modules/px4_control/src/landing_quadrotor.cpp:8:0:
/home/qi/volans/src/modules/px4_control/include/landing_quadrotor.h:3:10: fatal error: ar_track_alvar_msgs/AlvarMarkers.h: 没有那个文件或目录
 #include <ar_track_alvar_msgs/AlvarMarkers.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/landing_quadrotor_node.dir/src/landing_quadrotor.cpp.o] Error 1
make[1]: *** [CMakeFiles/landing_quadrotor_node.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
make: *** [all] Error 2
cd /home/qi/volans/build/px4_control; catkin build --get-env px4_control | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
...............................................................................
Failed     << px4_control:make           [ Exited with code 2 ]                
Failed    <<< px4_control                [ 35.9 seconds ]                      
[build] Summary: 0 of 1 packages succeeded.                                    
[build]   Ignored:   16 packages were skipped or are blacklisted.              
[build]   Warnings:  None.                                                     
[build]   Abandoned: None.                                                     
[build]   Failed:    1 packages failed.                                        
[build] Runtime: 36.0 seconds total. 

 

解决办法:缺少依赖库,安装即可

sudo apt-get install ros-melodic-navigation

如果安装还是失败了就安装这个

sudo apt-get install ros-melodic-ar-track-alvar*

可能要编译两次才能成功。

 

如果有用请留下您的评论

posted @ 2021-02-24 21:00  Rubyen2333  阅读(359)  评论(0编辑  收藏  举报