MIT Mini Cheetah仿真 错误处理

一. 编译步骤

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

修改前:

修改后:

六.编译通过,启动仿真

  • 13
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

jones250

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值