一. 编译步骤
git clone https://github.com/mit-biomimetics/Cheetah-Software.git
cd Cheetah-Software
mkdir build
cd build
cmake ..
./../scripts/make_types.sh
make -j4
二.clone googletest 速度慢或是报错
报错信息:
CMake Error at googletest-download/googletest-download-prefix/tmp/googletest-download-gitclone.cmake:40 (message):
处理:直接注释掉common/CMakeLists.txt 里的googletest第20行--39行,仿真和实际使用不影响。
三.系统Ubuntu20.04 报错:string_fortified.h:106:34: error: ‘char* __builtin_strncpy
报错:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: error: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 2056 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
解决:warning当作error了,我们讲主目录的CMakeLists.txt里的2个“-Werror”删除掉。
修改前:
修改后:
四.提示缺少stropts.h文件:fatal error: stropts.h: No such file or directory
报错:
rt_serial.cpp:28:10: fatal error: stropts.h: No such file or directory
28 | #include <stropts.h>
解决:在/usr/include/下新建文件touch stropts.h 复制写入如下内容
#if HAVE_STROPTS_H
#include <stropts.h>
#endif
五.error: ‘ioctl’ was not declared in this scope
错误:eerror: ‘ioctl’ was not declared in this scope
解决:修改robot/src/rt/rt_serial.cpp
修改前:
修改后: