umdlife / psdk_ros2

This repository is a ROS 2 wrapper for the DJI PSDK libraries.
https://umdlife.github.io/psdk_ros2/documentation/Introduction.html
Mozilla Public License 2.0
69 stars 21 forks source link

Errors when including some libraries #149

Open tiagoassp opened 1 week ago

tiagoassp commented 1 week ago

Morning, I am trying to build upon your work and migrate Onboard SDK to ROS2. I can include all types of libraries, however, whenever I try to include or I get the following errors:

in function `__static_initialization_and_destruction_0(int, int)':

/usr/bin/ld: /home/tiagoassp/ros2_ws/build/inesctec_ros2/_deps/onboard_sdk-src/osdk-core/api/inc/dji_version.hpp:107: undefined reference to `DJI::OSDK::Version::FW(unsigned char, unsigned char, unsigned char, unsigned char)'

/home/tiagoassp/ros2_ws/build/inesctec_ros2/_deps/onboard_sdk-src/osdk-core/utility/inc/dji_singleton.hpp:80: undefined reference to `DJI::OSDK::Log::Log(Mutex*)'

I was wondering if you ever came across this sort of error while you were developing your code. I will attach my CMake for your evaluation, if you'd be so kind. CMakeLists.txt

Thanks!

biancabnd commented 2 days ago

Hi @tiagoassp, I gave a quick look at your file. From what I see you have a linking issue with this library. I see you set the target directory ${onboard_sdk_SOURCE_DIR}/sample/platform/linux/common/ but I don't see any install command of that directory. Perhaps try to follow the same structure as in the Cmakelist we provide in this package. Let me know if it works!