I’m trying to connect mavproxy, mission planner and dronekit to my hexa. i am not using a companion computer my setup is as follows: i have a pc running windows for mission planner and on that same pc im running a virtual machine with ubuntu 16.04 running dronekit and mavproxy.
first I'm running mavproxy and forking out 2 connections, 1 for mission planner and one for dronekit with the following code:
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)
I am able to connect to the drone in mission planner via the UDP at port 14550. and I am able to send commands via mavproxy console such as change modes/arm etc.
my problem is when I execute my connect script from dronekit to connect to the drone I'm getting a timeout error.
the code
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)
when I open a new terminal I run the command to launch and connect drone kit
python connect.py --connect 127.0.0.1:14551
once I run this it gets stuck and after 30 seconds I get the following output:
dronekit.TimeoutError: wait_ready experienced a timeout after 30 seconds.
sometimes I get the following output:
gcs failsafe cleared
and then it gets stuck and after 30 seconds:
dronekit.APIException: Timeout in initializing connection.
I searched for about 3 days for solutions and tried everything that is out there pretty much, such as telling dronekit to wait longer than 30 seconds, but still, I get the same error. I updated dronekit to the latest version, updated pymavlink and pyserial. also downgraded them to check if it will solve this but nothing works.
my main question is: is this error happening because dronekit can only run on a companion computer? and is not built for connecting threw telemetry radio? if not, what am I doing wrong?
I sincerely am lost and praying that someone can help me. thanks in advance. I would literally pay someone for a solution.
and again, sorry for the double post.