dronekit.TimeoutError: wait_ready experienced a timeout after 30 seconds


#1

In Drone programming primer course, function to connect python script to sitl drone part 1, there is a python script which tries to connect to sim_vehicle. But when I run the script with command:

python connection_template --connect 127.0.0.1:14550 I get error: dronekit.TimeoutError: wait_ready experienced a timeout after 30 seconds.

Note: sim_vehicle has been started in ArduCopter.

I have attached python script text.


#2

Have you seen this:
https://community.dojofordrones.com/t/connect-link-timeout-no-heartbeat-in-last-5-seconds/52

Try searching this forum for ‘timeout’. It appears you are using python2, but perhaps you will find something.

Also be aware there are some version issues with dronekit-sitl and pymavlink as explained in the course.


#3

I installed python 3.6, and tried to run, but got same error. While I was looking online for solution I found this: https://dronekit-python.readthedocs.io/en/latest/develop/installation.html

dronekit does not have support for python3. How are other people running dronekit with python 3?


#4

Remove ‘import exceptions’, as it is not compatible with Python 3.

See
https://community.dojofordrones.com/t/ubuntu-20-python3-setup/304/12

https://community.dojofordrones.com/t/wsl2-instead-of-virtualbox/711

https://community.dojofordrones.com/t/full-gz-sim-on-22-04-lts/805