由于需要,我要更改电机配置和使用自动航行模式(这个只有在ardusub-3.4.1或者ardusub-3.4代码里有)这两个要求,使我必须更改ardusub-3.4.1代码,代码地址:https://github.com/bluerobotics/ardusub/tree/v3.4.1 。
压缩包下载地址:https://github.com/bluerobotics/ardusub/releases
现在遇到的问题是:
1、在ubuntu中使用命令“git clone “代码地址””时,出现错误:fatal: repository ‘代码地址’ not found。
2、没有办法,我只好在电脑下载,发现在“代码地址”网页克隆下载的代码(ardusub)是没有飞行模式的。之后找到ardusub-3.4.1的压缩包下载软件,进行解压,并将解压后的文件发送到ubuntu上。发送成功后进行编译:make px4-v2,出现错误:
fatal: ambiguous argument ‘HEAD’: unknown revision or path not in the working tree.
Use ‘–’ to separate paths from revisions, like this:
‘git […] – […]’
/bin/sh: line 0: cd: /home/xin/Desktop/ardusub-3.4.1/modules/PX4NuttX/nuttx/: No such file or directory
fatal: Not a git repository (or any of the parent directories): .git
// BUILDROOT=/home/xin/Desktop/ardusub-3.4.1/Build.ArduSub HAL_BOARD=HAL_BOARD_PX4 HAL_BOARD_SUBTYPE= TOOLCHAIN=NATIVE EXTRAFLAGS=-DGIT_VERSION=“HEAD” -I/home/xin/Desktop/ardusub-3.4.1/libraries/AP_Common/missing -DMAVLINK_PROTOCOL_VERSION=2 -DNUTTX_GIT_VERSION="" -DPX4_GIT_VERSION="" -DUAVCAN=1 -D__STDC_FORMAT_MACROS -DHAVE_STD_NULLPTR_T=0 -DHAVE_ENDIAN_H=0 -DHAVE_BYTESWAP_H=0 -DHAVE_OCLOEXEC=0 -I/home/xin/Desktop/ardusub-3.4.1/Build.ArduSub/libraries/GCS_MAVLink/include/mavlink
Checking modules
modules/gbenchmark/.git missing - need module init
- git submodule init
fatal: Not a git repository (or any of the parent directories): .git - echo ‘git submodule init failed’
git submodule init failed - git submodule status --recursive
fatal: Not a git repository (or any of the parent directories): .git - exit 1
make: *** [CHECK_MODULES] Error 1
3、改用waf编译,安装成功后,运行./waf --help,出现错误:
python: can’t open file ‘/home/xin/Desktop/ardusub-3.4.1/modules/waf/waf-light’: [Errno 2] No such file or directory
Missing waf submodule. Trying to get it
fatal: Not a git repository (or any of the parent directories): .git
Could not update submodule
以为是系统的问题,用树莓派编译也有这些问题。
请问怎样编译ardusub-3.4.1。