Servers by jDrones

dronekit.TimeoutError: wait_ready experienced a timeout after 30 seconds. When trying to connect

mavproxy
dronekit
pixhawk
(Dhananjay Rajmane) #1

Hi all,
My scripts were running/working succefull on dronekit-sitl . When i am trying to connect to UAV(drone ) it gives timeout error while connecting. I am using MavProxy ,python3 and dronekit python.

Using MavProxy i connected to UAV by executing below command :
mavproxy.py --master=/dev/ttyUSB0 --out=127.0.0.1:14551
Output : Connect /dev/ttyUSB0 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyUSB0
MAV> GPS lock at 577 meters
APM: data link #0 lost
online system 1
RTL> Mode RTL
APM: data link #0 regained
gCOM_EF_C2T MODE4
TE_MAXM_+MC_TPA_RATE_P ?D9\Z qEKF2_MAG_E_NOISE C_Y sQ_SACC |ELAY C M
bMPC_XY_VEL_D_EX*!vUN@PLD_BTOUT IS1IM5 ^PWM_MAIN_TRIM3 jjjjjV U~?RC12_REV ( S RC17_TRIM DRC1_TRIM T g 9ACRO_SWF^@3{TC_B_ENABLEEfence breach
Received 646 parameters
Saved 647 parameters to mav.parm

RTL>
RTL>
RTL> DpCOM_FLTMODE6;!xEKF2_ACC_B_NOISE mEKF2_HGT_MODEOS_Z
OISE RT AELAY Z @EKF2_WIND_NOISE EyIMU_ACCEL_CUTOFF WMAV_PROTO_VERnODEd\IMPC_FLT_TSKVX_LND R g,DIS4PWM_MAIN_TRIM1 5 c_RATE 4RC_MAP_GEAR_SWXoSYS_COMPANIONpE Got MAVLink msg: COMMAND_ACK {command : 520, result : 0}
Got MAVLink msg: COMMAND_ACK {command : 520, result : 0}

For dronekit connection i am giving ‘127.0.0.1:14551’ as connection string but it throwing exception after 30 secnds. Exception
Connecting to vehicle on: udp:127.0.0.1:14551
Traceback (most recent call last):
File “arm.py”, line 34, in
vehicle = connect(connection_string, wait_ready=True)
File “/home/mastermind/.local/lib/python3.5/site-packages/dronekit/init.py”, line 3172, in connect
timeout=timeout)
File “/home/mastermind/.local/lib/python3.5/site-packages/dronekit/init.py”, line 2375, in wait_ready
timeout)
dronekit.TimeoutError: wait_ready experienced a timeout after 30 seconds.

Please help

(Amilcar Lucas) #2

Check your connections.

(Dhananjay Rajmane) #3

Which connection you are talking ? Mavproxy connected to UAV but dronekit not able to connect.
Also in simuated(dronekit-sitl) mode it works fine

(Amilcar Lucas) #4

Are you connecting dronekit to mavproxy? Try it.

(Dhananjay Rajmane) #5

Yes. I am connecting to mavproxy

(Amilcar Lucas) #6

Then there is something wrong with your dronekit script, or you forgot to add --out in the mavproxy

(Dhananjay Rajmane) #7

It is not like this. I am forwarding using dronekit to QgroundControl as well as to port 14551. This is not issue related to --out option. Timeout is due to the hearbeat not received to dronekit. Dronekit waiting for multiple types of hearbeats like GPS, Compass etc. While connecting verify GPS count and try to connect to vehicle using dronekit. Else set wait_ready to False and try to connect.