当前位置:   article > 正文

在ubuntu20.4下安装ardupilot 4.3.6_opendroneid c

opendroneid c

  这次重新安装真的是遇到了好多坑啊!
  从github上靠过来按照之前的那篇文章流程做完之后,还会有一些别的问题。首先是module里面的包都没有拷过来,所以需要用git add将文件都添加过来。
  之后进行编译时
  首先会出现这个情况:Command ['/usr/bin/git', 'rev-parse', '--short=8', 'HEAD'] returned 128
  这时需要将Tools/ardupilotwaf/git_submodule.py中的一段代码进行修改
  将
def _git_head_hash(ctx, path, short=False):

def _git_head_hash(ctx, path, short=False):
cmd = [ctx.env.get_flat('GIT'), 'rev-parse']
if short:
        cmd.append('--short=8')
    cmd.append('HEAD')
    out = ctx.cmd_and_log(cmd, quiet=Context.BOTH, cwd=path)
    return out.strip()
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7


修改为

   def _git_head_hash(ctx, path, short=False):
    return "deadc0de"`
  • 1
  • 2

  之后会遇到这个问题:

  这是library文件夹下的AP_EFI.cpp文件,这里报的错误是参数不够。最终的解决方案是在github上搜索这个文件,将里面的内容全部复制过来替换这个文件即可。

  还有一个问题是在AP_OPEN DRONE ID.cpp这个文件,报错是没有was not in this scope ,这里我开始不知道怎么修改,因为在配置中opendroneid都是没有的。最终解决方案是将整段代码注释掉。
  最终即可编译成功!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/一键难忘520/article/detail/925461
推荐阅读
相关标签
  

闽ICP备14008679号