mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-05 07:28:29 -04:00
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:
parent
f60ecbfe4e
commit
f2ec97e4c7
@ -5958,10 +5958,10 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
|||||||
def RangeFinder(self):
|
def RangeFinder(self):
|
||||||
'''Test RangeFinder'''
|
'''Test RangeFinder'''
|
||||||
# the following magic numbers correspond to the post locations in SITL
|
# 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 = {
|
rangefinder_params = {
|
||||||
"SIM_SONAR_ROT": 6,
|
"SIM_SONAR_ROT": 0,
|
||||||
}
|
}
|
||||||
rangefinder_params.update(self.analog_rangefinder_parameters())
|
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:
|
if m.voltage == 0:
|
||||||
raise NotAchievedException("Did not get non-zero voltage")
|
raise NotAchievedException("Did not get non-zero voltage")
|
||||||
want_range = 10
|
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))
|
raise NotAchievedException("Expected %fm got %fm" % (want_range, m.distance))
|
||||||
|
|
||||||
def DepthFinder(self):
|
def DepthFinder(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user