autotest: correct Rover RangeFinder test

for reasons I can't fathom, defaulting the rangefinder state causes problems with the vehicle orientation in SITL - probably a state update fix somewhere.

This test was kind of broken anyway - the RangeFinder was pointing latterally out from the vehicle, but is displayed forward of the vehicle (ther RANGEFINDER mavlink message conveys no orientation information)
This commit is contained in:
Peter Barker 2024-07-29 19:12:47 +10:00 committed by Peter Barker
parent f60ecbfe4e
commit f2ec97e4c7

View File

@ -5958,10 +5958,10 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
def RangeFinder(self):
'''Test RangeFinder'''
# the following magic numbers correspond to the post locations in SITL
home_string = "%s,%s,%s,%s" % (51.8752066, 14.6487840, 54.15, 315)
home_string = "%s,%s,%s,%s" % (51.8752066, 14.6487840, 54.15, 231)
rangefinder_params = {
"SIM_SONAR_ROT": 6,
"SIM_SONAR_ROT": 0,
}
rangefinder_params.update(self.analog_rangefinder_parameters())
@ -5976,7 +5976,7 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
if m.voltage == 0:
raise NotAchievedException("Did not get non-zero voltage")
want_range = 10
if abs(m.distance - want_range) > 0.1:
if abs(m.distance - want_range) > 0.5:
raise NotAchievedException("Expected %fm got %fm" % (want_range, m.distance))
def DepthFinder(self):