MAVSDK: takeoff_and_land error (fatal error: plugin_base.h: No such file or directory)
I coppied and pasted example code from “https://mavsdk.mavlink.io/develop/en/examples/takeoff_and_land.html” to my “~/catkin_ws/src/droneControl/localization.cpp” folder. When I build catkin_ws with “catkin build” I take error like that:
**`
- Errors << droneControl:make /home/yusufozben/catkin_ws/logs/droneControl/build.make.025.log
- In file included from /home/yusufozben/catkin_ws/src/droneControl/localization.cpp:9:0:
- /usr/include/mavsdk/plugins/action/action.h:6:10: fatal error: plugin_base.h: No such file or directory
- #include “plugin_base.h”
-
^~~~~~~~~~~~~~~
- compilation terminated.
- make[2]: *** [CMakeFiles/localization.dir/localization.cpp.o] Error 1
- make[1]: *** [CMakeFiles/localization.dir/all] Error 2
- make: *** [all] Error 2
- cd /home/yusufozben/catkin_ws/build/droneControl; catkin build --get-env droneControl | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
`**
mavsdk location : “/usr/include/mavsdk”
I try to add plugin_base.h directory to cmakefile but it doesn’t run. I also try to do this “https://github.com/mavlink/MAVSDK/issues/802”.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18
To anyone else that has issues with this. The problem is the main branch is later than the packages. So the Quick Start example should be something like this:
–Get latest published version (at this time) wget https://github.com/mavlink/MAVSDK/releases/download/v1.4.6/libmavsdk-dev_1.4.6_ubuntu20.04_amd64.deb sudo dpkg -i libmavsdk-dev_1.4.6_ubuntu20.04_amd64.deb
–Get repo and set to tag matching release git clone https://github.com/mavlink/MAVSDK.git --recursive cd MAVSDK git checkout tags/v1.4.3 -b 1.4
–then examples should work cd examples/takeoff_and_land/ cmake -Bbuild -H. cmake --build build -j4
It was an only typo in ‘CMakeLists.txt’. After coping and pasting ‘CMakeFiles.txt’ from ‘https://github.com/mavlink/MAVSDK/blob/develop/example/takeoff_land/CMakeLists.txt’, the error was fixed.
@maximusron I’m lacking context here. Please describe the problem using a minimum example with some steps on how to reproduce it. Thank you.
Try adding -I/usr/include/mavsdk to your compile options in the CMake file, and
to your target link libraries.
From: Ashwin Disa @.> Sent: 24 January 2022 07:23 PM To: mavlink/MAVSDK @.> Cc: AARON JOMY - 200905362 @.>; Comment @.> Subject: Re: [mavlink/MAVSDK] takeoff_and_land error (fatal error: plugin_base.h: No such file or directory) (#992)
I’m facing the same exact issue, the above solutions does not solve it. Please help!
In file included from /home/ashd/MAVSDK/examples/takeoff_and_land/takeoff_and_land.cpp:8: /usr/include/mavsdk/plugins/action/action.h:16:10: fatal error: plugin_base.h: No such file or directory #include “plugin_base.h” ^~~~~~~~~~~~~~~ compilation terminated. CMakeFiles/takeoff_and_land.dir/build.make:62: recipe for target ‘CMakeFiles/takeoff_and_land.dir/takeoff_and_land.cpp.o’ failed make[2]: *** [CMakeFiles/takeoff_and_land.dir/takeoff_and_land.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/takeoff_and_land.dir/all’ failed make[1]: *** [CMakeFiles/takeoff_and_land.dir/all] Error 2 Makefile:83: recipe for target ‘all’ failed make: *** [all] Error 2
— Reply to this email directly, view it on GitHubhttps://github.com/mavlink/MAVSDK/issues/992#issuecomment-1020123483, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASDITRMP3INNTZX3KQK75DDUXVKU3ANCNFSM4KXANWCA. You are receiving this because you commented.Message ID: @.***>
You’ll find plenty of CMakeLists in the examples folder: https://github.com/mavlink/MAVSDK/tree/main/examples