9
9
from mavsdk import System
10
10
from mavsdk .log_files import LogFilesResult , LogFilesError
11
11
12
- DOCKER_CONTAINERS = ['gisnav-docker_mapserver_1 ' , 'gisnav-docker_sitl_1 ' ]
12
+ DOCKER_CONTAINERS = ['gisnav-mapserver-1 ' , 'gisnav-px4-1' , 'gisnav-micro-ros-agent-1' , 'gisnav-gisnav-1 ' ]
13
13
SYS_ADDR = 'udp://0.0.0.0:14550'
14
14
MISSION_FILE = os .path .join (os .path .dirname (__file__ ), '../assets/ksql_airport.plan' )
15
- MAVLINK_CONNECTION_TIMEOUT_SEC = 15
16
- PRE_FLIGHT_HEALTH_CHECK_TIMEOUT_SEC = 15
15
+ MAVLINK_CONNECTION_TIMEOUT_SEC = 30
16
+ PRE_FLIGHT_HEALTH_CHECK_TIMEOUT_SEC = 30
17
17
LOG_OUTPUT_PATH = os .path .join (os .path .dirname (__file__ ), 'output' )
18
18
19
19
@@ -79,7 +79,7 @@ async def run():
79
79
80
80
async def connect_mavlink (drone ):
81
81
"""Connects to drone via MAVLink"""
82
- print (f'Connecting to drone at "{ SYS_ADDR } "...' )
82
+ print (f'Connecting to drone at "{ SYS_ADDR } " (timeout { MAVLINK_CONNECTION_TIMEOUT_SEC } sec) ...' )
83
83
await drone .connect (system_address = SYS_ADDR )
84
84
async for state in drone .core .connection_state ():
85
85
# This might take a while assuming the Docker containers have not had time to start yet
@@ -90,7 +90,7 @@ async def connect_mavlink(drone):
90
90
91
91
async def check_health (drone ):
92
92
"""Goes through (pre-flight) health checks"""
93
- print ("Going through health-checks..." )
93
+ print (f "Going through health-checks (timeout { PRE_FLIGHT_HEALTH_CHECK_TIMEOUT_SEC } sec) ..." )
94
94
async for health in drone .telemetry .health ():
95
95
if health .is_global_position_ok \
96
96
and health .is_local_position_ok \
0 commit comments