In general, if anything goes wrong in the startup script, we
should fail entirely because things might not work as expected.
In particular, this prevents that we have to press Ctrl+C twice if the
simulator start call is hung waiting for the simulator to appear and
start communicating. We now press Ctrl+C once and exit straightaway
whereas before we would press it once to get the warning:
"Startup script returned with return value: 2",
and then finally exit on the second press.
Unfortunately this commit contains two things:
1. Some cleanup and renaiming.
2. An additional wait until lockstep has been initialized.
By waiting until HIL_SENSOR messages arrive including timestamps we
stop the startup script and prevent other modules from running until
time is set up. This should resolve some busy waiting by various
modules and prevent races on initialization (e.g. the landing state
being subscribed by mavlink before being published by the land
detector).
The previous boot configuration took at minimum one second to boot. This is in particular significant in tests when the system is often started and stopped
The test was testing the result of 3D float vector operations with binary equality of the floating point numbers, which is not a valid assumption to make for floating point math. This change switches to proper comparisons with float accuracy and compares vectors using the norm of their difference.
This is a check to protect a user from upload a mission which includes a
land_start marker as well as a RTL mission item.
This works around the problem that we experienced where the navigator
would switch to mission mode on RTL and start with land_start, and then
continue to the RTL item. At this point, navigator would send the
vehicle_command for RTL to commander which would deny it because it is
already in RTL mode. Thus navigator won't (re)set any items to actually
do RTL and it means the vehicle will just head to whatever setpoint it
received last.