I’m working on an app where I connect my drone (NAVIO2 & Raspberry pi) via internet connection and I keep receiving this error message below and attached is a copy of my code
any help that you can provide me would be extremely appreciated.
:
File “/usr/local/lib/python3.7/dist-packages/dronekit/mavlink.py”, line 211, in mavlink_thread_in
fn(self)
File “/usr/local/lib/python3.7/dist-packages/dronekit/init.py”, line 1371, in listener
self._heartbeat_error)
dronekit.APIException: No heartbeat in 30 seconds, aborting.
2022-12-28 18:33:40,373 [ERROR] Timeout in initializing connection.
Traceback (most recent call last):
File “app.py”, line 41, in
drone = Drone(config)
File “/home/pi/cloudapp-raspi/drone.py”, line 20, in init
self.vehicle = connect(rpi_ip + “:” + str(sim_port), baud=921600, wait_ready=True)
File “/usr/local/lib/python3.7/dist-packages/dronekit/init.py”, line 3166, in connect
vehicle.initialize(rate=rate, heartbeat_timeout=heartbeat_timeout)
File “/usr/local/lib/python3.7/dist-packages/dronekit/init.py”, line 2275, in initialize
raise APIException(‘Timeout in initializing connection.’)
dronekit.APIException: Timeout in initializing connection.
2022-12-28 18:33:47,423 [WARNING] Link timeout, no heartbeat in last 5 seconds
2022-12-28 18:34:12,415 [ERROR] Exception in MAVLink input loop
Traceback (most recent call last):
File “/usr/local/lib/python3.7/dist-packages/dronekit/mavlink.py”, line 211, in mavlink_thread_in
fn(self)
File “/usr/local/lib/python3.7/dist-packages/dronekit/init.py”, line 1371, in listener
self._heartbeat_error)
dronekit.APIException: No heartbeat in 30 seconds, aborting.
2022-12-28 18:34:12,439 [ERROR] Timeout in initializing connection.
Traceback (most recent call last):
File “app.py”, line 41, in
drone = Drone(config)
File “/home/pi/cloudapp-raspi/drone.py”, line 20, in init
self.vehicle = connect(rpi_ip + “:” + str(sim_port), baud=921600, wait_ready=True)
File “/usr/local/lib/python3.7/dist-packages/dronekit/init.py”, line 3166, in connect
vehicle.initialize(rate=rate, heartbeat_timeout=heartbeat_timeout)
File “/usr/local/lib/python3.7/dist-packages/dronekit/init.py”, line 2275, in initialize
raise APIException(‘Timeout in initializing connection.’)
dronekit.APIException: Timeout in initializing connection.
2022-12-28 18:34:19,484 [WARNING] Link timeout, no heartbeat in last 5 seconds