Servers by jDrones

Cant connect Dronekit but i can with MAVProxy, Pixracer v1.9.0, dronekit.TimeoutError: wait_ready experienced a timeout after 30 seconds

raspberrypi
companioncomputer
pixracer
pixhawk
(Fj) #1

Hi all, I can’t get a connection with drone kit-python by serial, this is my setup;
if you could help me will be great :smiley:

I have a Pixracer with firmware v1.9.0 master load by QGC, with those parameters:
(MAV_2_CONFIG : TELEM2,
MAV_2_FORWARD : Enabled,
MAV_2_MODE : Onboard,
MAV_2_RATE : 921600 B/s [?] <- I don’t know if this is correct or have to be 0 or other.
SER_TEL2_BAUD : 921600 8N1
and more but those are the most important for the drone kit, right? )

also an RBPi 3 B+ as a companion computer, I access to the RBPi by VNC viewer [to not affect by whatever :X ] with:
Dronekit 2.9.2 (git clone from the github and sudo python setup.py install )
pymavlink 2.2.20
monotonic 1.5
MAVProxy 1.8.5

I can connect withMAVProxy and saw some values
mavproxy.py --master=/dev/ttyS0 --baudrate=921600

Connect /dev/ttyS0 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyS0
MAV> online system 1
MANUAL> Mode MANUAL
fence breach
Received 687 parameters
Saved 688 parameters to mav.parm
MANUAL>

But I can’t connect with drone kit use a script

from dronekit import connect, VehicleMode
import time
print("> Connecting with the UAV <")
vehicle = connect('/dev/ttyS0', baud=921600, wait_ready=True)

I got the error:

Connecting with the UAV <
Traceback (most recent call last):
File “test_con.py”, line 7, in
vehicle = connect(’/dev/ttyS0’, baud=921600, wait_ready=True)
File “build/bdist.linux-armv7l/egg/dronekit/ init .py”, line 3168, in connect
File “build/bdist.linux-armv7l/egg/dronekit/ init .py”, line 2371, in wait_ready
dronekit.TimeoutError: wait_ready experienced a timeout after 30 seconds.

I tried to add more time with the same result [changed the init .py]
I tried to change the baud-rate with the same result
I don’t know, What am I doing wrong? :S
Thanks