diff --git a/dronekit/tools/__init__.py b/dronekit/tools/__init__.py index 8b0d9e9c4..7d3366001 100644 --- a/dronekit/tools/__init__.py +++ b/dronekit/tools/__init__.py @@ -13,7 +13,8 @@ def setup_sitl(): global sitl - sitl = SITL('copter', '3.3-rc5') + sitl = SITL() + sitl.download('copter', '3.3') sitl.launch(sitl_args, await_ready=True, restart=True) def teardown_sitl(): diff --git a/requirements.txt b/requirements.txt index d538d87df..928cd69c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,4 @@ nose>=1.3.7 psutil>=3.0.0 mock>=1.3.0 six>=1.9.0 -dronekit-sitl>=2.3.0,<=2.99999 +dronekit-sitl>=3.0,<=3.99999 diff --git a/tests/sitl/test_goto.py b/tests/sitl/test_goto.py index 89cbbff19..c6bbdcf29 100644 --- a/tests/sitl/test_goto.py +++ b/tests/sitl/test_goto.py @@ -19,10 +19,8 @@ def test_goto(connpath): # NOTE these are *very inappropriate settings* # to make on a real vehicle. They are leveraged # exclusively for simulation. Take heed!!! - vehicle.parameters['ARMING_CHECK'] = 0 - vehicle.parameters['FS_THR_ENABLE'] = 0 vehicle.parameters['FS_GCS_ENABLE'] = 0 - vehicle.parameters['EKF_CHECK_THRESH'] = 0 + vehicle.parameters['FS_EKF_THRESH'] = 100 def arm_and_takeoff(aTargetAltitude): """ @@ -48,6 +46,10 @@ def arm_and_takeoff(aTargetAltitude): time.sleep(1) i = i - 1 + # EKF warmup. Await that EKF's predicted horizontal position (absolute) estimate is good + while not vehicle._ekf_predposhorizabs: + time.sleep(1) + vehicle.armed = True i = 60