Commit Graph

41 Commits

Author SHA1 Message Date
Silvan Fuhrer 5efcde7412 mavsdk_tests: add two new tests for VTOLs
- 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>
2023-11-09 09:42:43 +01:00
Daniel Agar 6991ac014c
rename 'gazebo' simulation to 'gazebo-classic' (#20936)
- use `gazebo-classic` everywhere consistently referring to the original Gazebo (eg version 9,10,11)
   - additional `gazebo_*` helper targets added for compatibility, but warn about deprecation and tell you the new target naming
 - use `gz` everywhere when referring to Gazebo (aka Ignition Gazebo or new Gazebo)
2023-01-15 11:36:12 -05:00
Daniel Agar 618288cca9 SITL Gazebo classic make airframes simulator specific 2023-01-07 17:00:35 -05:00
Daniel Agar 4040e4cdf2 simulation organization and cleanup
- new modules/simulation directory to collect all simulators and related modules
 - new Tools/simulation directory to collect and organize scattered simulation submodules, scripts, etc
 - simulation module renamed to simulator_mavlink
 - sih renamed to simulator_sih (not a great name, but I wanted to be clear it was a simulator)
 - ignition_simulator renamed to simulator_ignition_bridge
 - large sitl_target.cmake split by simulation option and in some cases pushed to appropriate modules
 - sitl targets broken down to what's actually available (eg jmavsim only has 1 model and 1 world)
 - new Gazebo consistently referred to as Ignition for now (probably the least confusing thing until we fully drop Gazebo classic support someday)
2022-08-25 09:10:03 -04:00
Julian Oes 2d8ebc6839 mavsdk_tests: add timestamp to log output
The timestamp is added when the output is queued up, rather than later
when the queue is emptied and some time might have passed.
2022-01-06 09:24:32 -05:00
Julian Oes dd6fb58f82 mavsdk_tests: don't stall mavsdk_tests binary
This is an attempt to fix the test failure where PX4 detects an RC
timeout presumably because the tester process mavsdk_tests is stalled
and does not send RC control messages in time.
2022-01-06 09:24:32 -05:00
Julian Oes 199b5e7d48 Revert "mavsdk_tests: retry gz model spawn command"
This reverts commit c15d3f7cfa.
2021-12-20 13:05:46 -05:00
TSC21 9894598b63 mavsdk_tests: update to be able to fetch rtps builds as well 2021-12-20 13:05:46 -05:00
Julian Oes 94884594bb mavsdk_tests: check gzserver and gz model calls
This adds two checks to make sure gzserver has actually started before
continuing, and also whether the gz model call was successful.
2021-12-08 07:26:32 +01:00
Julian Oes c15d3f7cfa mavsdk_tests: retry gz model spawn command
This should help when gzserver does not respond yet and we end up
without a model and hence can't connect later and time out.

This change also required a fix to prevent the tester to hang on
terminating all runners. By using poll instead of only read we can
prevent that and actually properly join the logger thread.
2021-12-02 11:40:26 -05:00
Julian Oes 1e88939605 mavsdk_tests: report speed factor every second
This helps in debugging slow CI.
2021-04-06 11:35:18 -04:00
Julian Oes aca1e85da4 mavsdk_tests: don't forget to check for rootfs dir 2021-02-11 22:25:07 +01:00
Julian Oes 2971ce8664 mavsdk_tests: don't clear logs 2021-02-11 22:25:07 +01:00
Daniel Agar f5660c6b0c mavsdk_tests: adjust px4 and gzserver priority relative to mavsdk_test
- this is to avoid starving the test runner
2020-11-16 15:55:10 -05:00
JaeyoungLim 9d3e159e65
Make mavsdk test runner handle generated sdf files (#15797)
Update sitl_gazebo
Fix indent errors
Fix syntax error
Fix indentation errors
Fix syntax errors
use autopep8
2020-09-29 15:44:58 +02:00
Julian Oes e7651c94f6 mavsdk_tests: use custom rootfs, reset it
Instead of messing with existing params, use a separate rootfs for
tests, as suggested by @bkueng.
2020-09-16 12:51:56 -04:00
Julian Oes 8d3f1e63f0 mavsdk_tests: use all os env vars by default 2020-09-16 12:51:56 -04:00
Beat Küng 055fa768d8 posix: enable ROMFSROOT
This will copy the ROMFS into the build directory under etc/, and thus
needs a change of the PX4 startup parameters and mixer paths.
2020-09-15 09:30:16 +02:00
Matthias Grob 480cd5ed4e mavsdk_tests: load all os environment variables for gazebo client
such that OpenGL options are also used for mavsdk_tests when the GUI
is enabled.
2020-07-09 16:43:34 +02:00
Julian Oes 262341455b mavsdk_tests: map stderr to stdout
That way we don't need to collect it separately.
2020-05-29 11:46:14 +02:00
Julian Oes 76750fc8a6 mavsdk_tests: collect buffered up stdout output
Somehow only subprocess.stdout.readline() works at a time. In order not
to miss out on some of the stdout output, we need to collect it all at
the end. Also, we can stop using readline() for processes that have quit
already.
2020-05-29 11:46:14 +02:00
Julian Oes cc0b834d15 mavsdk_tests: don't fail if DISPLAY is not set 2020-04-10 14:55:18 +02:00
Julian Oes 54fe3c5fd5 mavsdk_tests: remove waitforgz helper, add sleep
This is an attempt to workaround the gz spawn timeout in CI.
Let's just hard-code a sleep before spawning the model.
2020-04-08 16:56:52 +02:00
Julian Oes be9f125c3d mavsdk_tests: raise timeout for czspawn
And provide better output about what happened.
2020-04-03 11:45:35 +02:00
Julian Oes 28f4dc10ae mavsdk_tests: make sure all log output is printed
This fixes the issue where the last lines of the log output was not
printed in case of error or on the verbose setting. This meant that
essentially the actual test error was not printed.

The fix involves two parts:
1. Firstly collect the output again even if a process has exited.
2. Collect all lines at once and not one line per iteration.
2020-04-03 11:45:35 +02:00
Julian Oes 2a37321293 mavsdk_tests: wait a bit longer for gazebo command
Otherwise this triggers in CI sometimes.
2020-03-31 14:37:37 +02:00
Julian Oes 0edc2aa334 mavsdk_tests: don't stall on timeout 2020-03-31 14:37:37 +02:00
Julian Oes 29c102b205 mavsdk_tests: wait for gz to run for model spawn 2020-03-23 10:55:13 +01:00
JaeyoungLim b1d3b95ebf Add gzmdoelspawning to mavsdk tests 2020-03-23 10:55:13 +01:00
Julian Oes 89599f345f mavsdk_tests: c++ test_runner is now mavsdk_tests 2020-03-18 17:57:41 +00:00
Julian Oes ade39481ad mavsdk_tests: only env vars that are set
Otherwise this raises a KeyError.
2020-03-18 17:57:41 +00:00
Julian Oes 759e3d6a04 mavsdk_tests: pass PX4_HOME_ env variables on
This way tests can be run at different locations.
2020-03-18 17:57:41 +00:00
Julian Oes 4a91d791b1 mavsdk_tests: remove commented out code 2020-03-18 17:57:41 +00:00
Julian Oes eb1141bbea mavsdk_tests: remove unused import 2020-03-18 17:57:41 +00:00
Julian Oes b1ceef5b93 mavsdk_tests: add combined log 2020-03-18 17:57:41 +00:00
Julian Oes 814d79cb32 mavsdk_tests: improve log file folder structure 2020-03-18 17:57:41 +00:00
Julian Oes 8283d19682 mavsdk_tests: print overall results 2020-03-18 17:57:41 +00:00
Julian Oes a208129921 mavsdk_tests: satisfy mypy type checks 2020-03-18 17:57:41 +00:00
Julian Oes 12252c97c5 mavsdk_tests: further argument cleanup, some types 2020-03-18 17:57:41 +00:00
Julian Oes ff64d87ae6 mavsdk_tests: import naming, easier coloring 2020-03-18 17:57:41 +00:00
Julian Oes 11a28840f3 mavsdk_tests: split up Python script
Otherwise, the script will get a tangled mess.
2020-03-18 17:57:41 +00:00