autotest: bring the rover to rest at the end of DriveMaxRCIN - #34044
Open
peterbarker wants to merge 1 commit into
Open
autotest: bring the rover to rest at the end of DriveMaxRCIN#34044peterbarker wants to merge 1 commit into
peterbarker wants to merge 1 commit into
Conversation
DriveMaxRCIN drives at full throttle for 30 seconds and then disarms and returns immediately. Disarming stops the motors but not the vehicle: the rover coasts on for well over ten seconds. Under --parallel a worker runs many tests in one SITL session, so the next test inherits that momentum. SafetySwitch ran next and begins with "Make sure we don't start moving when safety switch enabled", asserting wait_groundspeed(0, 0.1, minimum_duration=2) immediately. It was entering that wait at 1.68m/s and spending its whole 30s budget waiting for a coast-down it had not caused, failing when it ran out with 0.6s of the 2s settle accumulated. Centre the sticks and wait for the rover to come to rest before finishing. A test is entitled to assume it starts from a standstill. The 0.2m/s bound is chosen from measurement: coasting from ~15m/s the approach to zero is asymptotic, and 0.1m/s is not reliably reachable inside wait_groundspeed's 30s budget - it timed out at 0.14m/s. 0.2m/s is reached with plenty to spare, and drops SafetySwitch's entry speed from 1.68m/s to 0.11m/s, which it now satisfies in three samples instead of twenty-eight.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stops vehicle before we go onto the next test. "Stationary" is a reasonable thing for the next test to be able to assume, and depending on ordering lack of it can cause the next thing to fail.
Classification & Testing (check all that apply and add your own)
Description
DriveMaxRCIN drives at full throttle for 30 seconds and then disarms and returns immediately. Disarming stops the motors but not the vehicle: the rover coasts on for well over ten seconds.
Under --parallel a worker runs many tests in one SITL session, so the next test inherits that momentum. SafetySwitch ran next and begins with "Make sure we don't start moving when safety switch enabled", asserting wait_groundspeed(0, 0.1, minimum_duration=2) immediately. It was entering that wait at 1.68m/s and spending its whole 30s budget waiting for a coast-down it had not caused, failing when it ran out with 0.6s of the 2s settle accumulated.
Centre the sticks and wait for the rover to come to rest before finishing. A test is entitled to assume it starts from a standstill.
The 0.2m/s bound is chosen from measurement: coasting from ~15m/s the approach to zero is asymptotic, and 0.1m/s is not reliably reachable inside wait_groundspeed's 30s budget - it timed out at 0.14m/s. 0.2m/s is reached with plenty to spare, and drops SafetySwitch's entry speed from 1.68m/s to 0.11m/s, which it now satisfies in three samples instead of twenty-eight.