如何在RPi上构建DJI OnBoard SDK示例?

时间:2016-11-10 22:49:54

标签: cmake raspberry-pi raspbian

根据板载SDK快速入门指南,我有一个DJI M100和Raspberry Pi串口连接。

但是我之前没有做过很多C / C ++的事情,我不知道如何构建他们提供的样本。我为cmake做了一个apt-get安装,因为它没有安装在我正在使用的Raspbian发行版中。

我搞砸了一下并运行了cmake CMakeLists.txt它开始做事情,这是输出:

-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- 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
-- 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
-- Found Git: /usr/bin/git (found version "2.1.4")
cat: /etc/lsb-release: No such file or directory
CMake Error at CMakeLists.txt:70 (if):
if given arguments:

"STREQUAL" "16.04"
Unknown arguments specified
-- Configuring incomplete, errors occurred!
See also "/home/pi/Onboard-SDK-3.1/sample/Linux/Blocking/CMakeFiles/CMakeOutput.log".

有什么想法吗?我可以弄清楚编码部分,但设置环境会让我感到高兴。

提前致谢!

3 个答案:

答案 0 :(得分:0)

错误消息不在C ++编译器中,当CMake尝试推断需要编译的内容时,它会失败。这就是为什么错误不在.cpp文件中,而是在CmakeLists.txt第70行。

答案 1 :(得分:0)

Onboard-SDK并不适用于Raspbian,你可以在这里的链接上查看它 - https://developer.dji.com/onboard-sdk/documentation/github-platform-docs/Linux/README.html

也许这就是原因。即使在Raspbian上安装CMAKE之后,我也遇到了类似的问题。

答案 2 :(得分:0)

DJI显然在2017年1月增加了对Raspbian的支持,因为他们创建了一个名为raspberrypi-support的分支,并且主要围绕Makefile进行了一些更改。

查看branchassociated commit