-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MAVSDK tests #13772
Merged
Merged
Add MAVSDK tests #13772
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
4221311
to
f8d0e75
Compare
Lockstep simulation depending on |
dagar
previously approved these changes
Dec 23, 2019
6b230df
to
aba0948
Compare
Test failure:
|
That's why there are the timeouts. It's because the timeout params are not adjusted to lockstep. |
6790f30
to
483f017
Compare
Thanks! I missed that and I've fixed that here: 1f5df35 Let's see what a grind run with 100 iterations does now. I still believe there is a sensor init race somewhere. |
We now error if px4 or gzserver are already running on startup, and we also make sure to terminate what we started if interrupted.
And we also need to communicate the speed factor for the px4 executable, otherwise it can't adapt the timeouts accordingly.
The executable contains all tests, so the name was a poor choice.
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).
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.
This enables unfamiliar users to run the tests quickly without having to memorize all commandsline options.
This should ensure that all processes do still run at full load.
This is cleaner and needs testing.
05ef7ac
to
a17da30
Compare
@dagar This is good to go now if it passes. |
This allows to run the script in grind mode to find CI failures that are triggered through e.g. race conditions.
Bash or zsh from the last 10 years or so do math using the $((a + b)) syntax. This saves us from having bc as dependency.
This is reasonable as these boards are very old and rovers are a new area of activity.
These are rarely used airframes that should not be missed.
These are rarely used airframes that should not be missed.
This ensures that the user is pushed back to the airframe configuration stage.
a17da30
to
f7f4a75
Compare
This still captures all commits, but does not cover the merged state of the PR. All PRs need to be up-to-date before merging/rebasing, which is better practice anyway.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work in progress to add integration tests using MAVSDK.
FYI @Stifael, @dagar
Currently needs MAVSDK installed system-wide (e.g.
/usr/local/
).Todo:
Dependencies:
psutil:
Install MAVSDK:
https://github.com/mavlink/MAVSDK
To build:
To run:
I'm not done yet with this convenience target - it builds, but it is missing the iris model file generation step.
Closes mavlink/MAVSDK#885.