-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
Adding Ardupilot SITL to MAVSDK CI #1669
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! It requires the APM containers to be pushed on the mavsdk docker registry, right? I see that the CI is failing to pull them at the moment.
exactly. I did all the tests on my account with all images pushed to my docker hub repo. After everything was working, i quashed all the commits into one so as to keep the pull request clean. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite clean, thank you @ykhedar. Do the tests actually succeed?
@@ -25,61 +25,119 @@ if [[ $AUTOSTART_SITL != 1 ]]; then | |||
exit 0 | |||
fi | |||
|
|||
if [[ -n "$PX4_FIRMWARE_DIR" ]]; then | |||
px4_firmware_dir=$PX4_FIRMWARE_DIR | |||
# PX4 specific SITL Run Code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree we should change the name of these scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite clean, thank you @ykhedar. Do the tests actually succeed?
I have built and pushed the docker images. |
No. The tests are going on forever on the CI so I stopped the workflow. When I checked the logs, this was due to bad telemetry health condition inside a while loop in one of the tests for VTOL. Here is the link to the code: action_transition_multicopter_fixedwing Should we add maybe a break condition in this test instead of letting the while loop run forever? Maybe do the same for all such while loops in all the tests? Just make the test fail if the while condition is not met after 60 seconds or 120 seconds? |
Generally I think it would make sense if the tests did not hang forever 👍. This said, for the health, is it failing because of a difference with Ardupilot? Can we fix |
We should limit the tests to 45mins, like the PX4 SITL ones. And if you want to go through all of them, feel free, but I think it's quite a bit of work. Do the tests run through for you locally? |
How does PX4 SITL implement the limit of 45 minutes? Cant seem to find the setting for this. On my local machine i saw 3 tests pass (i swear :D) which now seems to be incorrect. My bad :( . Should I add a simple timer using std::chrono in the while loop to wait for 30 seconds or so before the loop exits with a failed test? Or do you suggest something better? |
I think @julianoes was referring to this. |
@ykhedar it would be best to use this function for checks with timeout: MAVSDK/src/integration_tests/integration_test_helper.h Lines 69 to 84 in 6ad7dbd
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
2dc875b
to
408ef24
Compare
Just made some changes to the commits (squashed them into one) and your review was made stale by git. Also fetched upstream and merged the new commits into ykhedar/MAVSDK. Apparently 2 out of 34 tests are passing. |
…cking echo statement from start_sitl_px4.sh
Thanks @JonasVautherin for your review. Do we need to get all the Ardupilot related Integration tests to succeed before merging this pull request? |
We already use |
Sounds like a good idea to me. I would do the necessary changes. Something like this:
|
Okay, I did the changes but it seems now some checks related to macOS-framework and ios are failing for some reason and i cannot think of why. Any ideas? :) |
Grmbl I don't get why the ios build sometimes does that 😞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your work @ykhedar!
Following discussion on Issue #728 for adding Ardupilot support in MAVSDK (related issues #1562 and #1568), this pull request adds Ardupilot SITL (Copter, Rover) along with necessary changes needed to run it successfully. Currently onnly 3/34 Integrations tests pass. Some notes about changes made:
run-sitl-tests.sh
,start_px4_sitl.sh
andstop_px4_sitl.sh
to include ardupilot related sitl codes. May need to change the file names in the future. e.g.start_px4_sitl.sh
->start_sitl.sh
.Requesting Review and Suggestions,
ykhedar
P.S. Congrats on the v1.0 release of MAVSDK :)