Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Mavproxy+;任务规划师+;无人机套件,无配套计算机_Python_Dronekit - Fatal编程技术网

Python Mavproxy+;任务规划师+;无人机套件,无配套计算机

Python Mavproxy+;任务规划师+;无人机套件,无配套计算机,python,dronekit,Python,Dronekit,我正在尝试将mavproxy、任务规划器和无人机套件连接到我的hexa。 我没有使用配套计算机我的设置如下: 我有一台运行windows for mission planner的电脑,在同一台电脑上,我运行一台虚拟机,ubuntu 16.04运行无人机工具包和mavproxy 首先,我运行mavproxy并分叉2个连接,1个用于任务规划器,1个用于无人机套件,代码如下: mavproxy.py --master=/dev/ttyUSB0(I'm telling mavproxy to use t

我正在尝试将mavproxy、任务规划器和无人机套件连接到我的hexa。 我没有使用配套计算机我的设置如下: 我有一台运行windows for mission planner的电脑,在同一台电脑上,我运行一台虚拟机,ubuntu 16.04运行无人机工具包和mavproxy

首先,我运行mavproxy并分叉2个连接,1个用于任务规划器,1个用于无人机套件,代码如下:

mavproxy.py --master=/dev/ttyUSB0(I'm telling mavproxy to use the serial which the telemetry dongle is connected to) --baudrate=57600 --out=127.0.0.1:14551(ip address on my virtual ubuntu) --out=10.0.0.7:14550 (IP for my windows machine)
我可以通过端口14550的UDP连接到任务规划器中的无人机。我能够通过mavproxy控制台发送命令,如更改模式/arm等

我的问题是,当我从无人机工具包执行连接脚本以连接到无人机时,我收到一个超时错误

代码

from dronekit import connect, VehicleMode, LocationGlobalRelative

import time

import argparse

parser = argparse.ArgumentParser(description = ‘commands’)

parser.add_argument(’–connect’)

args =parser.parse_args()

connection_string = args.connect

vehicle = connect(connection_string ,wait_ready=True)
当我打开一个新终端时,我运行命令来启动和连接无人机套件

python connect.py --connect 127.0.0.1:14551
一旦我运行它,它就会卡住,30秒后,我会得到以下输出:

dronekit.TimeoutError: wait_ready experienced a timeout after 30 seconds.
gcs failsafe cleared
有时我会得到以下输出:

dronekit.TimeoutError: wait_ready experienced a timeout after 30 seconds.
gcs failsafe cleared
然后它卡住了,30秒后:

dronekit.APIException: Timeout in initializing connection.
我搜索了大约3天的解决方案,并尝试了几乎所有的方法,比如告诉无人机套件等待超过30秒,但我还是得到了同样的错误。 我将Drone Kit更新为最新版本,更新了pymavlink和pyserial。同时也降低了它们的等级,以检查它是否能解决这个问题,但没有任何效果

我的主要问题是:发生此错误是因为无人机工具包只能在配套计算机上运行吗?不是为了连接遥测无线电而建的吗? 如果没有,我做错了什么?

我真的迷路了,祈祷有人能帮助我。 提前谢谢。我真的会付钱给某人来解决问题


再一次为这篇文章的重复道歉。

您在这一行有一个拼写错误
解析器。添加参数('-connect')
;它应该是
解析器。添加参数('--connect')
。我不确定这会解决你的问题。我不知道你的键盘是如何设置的,但你应该使用单引号或双引号,所以
description='commands'
应该是
description='commands'
你在这行
解析器上有一个输入错误。添加参数('-connect')
;它应该是
解析器。添加参数('--connect')
。我不确定这会解决你的问题。我不知道你的键盘是如何设置的,但你应该使用单引号或双引号,所以
description='commands'
应该是
description='commands'