maybe this is a band-aid fix, and we actually should make sure the
transition can be achieved in the given 5 seconds, as it is very
reliably in the corresponding gazebo test case. check:
- does SIH_T_MAX make sense?
- does SIH_MASS make sense?
- and any other model parameters which are suspicious
the previously used std::this_thread::sleep_for is with respect to host
system time which is different from autopilot time if:
- speed factor != 1
- something runs slower than realtime regardless of speed factor
- debugging or otherwise interrupting PX4 control code
tester.sleep_for (which already existed) correctly sleeps w.r.t.
px4/simulation time.
wait_until_altitude() checks for absolute altitude being
close so checking for 1m below the setpoint can fail
if the speedup results in no sample inside the altitude
window being checked.
Ideally the test could check if the takeoff is done directly
instead of comparing altitudes in the first place.