Make a tutorial to compile only single examples under linux for OSDK

已完成

评论

6 条评论

  • DJI Developer Support
    Sorry, the OSDK sample is mainly used to help developers understand the functions and usage of OSDK. The sample may be difficult to cover the developer’s application project. Developers can configure the code project and development environment according to the application functions they use. CmakeLists is also corresponding works with specific code project. For example, dji_log.h cannot be found when an error is reported, and the header file path needs to be added to CmakeList.txt ~/Onboard-SDK-master/logger/inc/dji_log.hpp Or execute “make install ” under the sample project, all OSDK API header files and library files will be installed to the default path: /usr/local/include/
    0
    评论操作 固定链接
  • Corrado Steri

    Useless...................

    0
    评论操作 固定链接
  • Corrado Steri

    If this is all the help you give to dev, you can shut down the site because you guys are really useless.

    Since what i asked is one of the most asked questions maybe some pages should be done to help out. Give some standard CMakeLists files with standard environment (for example if osdk is installed).

    People coming from Python , Java, Javascript, struggle a bit with the setup needed for a C++ program to be compiled and run. As a matter of fact i really do not understand why you didn't make a Python version too.

    If all you want to do is sell professional advice than, as said, you can shut down the site.

    0
    评论操作 固定链接
  • Corrado Steri

    Tested you CMakelists.txt from https://github.com/dji-sdk/Onboard-SDK/issues/770 for telemetry and it works, do you know what adjustments should be done to have it working for flight-control ??
    If i use same CMakeLists.txt as the one used to build telemetry it fails at the end when linking CXX executable.
    I am trying to understand what each needs.

    Scanning dependencies of target djiosdk-flightcontrol-sample
    [ 14%] Building CXX object CMakeFiles/djiosdk-flightcontrol-sample.dir/home/pi/Onboard-SDK/sample/platform/linux/common/dji_linux_environment.cpp.o
    [ 28%] Building CXX object CMakeFiles/djiosdk-flightcontrol-sample.dir/home/pi/Onboard-SDK/sample/platform/linux/common/dji_linux_helpers.cpp.o
    [ 42%] Building C object CMakeFiles/djiosdk-flightcontrol-sample.dir/home/pi/Onboard-SDK/sample/platform/linux/hal/osdkhal_linux.c.o
    [ 57%] Building C object CMakeFiles/djiosdk-flightcontrol-sample.dir/home/pi/Onboard-SDK/sample/platform/linux/osal/osdkosal_linux.c.o
    [ 71%] Building CXX object CMakeFiles/djiosdk-flightcontrol-sample.dir/flight_control_sample.cpp.o
    [ 85%] Building CXX object CMakeFiles/djiosdk-flightcontrol-sample.dir/main.cpp.o
    [100%] Linking CXX executable djiosdk-flightcontrol-sample
    /usr/bin/ld: CMakeFiles/djiosdk-flightcontrol-sample.dir/main.cpp.o: in function main': /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:72: undefined reference to FlightSample::FlightSample(DJI::OSDK::Vehicle*)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:95: undefined reference to FlightSample::monitoredTakeoff(int)' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:96: undefined reference to FlightSample::monitoredLanding(int)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:101: undefined reference to FlightSample::monitoredTakeoff(int)' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:104: undefined reference to FlightSample::moveByPositionOffset(DJI::OSDK::Telemetry::Vector3f const&, float, float, float)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:106: undefined reference to FlightSample::moveByPositionOffset(DJI::OSDK::Telemetry::Vector3f const&, float, float, float)' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:108: undefined reference to FlightSample::moveByPositionOffset(DJI::OSDK::Telemetry::Vector3f const&, float, float, float)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:110: undefined reference to FlightSample::monitoredLanding(int)' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:118: undefined reference to FlightSample::monitoredTakeoff(int)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:123: undefined reference to FlightSample::moveByPositionOffset(DJI::OSDK::Telemetry::Vector3f const&, float, float, float)' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:126: undefined reference to FlightSample::moveByPositionOffset(DJI::OSDK::Telemetry::Vector3f const&, float, float, float)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:129: undefined reference to FlightSample::setNewHomeLocation(int)' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:132: undefined reference to FlightSample::setGoHomeAltitude(unsigned short, int)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:135: undefined reference to FlightSample::moveByPositionOffset(DJI::OSDK::Telemetry::Vector3f const&, float, float, float)' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:140: undefined reference to FlightSample::goHomeAndConfirmLanding(int)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:149: undefined reference to FlightSample::monitoredTakeoff(int)' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:152: undefined reference to FlightSample::velocityAndYawRateCtrl(DJI::OSDK::Telemetry::Vector3f const&, float, unsigned int)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:154: undefined reference to FlightSample::emergencyBrake()' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:156: undefined reference to FlightSample::velocityAndYawRateCtrl(DJI::OSDK::Telemetry::Vector3f const&, float, unsigned int)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:158: undefined reference to FlightSample::emergencyBrake()' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:160: undefined reference to FlightSample::velocityAndYawRateCtrl(DJI::OSDK::Telemetry::Vector3f const&, float, unsigned int)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:162: undefined reference to FlightSample::emergencyBrake()' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:164: undefined reference to FlightSample::velocityAndYawRateCtrl(DJI::OSDK::Telemetry::Vector3f const&, float, unsigned int)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:166: undefined reference to FlightSample::emergencyBrake()' /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:169: undefined reference to FlightSample::monitoredLanding(int)'
    /usr/bin/ld: /home/pi/Onboard-SDK/sample/platform/linux/flight-control/main.cpp:178: undefined reference to `FlightSample::~FlightSample()'
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/djiosdk-flightcontrol-sample.dir/build.make:183: djiosdk-flightcontrol-sample] Error 1
    make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/djiosdk-flightcontrol-sample.dir/all] Error 2
    make: *** [Makefile:84: all] Error 2

    A bunch of undefined references to FlightSample.

    0
    评论操作 固定链接
  • Barathwaja S

    Corrado Steri True, there isn't any proper example in any of the SDK's and using C/C++ only to implement or build something :|

    0
    评论操作 固定链接
  • Corrado Steri

    DJI Engineers are a bunch of yellow rats, FUCK YOU ALL!!!

    0
    评论操作 固定链接

请先登录再写评论。