Skip to content

autotest: bring the rover to rest at the end of DriveMaxRCIN - #34044

Open
peterbarker wants to merge 1 commit into
ArduPilot:masterfrom
peterbarker:pr-claude2/pr/drivemaxrcin-stop
Open

autotest: bring the rover to rest at the end of DriveMaxRCIN#34044
peterbarker wants to merge 1 commit into
ArduPilot:masterfrom
peterbarker:pr-claude2/pr/drivemaxrcin-stop

Conversation

@peterbarker

Copy link
Copy Markdown
Contributor

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)

  • Checked by a human programmer
  • Non-functional change
  • No-binary change
  • Infrastructure change (e.g. unit tests, helper scripts)
  • Automated test(s) verify changes (e.g. unit test, autotest)
  • Tested manually, description below (e.g. SITL)
  • Tested on hardware
  • Logs attached
  • Logs available on request

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant