Several helper scripts assumes bash is available at /bin/bash. That breaks on systems
such as NixOS, where bash is resolved from PATH instead of a fixed /bin location and
causes failures like `bad interpreter` during `make format`, e.g., on my host machine:
```sh
$ make format
/PX4-Autopilot/Tools/astyle/check_code_style.sh: /PX4-Autopilot/Tools/astyle/fix_code_style.sh: /bin/bash: bad interpreter: No such file or directory
```
This change switches these entrypoints to `#!/usr/bin/env bash` so they locate bash properly.
No functional changes intended.
Signed-off-by: Onur Özkan <work@onurozkan.dev>
* test: increase altitude tolerance to fix flaky test
Altitude tolerance increased from 0.1f to 0.15f to handle simulation
timing variations. Test was failing at 0.201m with 0.2m tolerance.
* test: increase altitude tolerance further to 0.3m
* ci: re-add branch trigger for SITL tests
* Revert "ci: re-add branch trigger for SITL tests"
This reverts commit e5e4c9637b70a9d29247b82a52e11f1f2d0dcc59.
* Update to latest mavlink that includes support for WIP warnings
* mavsdk_tests: pass build for now
We need this until the figure eight stuff has moved to common.
---------
Co-authored-by: Julian Oes <julian@oes.ch>
From https://github.com/google/fuzztest.
This will now also add gtest (via cmake FetchContent)
And requires newer cmake (container updates):
CMake 3.19 or higher is required. You are running version 3.16.3
PX4 needs a bit of time to process an uploaded mission before it is
ready to accept the mission mode.
Therefore, we need to wait a bit.
Alternatively, we could wait on the mission progress arriving properly,
but this sleep is simple enough for now.
* mavsdk_tests: add multicopter alt hold test
* fix test filter
* increase altitude tolerance to 10m as a test
* reduce to 1m tolerance
* increase to 5m tolerance
* increase to 2m tolerance
* reduce back to 1m
* delay 60 seconds
* fix log upload
* fix ulog upload path
* make altitude tolerance in tester.wait_until_altitude configurable
* fix lambda
* default arg in declaration
* tighten up tolerance
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.
This is a workaround to hotfix CI but the root cause is #22792
(MAVSDK test failing after EKF change, accelerometer simulation issues not learned anymore?)
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.
- add functionality to specify world name for simulation in case name
- add test for triggering an airspeed invalidation in case of pitot blockage
- add test for high wind (ramped up wind over short period) to NOT invalidate airspeed in this case
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>