Open soaring-filip opened 1 month ago
I got lucky and guessed this workaround
set(GREMSY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/PayloadSdk)
add_subdirectory(${GREMSY_DIR})
target_include_directories(gremsy_node PUBLIC
# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
# $<INSTALL_INTERFACE:include>
${GREMSY_DIR}/libs/mavlinkInterface/libs/inc/mavlink/v2.0
${GREMSY_DIR}/libs/third-party/mavlink/include
)
target_link_libraries(gremsy_node
${GREMSY_DIR}/libs/libPayloadSDK.a
)
Can you please post a better solution if you have one? I want the major build (my cmake file) to build the libPayloadSdk.a as well, without having to do cmake . && make
from the package itself and that's still missing.
PayloadSDK repository has CMakeLists to build it into libPayloadSDK.a.
You can easily integrate PayloadSDK into your ROS workspace by add 2 below lines to /root/ros2_ws/src/gremsy-interface/CMakeLists.txt
set(PAYLOADSDKLIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/PayloadSdk/libs)
include_directories(${PAYLOADSDKLIB_DIR})
The simply directory include throws issues with mavlinks on my end
gremsy-interface/include/GremsyPayloadSdk/libs/payloadsdk.h:5:10: fatal error: common/mavlink.h: No such file or directory
5 | #include <common/mavlink.h>
Also, I already had this added: include_directories(include)
and the payloadsdk is in the include folder, is there another config I'm missing?
Hi, I've been having trouble including the payloadSdInterface into a ROS project. Here's the error output during build.
I added this to my CMakeLists.txt
add_subdirectory(include/PayloadSdk)
The error is surprinsing because all files are there andcmake . && make
in the sdk repo work just fine.My mavsdk is installed through
I'd welcome ideas on how to approach this, thanks. Filip