Skip to content
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

SITL integration test demo #1803

Closed
wants to merge 8 commits into from

Conversation

AndreasAntener
Copy link
Member

@thomasgubler @LorenzMeier
Not to merge. Opening this PR for discussing next steps/issues. The demo simulates joystick input to arm and uses a hack to force it into offboard, which will all be obsolete once offboard is in for real.

It contains 2 simple Python unittests and ROS launch files that can be executed either with rostest or catkin_make test. See here: http://youtu.be/Qedhq5O0mYM :)

Launch files: I had to pull up all the iris_empty_world stuff into our top-level launch file to expose the Gazebo arguments (for headless testing). This works of course, but if you like to leave these part in euroc_simulator, the launch files there need to be modified instead. What's best?

Automated testing: I also have a setup ready for a build server with Docker support :) But for that we should take the Docker files out of the PX4 repository. The Docker hub builds the image on every push which makes no sense. I suggest to add a new repository for "container" related stuff (Docker, Vagrant, etc). Something like this: https://github.com/UAVenture/containers
For running the integration tests I added a new container that is based off the existing px4-ros-full: https://github.com/UAVenture/containers/tree/master/docker/ros-indigo/sitl-testing . There we can add other things, like pre-built source dependencies to speed-up the test. I'm thinking of everything except Firmware. But how is it with euroc_simulator and mav_comm? Since they are private, I'm not just going to include them then in a public build ;)

This is how it's supposed to work:
sitl integration test setup

Cheers
ada

@LorenzMeier
Copy link
Member

Awesomeness!

@AndreasAntener I have inquired on the simulator release date. Which parts are still missing for the automatic flight CI from your perspective? I very much would love to push this, we just had a case where a change in the controller introduced non-working offboard control issues, and the faster we can get this up and running the less debugging we have to do ;-).

@AndreasAntener
Copy link
Member Author

At the current state it's basically ready for running on a CI server that supports Docker. But there are open items before it's really usable:

  • integrate offboard work from Thomas, so the hacks are not necessary anymore
  • also add mavros to the container so people can test that stuff too
  • write some decent example tests that show a proper test setup, e.g.
    • one directly working with SITL
    • one controlling it over mavros
  • check if the output from unittest/gtest is already suitable to be integrated with the build server that's going to be used, probably needs some configuration work still

@thomasgubler
Copy link
Contributor

uber cool!

Launch files: I had to pull up all the iris_empty_world stuff into our top-level launch file to expose the Gazebo arguments (for headless testing). This works of course, but if you like to leave these part in euroc_simulator, the launch files there need to be modified instead. What's best?

As long as the changes don't interfere with normal operation I see no reason why we should not make the launch files test compatible.

@LorenzMeier
Copy link
Member

@AndreasAntener I think I lack enough insight and context to really comment on the details, but I would like to encourage to move forward with what you have suggested and push hard to get an initial version up and running. I'd be happy to lend a hand on the weekend. I think this will greatly improve the code quality / stability and we will benefit even from a very basic implementation immediately.

@AndreasAntener
Copy link
Member Author

@LorenzMeier you were talking about the possibility to get an AWS instance for this once :) If we have one I could already prepare the test runtime. (with Jenkins and Docker)
I guess it would need 4Gb memory, 10Gb storage for system plus maybe 10Gb to start with for Docker and test execution.
Or have you had something else in mind?

@LorenzMeier
Copy link
Member

I will get you this over the weekend. I really want to move on it, yes.

@AndreasAntener
Copy link
Member Author

Closing in favour of #1831

@AndreasAntener AndreasAntener deleted the sitl-integration-test branch March 2, 2015 09:28
PX4BuildBot added a commit that referenced this pull request Feb 24, 2022
    - mavlink in PX4/Firmware (6f90bd7): mavlink/mavlink@4b0558d
    - mavlink current upstream: mavlink/mavlink@b568a60
    - Changes: mavlink/mavlink@4b0558d...b568a60

    b568a60f 2022-02-24 Hamish Willee - Update pymavlink to latest (#1805)
b86834e0 2022-02-23 Hamish Willee - Component info - tidy descriptiosn (#1803)
79e9545a 2022-02-23 Hamish Willee - Remove external dialect doc and improve dialect pages (#1802)
fd7ccfbe 2022-02-23 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION - improve linking to command (#1774)
2b7de26c 2022-02-23 Hamish Willee - [Discuss.] MAV_PROTOCOL_CAPABILITY_FTP - supports FTP protocol not specific message (#1772)
a7541658 2022-02-18 Alessandro Ros - fix common.xml include in AVSSUAS (#1800)
5b4482fe 2022-02-17 Hamish Willee - RFC 0016 - Mavlink Standard Modes - Add to development.xml
4ee1eebb 2022-02-15 Thomas-Li-AVSS - AVSS dialect version 2 (#1795)
51441f82 2022-02-16 Julian Oes - PREFLIGHT_STORAGE: use lowercase, don't shout (#1797)
4071353f 2022-02-16 Beat Küng - actuators.schema.json: add optional title and help url (#1798)
b724aab5 2022-02-16 Hamish Willee - Reinstate MAV_PROTOCOL_CAPABILITY_PARAM_UNION
PX4BuildBot added a commit that referenced this pull request Feb 26, 2022
    - mavlink in PX4/Firmware (95358ae501e92687b00d2786bc8eadf28ff93930): mavlink/mavlink@4ee1eeb
    - mavlink current upstream: mavlink/mavlink@b568a60
    - Changes: mavlink/mavlink@4ee1eeb...b568a60

    b568a60f 2022-02-24 Hamish Willee - Update pymavlink to latest (#1805)
b86834e0 2022-02-23 Hamish Willee - Component info - tidy descriptiosn (#1803)
79e9545a 2022-02-23 Hamish Willee - Remove external dialect doc and improve dialect pages (#1802)
fd7ccfbe 2022-02-23 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION - improve linking to command (#1774)
2b7de26c 2022-02-23 Hamish Willee - [Discuss.] MAV_PROTOCOL_CAPABILITY_FTP - supports FTP protocol not specific message (#1772)
a7541658 2022-02-18 Alessandro Ros - fix common.xml include in AVSSUAS (#1800)
5b4482fe 2022-02-17 Hamish Willee - RFC 0016 - Mavlink Standard Modes - Add to development.xml
dagar pushed a commit that referenced this pull request Feb 26, 2022
    - mavlink in PX4/Firmware (95358ae501e92687b00d2786bc8eadf28ff93930): mavlink/mavlink@4ee1eeb
    - mavlink current upstream: mavlink/mavlink@b568a60
    - Changes: mavlink/mavlink@4ee1eeb...b568a60

    b568a60f 2022-02-24 Hamish Willee - Update pymavlink to latest (#1805)
b86834e0 2022-02-23 Hamish Willee - Component info - tidy descriptiosn (#1803)
79e9545a 2022-02-23 Hamish Willee - Remove external dialect doc and improve dialect pages (#1802)
fd7ccfbe 2022-02-23 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION - improve linking to command (#1774)
2b7de26c 2022-02-23 Hamish Willee - [Discuss.] MAV_PROTOCOL_CAPABILITY_FTP - supports FTP protocol not specific message (#1772)
a7541658 2022-02-18 Alessandro Ros - fix common.xml include in AVSSUAS (#1800)
5b4482fe 2022-02-17 Hamish Willee - RFC 0016 - Mavlink Standard Modes - Add to development.xml
junwoo091400 pushed a commit to junwoo091400/PX4-Autopilot that referenced this pull request Mar 17, 2022
    - mavlink in PX4/Firmware (95358ae501e92687b00d2786bc8eadf28ff93930): mavlink/mavlink@4ee1eeb
    - mavlink current upstream: mavlink/mavlink@b568a60
    - Changes: mavlink/mavlink@4ee1eeb...b568a60

    b568a60f 2022-02-24 Hamish Willee - Update pymavlink to latest (PX4#1805)
b86834e0 2022-02-23 Hamish Willee - Component info - tidy descriptiosn (PX4#1803)
79e9545a 2022-02-23 Hamish Willee - Remove external dialect doc and improve dialect pages (PX4#1802)
fd7ccfbe 2022-02-23 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION - improve linking to command (PX4#1774)
2b7de26c 2022-02-23 Hamish Willee - [Discuss.] MAV_PROTOCOL_CAPABILITY_FTP - supports FTP protocol not specific message (PX4#1772)
a7541658 2022-02-18 Alessandro Ros - fix common.xml include in AVSSUAS (PX4#1800)
5b4482fe 2022-02-17 Hamish Willee - RFC 0016 - Mavlink Standard Modes - Add to development.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants