按照官方的一步步来没问题,至少我顺利地到达了样例生成。有几个小插曲记录下
在这里下载手册如何使用OnboardSDK
在这里下载SDK Ubuntu版非ROS源码的各种版本OnboardSDKgit分支
M600、A3/N3 最高仅支持OSDK 3.9;M210 V2系列无人机支持OSDK 3.9 及以上版本;M300 RTK 支持OSDK 4.0 及以上版本。
官方推荐编译器
Ubuntu Linux
Toolchain
To build standalone Linux applications based on the OSDK, you need:
A supported C++ compiler - currently only GCC (Tested with gcc 4.8.1/5.3.1)
A bash shell
CMake >= 2.8
A modern Linux distribution
(Optional) Libusb library for Advanced Sensing feature on M210
但是我用的是以下版本,没啥问题
kobosp@KOBOSPG400u:~$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
kobosp@KOBOSPG400u:~$ cmake --version
cmake version 3.5.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
kobosp@KOBOSPG400u:~$
还有这个别忘了
Permissions
You need to add your user to the dialout group to obtain read/write permissions for the uart communication; follow these steps to do so:
Type
sudo usermod -a -G dialout $USER in a terminal
Log out of your user account and log in again for the permissions to take effect.
1:ttyusb端口一直报错,但是查看UserConfig.txt端口与位置都没有写错
device : /dev/ttyUSB0
baudrate : 230400
ERRORLOG/1 @ init, L61: ...Failed to start serial
Comms appear to be incorrectly set up. Exiting.
段错误 (核心已转储)
解决方法:
改变ttyUSB0的执行权限
# sudo chmod 777 /dev/ttyUSB0 (直接修改设备文件权限,是否存在安全问题?)
问题排除记录
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ ls /sys/bus/usb/devices
1-0:1.0 1-1:1.0 1-1.3:1.0 1-1.3:1.2 1-1.4 2-0:1.0 2-1:1.0 2-1.4:1.0 3-0:1.0 3-1:1.0 4-0:1.0 4-2:1.0 4-2:1.2 usb2 usb4
1-1 1-1.3 1-1.3:1.1 1-1.3:1.3 1-1.4:1.0 2-1 2-1.4 2-1.4:1.1 3-1 3-1:1.1 4-2 4-2:1.1 usb1 usb3
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ ls -lh /dev/serial/by-id/
总用量 0
lrwxrwxrwx 1 root root 13 1月 28 21:07 usb-1a86_USB2.0-Serial-if00-port0 -> ../../ttyUSB0
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ lsusb
Bus 002 Device 003: ID 04f2:b3bb Chicony Electronics Co., Ltd
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 004: ID 105b:e065 Foxconn International, Inc. BCM43142A0 Bluetooth module
Bus 001 Device 009: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 009: ID 04e8:6864 Samsung Electronics Co., Ltd GT-I9070 (network tethering, USB debugging enabled)
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ ls -lh /dev/serial/by-id/
总用量 0
lrwxrwxrwx 1 root root 13 1月 28 21:07 usb-1a86_USB2.0-Serial-if00-port0 -> ../../ttyUSB0
kobosp@KOBOSPG400u:/home$ sudo chmod 777 /dev/ttyUSB0
[sudo] kobosp 的密码:
解决。
2:A3新设备NEW_DEVICE_ERROR
NEW_DEVICE_ERROR表示激活无法验证您的应用ID和激活服务器的密钥 . 这可能是因为ID和密钥不匹配,但通常是因为DJI Go未打开或没有连接到Internet .解决方式:把A3,LB2电断了,重新通电启动DJI go
编译过程
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9$ mkdir build
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9$ cd build
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ cmake ..
程序“cmake”尚未安装。 您可以使用以下命令安装:
sudo apt install cmake
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ sudo apt-get cmake
[sudo] kobosp 的密码:
E: 无效的操作 cmake
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ sudo apt-get install cmake
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
snapd-login-service
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
cmake-data libjsoncpp1
建议安装:
codeblocks eclipse ninja-build
下列【新】软件包将被安装:
cmake cmake-data libjsoncpp1
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 3,817 kB 的归档。
解压缩后会消耗 20.5 MB 的额外空间。
您希望继续执行吗? [Y/n] Y
获取:1 http://mirrors.ustc.edu.cn/ubuntu xenial-updates/main amd64 cmake-data all 3.5.1-1ubuntu3 [1,121 kB]
获取:2 http://mirrors.ustc.edu.cn/ubuntu xenial/main amd64 libjsoncpp1 amd64 1.7.2-1 [73.0 kB]
获取:3 http://mirrors.ustc.edu.cn/ubuntu xenial-updates/main amd64 cmake amd64 3.5.1-1ubuntu3 [2,623 kB]
已下载 3,817 kB,耗时 3秒 (1,127 kB/s)
正在选中未选择的软件包 cmake-data。
(正在读取数据库 ... 系统当前共安装有 234451 个文件和目录。)
正准备解包 .../cmake-data_3.5.1-1ubuntu3_all.deb ...
正在解包 cmake-data (3.5.1-1ubuntu3) ...
正在选中未选择的软件包 libjsoncpp1:amd64。
正准备解包 .../libjsoncpp1_1.7.2-1_amd64.deb ...
正在解包 libjsoncpp1:amd64 (1.7.2-1) ...
正在选中未选择的软件包 cmake。
正准备解包 .../cmake_3.5.1-1ubuntu3_amd64.deb ...
正在解包 cmake (3.5.1-1ubuntu3) ...
正在处理用于 man-db (2.7.5-1) 的触发器 ...
正在处理用于 libc-bin (2.23-0ubuntu11.2) 的触发器 ...
正在设置 cmake-data (3.5.1-1ubuntu3) ...
正在设置 libjsoncpp1:amd64 (1.7.2-1) ...
正在设置 cmake (3.5.1-1ubuntu3) ...
正在处理用于 libc-bin (2.23-0ubuntu11.2) 的触发器 ...
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ cmake --version
cmake version 3.5.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ cmake ..-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Compiling without WaypointV2 Core
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kobosp/CLionProjects/Onboard-SDK-3.9/build
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ make
Scanning dependencies of target djiosdk-core
[ 1%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_mobile_device.cpp.o
[ 2%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_camera_manager.cpp.o
[ 3%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_hotpoint.cpp.o
[ 3%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_mobile_communication.cpp.o
[ 4%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_camera.cpp.o
[ 5%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_mfio.cpp.o
[ 6%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_psdk_manager.cpp.o
[ 7%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_virtual_rc.cpp.o
[ 8%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_vehicle.cpp.o
[ 9%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_version.cpp.o
[ 10%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_command.cpp.o
[ 11%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_waypoint.cpp.o
[ 12%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_hardware_sync.cpp.o
[ 13%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_control.cpp.o
[ 13%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_broadcast.cpp.o
[ 14%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_error.cpp.o
[ 15%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_gimbal.cpp.o
[ 16%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_payload_device.cpp.o
[ 17%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_ack.cpp.o
[ 18%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_subscription.cpp.o
[ 19%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_mission_manager.cpp.o
[ 20%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_flight_controller.cpp.o
[ 21%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/payload/dji_psdk_module.cpp.o
[ 22%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/payload/dji_payload_base.cpp.o
[ 23%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/payload/dji_payload_link.cpp.o
[ 23%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/payload/dji_camera_module.cpp.o
[ 24%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/flight/dji_flight_assistant_module.cpp.o
[ 25%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/flight/dji_flight_actions_module.cpp.o
[ 26%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/flight/dji_flight_link.cpp.o
[ 27%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/protocol/src/dji_protocol_base.cpp.o
[ 28%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/protocol/src/dji_aes.cpp.o
[ 29%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/protocol/src/dji_open_protocol.cpp.o
[ 30%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/hal/src/dji_log.cpp.o
[ 31%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/hal/src/dji_platform_manager.cpp.o
[ 32%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/hal/src/dji_thread_manager.cpp.o
[ 33%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/hal/src/dji_hard_driver.cpp.o
[ 33%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/hal/src/dji_memory.cpp.o
[ 34%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/utility/src/dji_circular_buffer.cpp.o
[ 35%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/utility/src/dji_singleton.cpp.o
[ 36%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/platform/default/src/dji_memory_default.cpp.o
[ 37%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/platform/linux/src/linux_serial_device.cpp.o
[ 38%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/platform/linux/src/posix_thread.cpp.o
[ 39%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/platform/linux/src/posix_thread_manager.cpp.o
[ 40%] Linking CXX static library ../libs/libdjiosdk-core.a
[ 40%] Built target djiosdk-core
Scanning dependencies of target djiosdk-cameragimbal-sample
[ 41%] Building CXX object sample/platform/linux/camera-gimbal/CMakeFiles/djiosdk-cameragimbal-sample.dir/camera_gimbal_sample.cpp.o
[ 42%] Building CXX object sample/platform/linux/camera-gimbal/CMakeFiles/djiosdk-cameragimbal-sample.dir/main.cpp.o
[ 43%] Building CXX object sample/platform/linux/camera-gimbal/CMakeFiles/djiosdk-cameragimbal-sample.dir/__/common/dji_linux_environment.cpp.o
[ 44%] Building CXX object sample/platform/linux/camera-gimbal/CMakeFiles/djiosdk-cameragimbal-sample.dir/__/common/dji_linux_helpers.cpp.o
[ 45%] Linking CXX executable ../../../../bin/djiosdk-cameragimbal-sample
[ 45%] Built target djiosdk-cameragimbal-sample
Scanning dependencies of target djiosdk-flightcontrol-sample
[ 46%] Building CXX object sample/platform/linux/flight-control/CMakeFiles/djiosdk-flightcontrol-sample.dir/main.cpp.o
[ 47%] Building CXX object sample/platform/linux/flight-control/CMakeFiles/djiosdk-flightcontrol-sample.dir/flight_control_sample.cpp.o
[ 48%] Building CXX object sample/platform/linux/flight-control/CMakeFiles/djiosdk-flightcontrol-sample.dir/__/common/dji_linux_environment.cpp.o
[ 48%] Building CXX object sample/platform/linux/flight-control/CMakeFiles/djiosdk-flightcontrol-sample.dir/__/common/dji_linux_helpers.cpp.o
[ 49%] Building CXX object sample/platform/linux/flight-control/CMakeFiles/djiosdk-flightcontrol-sample.dir/__/__/__/core/src/flight_sample.cpp.o
[ 50%] Linking CXX executable ../../../../bin/djiosdk-flightcontrol-sample
[ 50%] Built target djiosdk-flightcontrol-sample
Scanning dependencies of target djiosdk-mfio-sample
[ 51%] Building CXX object sample/platform/linux/mfio/CMakeFiles/djiosdk-mfio-sample.dir/main.cpp.o
[ 52%] Building CXX object sample/platform/linux/mfio/CMakeFiles/djiosdk-mfio-sample.dir/mfio_sample.cpp.o
[ 53%] Building CXX object sample/platform/linux/mfio/CMakeFiles/djiosdk-mfio-sample.dir/__/common/dji_linux_environment.cpp.o
[ 53%] Building CXX object sample/platform/linux/mfio/CMakeFiles/djiosdk-mfio-sample.dir/__/common/dji_linux_helpers.cpp.o
[ 54%] Linking CXX executable ../../../../bin/djiosdk-mfio-sample
[ 54%] Built target djiosdk-mfio-sample
Scanning dependencies of target djiosdk-mission-sample
[ 55%] Building CXX object sample/platform/linux/missions/CMakeFiles/djiosdk-mission-sample.dir/__/common/dji_linux_environment.cpp.o
[ 56%] Building CXX object sample/platform/linux/missions/CMakeFiles/djiosdk-mission-sample.dir/__/common/dji_linux_helpers.cpp.o
[ 57%] Building CXX object sample/platform/linux/missions/CMakeFiles/djiosdk-mission-sample.dir/main.cpp.o
[ 58%] Building CXX object sample/platform/linux/missions/CMakeFiles/djiosdk-mission-sample.dir/mission_sample.cpp.o
[ 59%] Linking CXX executable ../../../../bin/djiosdk-mission-sample
[ 59%] Built target djiosdk-mission-sample
Scanning dependencies of target djiosdk-mobile-sample
[ 60%] Building CXX object sample/platform/linux/mobile/CMakeFiles/djiosdk-mobile-sample.dir/main.cpp.o
[ 61%] Building CXX object sample/platform/linux/mobile/CMakeFiles/djiosdk-mobile-sample.dir/mobile_sample.cpp.o
[ 62%] Building CXX object sample/platform/linux/mobile/CMakeFiles/djiosdk-mobile-sample.dir/__/common/dji_linux_environment.cpp.o
[ 63%] Building CXX object sample/platform/linux/mobile/CMakeFiles/djiosdk-mobile-sample.dir/__/common/dji_linux_helpers.cpp.o
[ 63%] Building CXX object sample/platform/linux/mobile/CMakeFiles/djiosdk-mobile-sample.dir/__/flight-control/flight_control_sample.cpp.o
[ 64%] Building CXX object sample/platform/linux/mobile/CMakeFiles/djiosdk-mobile-sample.dir/__/camera-gimbal/camera_gimbal_sample.cpp.o
[ 65%] Building CXX object sample/platform/linux/mobile/CMakeFiles/djiosdk-mobile-sample.dir/__/missions/mission_sample.cpp.o
[ 66%] Linking CXX executable ../../../../bin/djiosdk-mobile-sample
[ 66%] Built target djiosdk-mobile-sample
Scanning dependencies of target djiosdk-telemetry-sample
[ 67%] Building CXX object sample/platform/linux/telemetry/CMakeFiles/djiosdk-telemetry-sample.dir/telemetry_sample.cpp.o
[ 68%] Building CXX object sample/platform/linux/telemetry/CMakeFiles/djiosdk-telemetry-sample.dir/main.cpp.o
[ 68%] Building CXX object sample/platform/linux/telemetry/CMakeFiles/djiosdk-telemetry-sample.dir/__/common/dji_linux_environment.cpp.o
[ 69%] Building CXX object sample/platform/linux/telemetry/CMakeFiles/djiosdk-telemetry-sample.dir/__/common/dji_linux_helpers.cpp.o
[ 70%] Linking CXX executable ../../../../bin/djiosdk-telemetry-sample
[ 70%] Built target djiosdk-telemetry-sample
Scanning dependencies of target djiosdk-logging-sample
[ 71%] Building CXX object sample/platform/linux/logging/CMakeFiles/djiosdk-logging-sample.dir/logging_sample.cpp.o
[ 72%] Building CXX object sample/platform/linux/logging/CMakeFiles/djiosdk-logging-sample.dir/main.cpp.o
[ 73%] Building CXX object sample/platform/linux/logging/CMakeFiles/djiosdk-logging-sample.dir/__/common/dji_linux_environment.cpp.o
[ 74%] Building CXX object sample/platform/linux/logging/CMakeFiles/djiosdk-logging-sample.dir/__/common/dji_linux_helpers.cpp.o
[ 75%] Linking CXX executable ../../../../bin/djiosdk-logging-sample
[ 75%] Built target djiosdk-logging-sample
Scanning dependencies of target time_sync_callback_sample
[ 76%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_callback_sample.dir/time_sync_callback_sample.cpp.o
[ 77%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_callback_sample.dir/__/common/dji_linux_environment.cpp.o
[ 78%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_callback_sample.dir/__/common/dji_linux_helpers.cpp.o
[ 79%] Linking CXX executable ../../../../bin/time_sync_callback_sample
[ 79%] Built target time_sync_callback_sample
Scanning dependencies of target time_sync_poll_sample
[ 80%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_poll_sample.dir/time_sync_poll_sample.cpp.o
[ 81%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_poll_sample.dir/__/common/dji_linux_environment.cpp.o
[ 82%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_poll_sample.dir/__/common/dji_linux_helpers.cpp.o
[ 83%] Linking CXX executable ../../../../bin/time_sync_poll_sample
[ 83%] Built target time_sync_poll_sample
Scanning dependencies of target djiosdk-payload-control-sample
[ 84%] Building CXX object sample/platform/linux/payload-3rd-party/CMakeFiles/djiosdk-payload-control-sample.dir/payload-control-sample.cpp.o
[ 85%] Building CXX object sample/platform/linux/payload-3rd-party/CMakeFiles/djiosdk-payload-control-sample.dir/main.cpp.o
[ 86%] Building CXX object sample/platform/linux/payload-3rd-party/CMakeFiles/djiosdk-payload-control-sample.dir/__/common/dji_linux_environment.cpp.o
[ 87%] Building CXX object sample/platform/linux/payload-3rd-party/CMakeFiles/djiosdk-payload-control-sample.dir/__/common/dji_linux_helpers.cpp.o
[ 88%] Linking CXX executable ../../../../bin/djiosdk-payload-control-sample
[ 88%] Built target djiosdk-payload-control-sample
Scanning dependencies of target camera_manager_async_sample
[ 88%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_async_sample.dir/main_async.cpp.o
[ 89%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_async_sample.dir/__/common/dji_linux_environment.cpp.o
[ 90%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_async_sample.dir/__/common/dji_linux_helpers.cpp.o
[ 91%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_async_sample.dir/__/__/__/core/src/camera_manager_async_sample.cpp.o
[ 92%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_async_sample.dir/__/__/__/core/src/flight_sample.cpp.o
[ 93%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_async_sample.dir/__/__/__/core/src/camera_manager_sync_sample.cpp.o
[ 94%] Linking CXX executable ../../../../bin/camera_manager_async_sample
[ 94%] Built target camera_manager_async_sample
Scanning dependencies of target camera_manager_sync_sample
[ 95%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_sync_sample.dir/main_sync.cpp.o
[ 96%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_sync_sample.dir/__/common/dji_linux_environment.cpp.o
[ 97%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_sync_sample.dir/__/common/dji_linux_helpers.cpp.o
[ 98%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_sync_sample.dir/__/__/__/core/src/camera_manager_async_sample.cpp.o
[ 98%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_sync_sample.dir/__/__/__/core/src/flight_sample.cpp.o
[ 99%] Building CXX object sample/platform/linux/payloads/CMakeFiles/camera_manager_sync_sample.dir/__/__/__/core/src/camera_manager_sync_sample.cpp.o
[100%] Linking CXX executable ../../../../bin/camera_manager_sync_sample
[100%] Built target camera_manager_sync_sample
运行样例过程
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build$ cd bin
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
ERRORLOG/1 @ _serialOpen, L181: cannot open device /dev/ttyUSB0
ERRORLOG/1 @ init, L61: ...Failed to start serial
Comms appear to be incorrectly set up. Exiting.
段错误 (核心已转储)
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
ERRORLOG/1 @ _serialOpen, L181: cannot open device /dev/ttyUSB0
ERRORLOG/1 @ init, L61: ...Failed to start serial
Comms appear to be incorrectly set up. Exiting.
段错误 (核心已转储)
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
ERRORLOG/1 @ _serialOpen, L181: cannot open device /dev/ttyUSB0
ERRORLOG/1 @ init, L61: ...Failed to start serial
Comms appear to be incorrectly set up. Exiting.
段错误 (核心已转储)
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
ERRORLOG/1 @ _serialOpen, L181: cannot open device /dev/ttyUSB0
ERRORLOG/1 @ init, L61: ...Failed to start serial
Comms appear to be incorrectly set up. Exiting.
段错误 (核心已转储)
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device ttyUSB0 with baudrate 230400...
ERRORLOG/1 @ _serialOpen, L181: cannot open device ttyUSB0
ERRORLOG/1 @ init, L61: ...Failed to start serial
Comms appear to be incorrectly set up. Exiting.
段错误 (核心已转储)
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device ../../ttyUSB0 with baudrate 230400...
ERRORLOG/1 @ _serialOpen, L181: cannot open device ../../ttyUSB0
ERRORLOG/1 @ init, L61: ...Failed to start serial
Comms appear to be incorrectly set up. Exiting.
段错误 (核心已转储)
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
ERRORLOG/1 @ _serialOpen, L181: cannot open device /dev/ttyUSB0
ERRORLOG/1 @ init, L61: ...Failed to start serial
Comms appear to be incorrectly set up. Exiting.
段错误 (核心已转储)
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device ../../../../../../dev/ttyUSB0 with baudrate 230400...
ERRORLOG/1 @ _serialOpen, L181: cannot open device ../../../../../../dev/ttyUSB0
ERRORLOG/1 @ init, L61: ...Failed to start serial
Comms appear to be incorrectly set up. Exiting.
段错误 (核心已转储)
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
STATUS/1 @ init, L66: ...Serial started successfully.
STATUS/1 @ parseDroneVersionInfo, L762: Device Serial No. = 0670093152
STATUS/1 @ parseDroneVersionInfo, L764: Hardware = A3
STATUS/1 @ parseDroneVersionInfo, L765: Firmware = 3.3.8.47
ERRORLOG/1 @ initVirtualRC, L1188: Virtual RC is not supported on this platform!
STATUS/1 @ activate, L1398: version 0x303082F
STATUS/1 @ getErrorCodeMessage, L752: activate
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
ERRORLOG/1 @ activate, L1424: Failed to activate please retry SET 0x0 ID 0x1 code 0x3
ERRORLOG/1 @ activate, L1431: Solutions for NEW_DEVICE_ERROR:
* Double-check your app_id and app_key in UserConfig.txt. Does it match with your DJI developer account?
* If this is a new device, you need to activate it through the App or DJI Assistant 2 with Internet
For different aircraft, the App and the version of DJI Assistant 2 might be different
For A3, N3, M600/Pro and M100, please use DJI GO App
For M210 V1, please use DJI GO 4 App or DJI Pilot App
For M210 V2, please use DJI Pilot App
For DJI Assistant 2, it's available on the 'Download' tab of the product page
* If this device is previously activated with another app_id and app_key, you will need to re-activate it again.
* A new device needs to be activated twice to fix the NEW_DEVICE_ERROR, so please try it twice.
STATUS/1 @ getErrorCodeMessage, L752: initVehicle
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
STATUS/1 @ getErrorCodeMessage, L752: reset
STATUS/1 @ getCMDSetSubscribeMSG, L835: SUBSCRIBER_ILLEGAL_DATA_LENGTH
Vehicle not initialized, exiting.
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
STATUS/1 @ init, L66: ...Serial started successfully.
STATUS/1 @ parseDroneVersionInfo, L762: Device Serial No. = 0670093152
STATUS/1 @ parseDroneVersionInfo, L764: Hardware = A3
STATUS/1 @ parseDroneVersionInfo, L765: Firmware = 3.3.8.47
ERRORLOG/1 @ initVirtualRC, L1188: Virtual RC is not supported on this platform!
STATUS/1 @ activate, L1398: version 0x303082F
STATUS/1 @ getErrorCodeMessage, L752: activate
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
ERRORLOG/1 @ activate, L1424: Failed to activate please retry SET 0x0 ID 0x1 code 0x3
ERRORLOG/1 @ activate, L1431: Solutions for NEW_DEVICE_ERROR:
* Double-check your app_id and app_key in UserConfig.txt. Does it match with your DJI developer account?
* If this is a new device, you need to activate it through the App or DJI Assistant 2 with Internet
For different aircraft, the App and the version of DJI Assistant 2 might be different
For A3, N3, M600/Pro and M100, please use DJI GO App
For M210 V1, please use DJI GO 4 App or DJI Pilot App
For M210 V2, please use DJI Pilot App
For DJI Assistant 2, it's available on the 'Download' tab of the product page
* If this device is previously activated with another app_id and app_key, you will need to re-activate it again.
* A new device needs to be activated twice to fix the NEW_DEVICE_ERROR, so please try it twice.
STATUS/1 @ getErrorCodeMessage, L752: initVehicle
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
STATUS/1 @ getErrorCodeMessage, L752: reset
STATUS/1 @ getCMDSetSubscribeMSG, L835: SUBSCRIBER_ILLEGAL_DATA_LENGTH
Vehicle not initialized, exiting.
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
STATUS/1 @ init, L66: ...Serial started successfully.
STATUS/1 @ parseDroneVersionInfo, L762: Device Serial No. = 0670093152
STATUS/1 @ parseDroneVersionInfo, L764: Hardware = A3
STATUS/1 @ parseDroneVersionInfo, L765: Firmware = 3.3.8.47
ERRORLOG/1 @ initVirtualRC, L1188: Virtual RC is not supported on this platform!
STATUS/1 @ activate, L1398: version 0x303082F
STATUS/1 @ getErrorCodeMessage, L752: activate
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
ERRORLOG/1 @ activate, L1424: Failed to activate please retry SET 0x0 ID 0x1 code 0x3
ERRORLOG/1 @ activate, L1431: Solutions for NEW_DEVICE_ERROR:
* Double-check your app_id and app_key in UserConfig.txt. Does it match with your DJI developer account?
* If this is a new device, you need to activate it through the App or DJI Assistant 2 with Internet
For different aircraft, the App and the version of DJI Assistant 2 might be different
For A3, N3, M600/Pro and M100, please use DJI GO App
For M210 V1, please use DJI GO 4 App or DJI Pilot App
For M210 V2, please use DJI Pilot App
For DJI Assistant 2, it's available on the 'Download' tab of the product page
* If this device is previously activated with another app_id and app_key, you will need to re-activate it again.
* A new device needs to be activated twice to fix the NEW_DEVICE_ERROR, so please try it twice.
STATUS/1 @ getErrorCodeMessage, L752: initVehicle
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
STATUS/1 @ getErrorCodeMessage, L752: reset
STATUS/1 @ getCMDSetSubscribeMSG, L835: SUBSCRIBER_ILLEGAL_DATA_LENGTH
Vehicle not initialized, exiting.
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
STATUS/1 @ init, L66: ...Serial started successfully.
STATUS/1 @ parseDroneVersionInfo, L762: Device Serial No. = 0670093152
STATUS/1 @ parseDroneVersionInfo, L764: Hardware = A3
STATUS/1 @ parseDroneVersionInfo, L765: Firmware = 3.3.8.47
ERRORLOG/1 @ initVirtualRC, L1188: Virtual RC is not supported on this platform!
STATUS/1 @ activate, L1398: version 0x303082F
STATUS/1 @ getErrorCodeMessage, L752: activate
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
ERRORLOG/1 @ activate, L1424: Failed to activate please retry SET 0x0 ID 0x1 code 0x3
ERRORLOG/1 @ activate, L1431: Solutions for NEW_DEVICE_ERROR:
* Double-check your app_id and app_key in UserConfig.txt. Does it match with your DJI developer account?
* If this is a new device, you need to activate it through the App or DJI Assistant 2 with Internet
For different aircraft, the App and the version of DJI Assistant 2 might be different
For A3, N3, M600/Pro and M100, please use DJI GO App
For M210 V1, please use DJI GO 4 App or DJI Pilot App
For M210 V2, please use DJI Pilot App
For DJI Assistant 2, it's available on the 'Download' tab of the product page
* If this device is previously activated with another app_id and app_key, you will need to re-activate it again.
* A new device needs to be activated twice to fix the NEW_DEVICE_ERROR, so please try it twice.
STATUS/1 @ getErrorCodeMessage, L752: initVehicle
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
STATUS/1 @ getErrorCodeMessage, L752: reset
STATUS/1 @ getCMDSetSubscribeMSG, L835: SUBSCRIBER_ILLEGAL_DATA_LENGTH
Vehicle not initialized, exiting.
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
STATUS/1 @ init, L66: ...Serial started successfully.
STATUS/1 @ parseDroneVersionInfo, L762: Device Serial No. = 0670093152
STATUS/1 @ parseDroneVersionInfo, L764: Hardware = A3
STATUS/1 @ parseDroneVersionInfo, L765: Firmware = 3.3.8.47
ERRORLOG/1 @ initVirtualRC, L1188: Virtual RC is not supported on this platform!
STATUS/1 @ activate, L1398: version 0x303082F
STATUS/1 @ getErrorCodeMessage, L752: activate
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
ERRORLOG/1 @ activate, L1424: Failed to activate please retry SET 0x0 ID 0x1 code 0x3
ERRORLOG/1 @ activate, L1431: Solutions for NEW_DEVICE_ERROR:
* Double-check your app_id and app_key in UserConfig.txt. Does it match with your DJI developer account?
* If this is a new device, you need to activate it through the App or DJI Assistant 2 with Internet
For different aircraft, the App and the version of DJI Assistant 2 might be different
For A3, N3, M600/Pro and M100, please use DJI GO App
For M210 V1, please use DJI GO 4 App or DJI Pilot App
For M210 V2, please use DJI Pilot App
For DJI Assistant 2, it's available on the 'Download' tab of the product page
* If this device is previously activated with another app_id and app_key, you will need to re-activate it again.
* A new device needs to be activated twice to fix the NEW_DEVICE_ERROR, so please try it twice.
STATUS/1 @ getErrorCodeMessage, L752: initVehicle
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
STATUS/1 @ getErrorCodeMessage, L752: reset
STATUS/1 @ getCMDSetSubscribeMSG, L835: SUBSCRIBER_ILLEGAL_DATA_LENGTH
Vehicle not initialized, exiting.
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
STATUS/1 @ init, L66: ...Serial started successfully.
STATUS/1 @ parseDroneVersionInfo, L762: Device Serial No. = 0670093152
STATUS/1 @ parseDroneVersionInfo, L764: Hardware = A3
STATUS/1 @ parseDroneVersionInfo, L765: Firmware = 3.3.8.47
ERRORLOG/1 @ initVirtualRC, L1188: Virtual RC is not supported on this platform!
STATUS/1 @ activate, L1398: version 0x303082F
STATUS/1 @ getErrorCodeMessage, L752: activate
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
ERRORLOG/1 @ activate, L1424: Failed to activate please retry SET 0x0 ID 0x1 code 0x3
ERRORLOG/1 @ activate, L1431: Solutions for NEW_DEVICE_ERROR:
* Double-check your app_id and app_key in UserConfig.txt. Does it match with your DJI developer account?
* If this is a new device, you need to activate it through the App or DJI Assistant 2 with Internet
For different aircraft, the App and the version of DJI Assistant 2 might be different
For A3, N3, M600/Pro and M100, please use DJI GO App
For M210 V1, please use DJI GO 4 App or DJI Pilot App
For M210 V2, please use DJI Pilot App
For DJI Assistant 2, it's available on the 'Download' tab of the product page
* If this device is previously activated with another app_id and app_key, you will need to re-activate it again.
* A new device needs to be activated twice to fix the NEW_DEVICE_ERROR, so please try it twice.
STATUS/1 @ getErrorCodeMessage, L752: initVehicle
STATUS/1 @ getCMDSetActivationMSG, L801: NEW_DEVICE_ERROR
STATUS/1 @ getErrorCodeMessage, L752: reset
STATUS/1 @ getCMDSetSubscribeMSG, L835: SUBSCRIBER_ILLEGAL_DATA_LENGTH
Vehicle not initialized, exiting.
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
STATUS/1 @ init, L66: ...Serial started successfully.
STATUS/1 @ parseDroneVersionInfo, L762: Device Serial No. = 0670093152
STATUS/1 @ parseDroneVersionInfo, L764: Hardware = A3
STATUS/1 @ parseDroneVersionInfo, L765: Firmware = 3.3.8.47
ERRORLOG/1 @ initVirtualRC, L1188: Virtual RC is not supported on this platform!
STATUS/1 @ activate, L1398: version 0x303082F
STATUS/1 @ activate, L1411: Activation successful
STATUS/1 @ verify, L247: Verify subscription successful.
STATUS/1 @ initGimbal, L926: Checking if gimbal is connected ...
STATUS/1 @ startPackage, L353: Start package 0 result: 0.
STATUS/1 @ startPackage, L355: Package 0 info: freq=50, nTopics=1.
STATUS/1 @ removePackage, L471: Remove package 0 successful.
STATUS/1 @ initGimbal, L970: Gimbal not mounted!
| Available commands: |
| [a] Monitored Takeoff + Landing |
| [b] Monitored Takeoff + Position Control + Landing |
| [c] Monitored Takeoff + Position Control + Force Landing Avoid Ground |
a
STATUS/1 @ verify, L247: Verify subscription successful.
STATUS/1 @ startPackage, L353: Start package 0 result: 0.
STATUS/1 @ startPackage, L355: Package 0 info: freq=10, nTopics=2.
Motors spinning...
Takeoff failed. Aircraft is still on the ground, but the motors are spinning.
STATUS/1 @ removePackage, L471: Remove package 0 successful.
STATUS/1 @ verify, L247: Verify subscription successful.
STATUS/1 @ startPackage, L353: Start package 0 result: 0.
STATUS/1 @ startPackage, L355: Package 0 info: freq=10, nTopics=2.
STATUS/1 @ getErrorCodeMessage, L752: �W��4
ERRORLOG/1 @ getCommonErrorCodeMessage, L818: MOTOR_FAIL_ASSISTANT_PROTECTED
STATUS/1 @ reset, L570: Reset Subscription Successful.
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$ ./djiosdk-flightcontrol-sample UserConfig.txt
argv[1] = UserConfig.txt
Read App ID
User Configuration read successfully.
STATUS/1 @ init, L56: Attempting to open device /dev/ttyUSB0 with baudrate 230400...
STATUS/1 @ init, L66: ...Serial started successfully.
STATUS/1 @ parseDroneVersionInfo, L762: Device Serial No. = 0670093152
STATUS/1 @ parseDroneVersionInfo, L764: Hardware = A3
STATUS/1 @ parseDroneVersionInfo, L765: Firmware = 3.3.8.47
ERRORLOG/1 @ initVirtualRC, L1188: Virtual RC is not supported on this platform!
STATUS/1 @ activate, L1398: version 0x303082F
STATUS/1 @ activate, L1411: Activation successful
STATUS/1 @ verify, L247: Verify subscription successful.
STATUS/1 @ initGimbal, L926: Checking if gimbal is connected ...
STATUS/1 @ startPackage, L353: Start package 0 result: 0.
STATUS/1 @ startPackage, L355: Package 0 info: freq=50, nTopics=1.
STATUS/1 @ removePackage, L471: Remove package 0 successful.
STATUS/1 @ initGimbal, L970: Gimbal not mounted!
| Available commands: |
| [a] Monitored Takeoff + Landing |
| [b] Monitored Takeoff + Position Control + Landing |
| [c] Monitored Takeoff + Position Control + Force Landing Avoid Ground |
a
STATUS/1 @ verify, L247: Verify subscription successful.
STATUS/1 @ startPackage, L353: Start package 0 result: 0.
STATUS/1 @ startPackage, L355: Package 0 info: freq=10, nTopics=2.
Motors spinning...
Takeoff failed. Aircraft is still on the ground, but the motors are spinning.
STATUS/1 @ removePackage, L471: Remove package 0 successful.
STATUS/1 @ verify, L247: Verify subscription successful.
STATUS/1 @ startPackage, L353: Start package 0 result: 0.
STATUS/1 @ startPackage, L355: Package 0 info: freq=10, nTopics=2.
STATUS/1 @ getErrorCodeMessage, L752: ��x �
ERRORLOG/1 @ getCommonErrorCodeMessage, L818: MOTOR_FAIL_ASSISTANT_PROTECTED
STATUS/1 @ reset, L570: Reset Subscription Successful.
kobosp@KOBOSPG400u:~/CLionProjects/Onboard-SDK-3.9/build/bin$
为了让Clion运行,得安装一下
kobosp@gl62u:~/OnboardSDK39/point_record_and_implement/build$ cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Compiling without WaypointV2 Core
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kobosp/OnboardSDK39/point_record_and_implement/build
kobosp@gl62u:~/OnboardSDK39/point_record_and_implement/build$ make
Scanning dependencies of target djiosdk-core
[ 1%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_mfio.cpp.o
[ 3%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_control.cpp.o
[ 4%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_version.cpp.o
[ 6%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_hotpoint.cpp.o
[ 7%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_flight_controller.cpp.o
[ 9%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_gimbal.cpp.o
[ 11%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_command.cpp.o
[ 12%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_error.cpp.o
[ 14%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_ack.cpp.o
[ 15%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_virtual_rc.cpp.o
[ 17%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_subscription.cpp.o
[ 19%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_vehicle.cpp.o
[ 20%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_mobile_communication.cpp.o
[ 22%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_broadcast.cpp.o
[ 23%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_hardware_sync.cpp.o
[ 25%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_mobile_device.cpp.o
[ 26%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_waypoint.cpp.o
[ 28%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_camera.cpp.o
[ 30%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_payload_device.cpp.o
[ 31%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_camera_manager.cpp.o
[ 33%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_psdk_manager.cpp.o
[ 34%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/api/src/dji_mission_manager.cpp.o
[ 36%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/payload/dji_camera_module.cpp.o
[ 38%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/payload/dji_psdk_module.cpp.o
[ 39%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/payload/dji_payload_base.cpp.o
[ 41%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/payload/dji_payload_link.cpp.o
[ 42%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/flight/dji_flight_actions_module.cpp.o
[ 44%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/flight/dji_flight_assistant_module.cpp.o
[ 46%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/modules/src/flight/dji_flight_link.cpp.o
[ 47%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/protocol/src/dji_open_protocol.cpp.o
[ 49%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/protocol/src/dji_aes.cpp.o
[ 50%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/protocol/src/dji_protocol_base.cpp.o
[ 52%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/hal/src/dji_log.cpp.o
[ 53%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/hal/src/dji_memory.cpp.o
[ 55%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/hal/src/dji_hard_driver.cpp.o
[ 57%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/hal/src/dji_thread_manager.cpp.o
[ 58%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/hal/src/dji_platform_manager.cpp.o
[ 60%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/utility/src/dji_singleton.cpp.o
[ 61%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/utility/src/dji_circular_buffer.cpp.o
[ 63%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/platform/default/src/dji_memory_default.cpp.o
[ 65%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/platform/linux/src/posix_thread.cpp.o
[ 66%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/platform/linux/src/posix_thread_manager.cpp.o
[ 68%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/platform/linux/src/linux_serial_device.cpp.o
[ 69%] Linking CXX static library ../libs/libdjiosdk-core.a
[ 69%] Built target djiosdk-core
Scanning dependencies of target djiosdk-flightcontrol-sample
[ 71%] Building CXX object sample/platform/linux/flight-control/CMakeFiles/djiosdk-flightcontrol-sample.dir/flight_control_sample.cpp.o
[ 73%] Building CXX object sample/platform/linux/flight-control/CMakeFiles/djiosdk-flightcontrol-sample.dir/main.cpp.o
[ 74%] Building CXX object sample/platform/linux/flight-control/CMakeFiles/djiosdk-flightcontrol-sample.dir/__/common/dji_linux_environment.cpp.o
[ 76%] Building CXX object sample/platform/linux/flight-control/CMakeFiles/djiosdk-flightcontrol-sample.dir/__/common/dji_linux_helpers.cpp.o
[ 77%] Building CXX object sample/platform/linux/flight-control/CMakeFiles/djiosdk-flightcontrol-sample.dir/__/__/__/core/src/flight_sample.cpp.o
[ 79%] Linking CXX executable ../../../../bin/djiosdk-flightcontrol-sample
[ 79%] Built target djiosdk-flightcontrol-sample
Scanning dependencies of target djiosdk-logging-sample
[ 80%] Building CXX object sample/platform/linux/logging/CMakeFiles/djiosdk-logging-sample.dir/logging_sample.cpp.o
[ 82%] Building CXX object sample/platform/linux/logging/CMakeFiles/djiosdk-logging-sample.dir/main.cpp.o
[ 84%] Building CXX object sample/platform/linux/logging/CMakeFiles/djiosdk-logging-sample.dir/__/common/dji_linux_environment.cpp.o
[ 85%] Building CXX object sample/platform/linux/logging/CMakeFiles/djiosdk-logging-sample.dir/__/common/dji_linux_helpers.cpp.o
[ 87%] Linking CXX executable ../../../../bin/djiosdk-logging-sample
[ 87%] Built target djiosdk-logging-sample
Scanning dependencies of target time_sync_callback_sample
[ 88%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_callback_sample.dir/time_sync_callback_sample.cpp.o
[ 90%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_callback_sample.dir/__/common/dji_linux_environment.cpp.o
[ 92%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_callback_sample.dir/__/common/dji_linux_helpers.cpp.o
[ 93%] Linking CXX executable ../../../../bin/time_sync_callback_sample
[ 93%] Built target time_sync_callback_sample
Scanning dependencies of target time_sync_poll_sample
[ 95%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_poll_sample.dir/time_sync_poll_sample.cpp.o
[ 96%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_poll_sample.dir/__/common/dji_linux_environment.cpp.o
[ 98%] Building CXX object sample/platform/linux/time-sync/CMakeFiles/time_sync_poll_sample.dir/__/common/dji_linux_helpers.cpp.o
[100%] Linking CXX executable ../../../../bin/time_sync_poll_sample
[100%] Built target time_sync_poll_sample
kobosp@gl62u:~/OnboardSDK39/point_record_and_implement/build$ sudo make install
[sudo] kobosp 的密码:
[ 69%] Built target djiosdk-core
[ 79%] Built target djiosdk-flightcontrol-sample
[ 87%] Built target djiosdk-logging-sample
[ 93%] Built target time_sync_callback_sample
[100%] Built target time_sync_poll_sample
Install the project...
-- Install configuration: "Debug"
-- Installing: /usr/local/lib/cmake/djiosdk/DJIOSDKConfig.cmake
-- Installing: /usr/local/lib/cmake/djiosdk/DJIOSDKConfigVersion.cmake
-- Installing: /usr/local/lib/libdjiosdk-core.a
-- Installing: /usr/local/include/djiosdk/dji_telemetry.hpp
-- Installing: /usr/local/include/djiosdk/dji_virtual_rc.hpp
-- Installing: /usr/local/include/djiosdk/dji_gimbal.hpp
-- Installing: /usr/local/include/djiosdk/dji_telemetry_doc.hpp
-- Installing: /usr/local/include/djiosdk/dji_mobile_device.hpp
-- Installing: /usr/local/include/djiosdk/dji_mission_type.hpp
-- Installing: /usr/local/include/djiosdk/dji_control.hpp
-- Installing: /usr/local/include/djiosdk/dji_mfio.hpp
-- Installing: /usr/local/include/djiosdk/dji_subscription.hpp
-- Installing: /usr/local/include/djiosdk/dji_camera.hpp
-- Installing: /usr/local/include/djiosdk/dji_command.hpp
-- Installing: /usr/local/include/djiosdk/dji_vehicle_callback.hpp
-- Installing: /usr/local/include/djiosdk/dji_error.hpp
-- Installing: /usr/local/include/djiosdk/dji_hardware_sync.hpp
-- Installing: /usr/local/include/djiosdk/dji_payload_device.hpp
-- Installing: /usr/local/include/djiosdk/dji_ack.hpp
-- Installing: /usr/local/include/djiosdk/dji_flight_controller.hpp
-- Installing: /usr/local/include/djiosdk/dji_mission_base.hpp
-- Installing: /usr/local/include/djiosdk/dji_broadcast.hpp
-- Installing: /usr/local/include/djiosdk/dji_psdk_manager.hpp
-- Installing: /usr/local/include/djiosdk/dji_mission_manager.hpp
-- Installing: /usr/local/include/djiosdk/dji_camera_manager.hpp
-- Installing: /usr/local/include/djiosdk/dji_mobile_communication.hpp
-- Installing: /usr/local/include/djiosdk/dji_vehicle.hpp
-- Installing: /usr/local/include/djiosdk/dji_waypoint.hpp
-- Installing: /usr/local/include/djiosdk/dji_hotpoint.hpp
-- Installing: /usr/local/include/djiosdk/dji_type.hpp
-- Installing: /usr/local/include/djiosdk/dji_status.hpp
-- Installing: /usr/local/include/djiosdk/dji_version.hpp
-- Installing: /usr/local/include/djiosdk/dji_payload_base.hpp
-- Installing: /usr/local/include/djiosdk/dji_camera_module.hpp
-- Installing: /usr/local/include/djiosdk/dji_payload_link.hpp
-- Installing: /usr/local/include/djiosdk/dji_psdk_module.hpp
-- Installing: /usr/local/include/djiosdk/dji_flight_link.hpp
-- Installing: /usr/local/include/djiosdk/dji_flight_assistant_module.hpp
-- Installing: /usr/local/include/djiosdk/dji_flight_actions_module.hpp
-- Installing: /usr/local/include/djiosdk/dji_crc.hpp
-- Installing: /usr/local/include/djiosdk/dji_open_protocol.hpp
-- Installing: /usr/local/include/djiosdk/dji_protocol_base.hpp
-- Installing: /usr/local/include/djiosdk/dji_aes.hpp
-- Installing: /usr/local/include/djiosdk/dji_thread_manager.hpp
-- Installing: /usr/local/include/djiosdk/dji_hard_driver.hpp
-- Installing: /usr/local/include/djiosdk/dji_platform_manager.hpp
-- Installing: /usr/local/include/djiosdk/dji_log.hpp
-- Installing: /usr/local/include/djiosdk/dji_memory.hpp
-- Installing: /usr/local/include/djiosdk/dji_singleton.hpp
-- Installing: /usr/local/include/djiosdk/dji_macros.hpp
-- Installing: /usr/local/include/djiosdk/dji_circular_buffer.hpp
-- Installing: /usr/local/include/djiosdk/posix_thread.hpp
-- Installing: /usr/local/include/djiosdk/linux_serial_device.hpp
-- Installing: /usr/local/include/djiosdk/posix_thread_manager.hpp
-- Installing: /usr/local/lib/cmake/djiosdk/djiosdkTargets.cmake
-- Installing: /usr/local/lib/cmake/djiosdk/djiosdkTargets-debug.cmake
kobosp@gl62u:~/OnboardSDK39/point_record_and_implement/build$ ^C
添加寻找目录
# * @Copyright (c) 2016-2017 DJI
# *
# * Permission is hereby granted, free of charge, to any person obtaining a copy
# * of this software and associated documentation files (the "Software"), to deal
# * in the Software without restriction, including without limitation the rights
# * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# * copies of the Software, and to permit persons to whom the Software is
# * furnished to do so, subject to the following conditions:
# *
# * The above copyright notice and this permission notice shall be included in
# * all copies or substantial portions of the Software.
# *
# * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# * SOFTWARE.
# *
# *
cmake_minimum_required(VERSION 2.8)
project(djiosdk-flightcontrol-sample)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -g -O0")
include_directories(${ONBOARDSDK_SOURCE}/api/inc)
include_directories(${ONBOARDSDK_SOURCE}/utility/inc)
include_directories(${ONBOARDSDK_SOURCE}/hal/inc)
include_directories(${ONBOARDSDK_SOURCE}/protocol/inc)
include_directories(${ONBOARDSDK_SOURCE}/platform/linux/inc)
include_directories(${MODULES_HEADER_DIR})
include_directories(${FLIGHT_MODULES_HEADER_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../core/inc)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../../osdk-core/api/inc)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../../osdk-core/utility/inc)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../../osdk-core/hal/inc)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../../osdk-core/protocol/inc)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../../osdk-core/platform/linux/inc)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../../osdk-core/modules/inc/payload)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../../osdk-core/modules/inc/flight)
FILE(GLOB SOURCE_FILES *.hpp *.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../common/dji_linux_environment.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../common/dji_linux_helpers.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../../../core/src/flight_sample.cpp
)
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} djiosdk-core)