我有一个大疆M100和树莓派串行连接,根据板载SDK快速入门指南。
然而,我以前没有做过很多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".有什么想法吗?我可以弄清楚编码部分,但是设置环境会阻碍我的脚步。
提前感谢!
发布于 2016-11-11 17:03:18
错误消息不在C++编译器中,当CMake试图推断需要编译的内容时,它会失败。这就是为什么错误不是在.cpp文件中,而是在CmakeLists.txt第70行。
发布于 2016-11-28 19:48:48
Onboard-SDK不能在Raspbian上工作,你可以在这里的链接上查看它- https://developer.dji.com/onboard-sdk/documentation/github-platform-docs/Linux/README.html
也许这就是这里的原因。甚至在Raspbian上安装了CMAKE之后,我也遇到了类似的事情。
发布于 2016-12-05 15:57:41
一个简单的选择是注释掉第70行,或者简单地删除该行,它可能会起作用。
此外,也可以让板载SDK在Raspbian上工作,我自己已经通过另一种方法做到了这一点。
下面是我使用的命令: sudo apt-get install git
已从桌面https://cmake.org/download/下载并解压cmake-3.7.1.tar.gz
cd /home/pi/Desktop/cmake-3.7.1./bootstrap make sudo make install
在台式机上复制Onboard-SDK-3.1
cd /home/pi/Desktop/Onboard-SDK-3.1
将/home/pi/Desktop/Onboard-SDK-3.1/sample/Linux/Non-Blocking/CMakeLists.txt中的/home/pi/Desktop/Onboard-SDK-3.1/scripts/build复制到/home/pi/Desktop/Onboard-SDK-3.1替换原始文件将CMakeLists.txt的执行权限更改为任何人删除/home/pi/Desktop/Onboard-SDK-3.1中CMakeLists.txt的第57-59行
./scripts/build --build-type debug --clean true --lidar--注销
https://stackoverflow.com/questions/40538379
复制相似问题