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

Add custom_action plugin #1

Merged
merged 51 commits into from
Jan 14, 2021
Merged

Add custom_action plugin #1

merged 51 commits into from
Jan 14, 2021

Conversation

TSC21
Copy link
Contributor

@TSC21 TSC21 commented Dec 17, 2020

Related JIRA task for context: https://auterion.atlassian.net/browse/MAVSDK-41.

This is the implementation for supporting parsing and execution of custom action waypoints on a mission computer application using the API made available here. For an understanding of the general sequence (from the ground station, to the action execution, to the mission finishing), check the following diagram:

image

A diagram will be added as well to explain the handshake that happens between the MAVSDK client and server. In the meantime, here's the functionalities added:

  1. Parsing MAV_CMD_WAYPOINT_USER_1 Mavlink command to get the custom action ID
  2. Read a JSON file and retrieve the metadata associated to the custom action which ID was retrieved from the command. The JSON file allows the definition of stages for scripts to run or commands to send;
  3. Process the action per stage;
  4. Send progress status through command ACKs to the FMU;
  5. Process COMMAND_CANCEL messages when the FMU cancels the action execution (due a timeout).

On this PR, it is also added a couple more containers and Github Actions jobs to run the integration tests against APX4 releases and the develop branch.

This is an intermediate step for the development of the Autopilot Manager, which in the end is going to be the entity that is going to use this API.

@TSC21 TSC21 force-pushed the pr-add_custom_action_plugin branch from e71ae89 to 0a96271 Compare December 18, 2020 14:58
@TSC21 TSC21 force-pushed the pr-add_custom_action_plugin branch 2 times, most recently from fcb2845 to 4683be2 Compare December 18, 2020 16:23
@TSC21 TSC21 marked this pull request as ready for review January 8, 2021 14:46
@TSC21
Copy link
Contributor Author

TSC21 commented Jan 8, 2021

For SITL testing to past, this requires https://github.com/Auterion/PX4_firmware_private/pull/857 to be merged.

@TSC21 TSC21 force-pushed the pr-add_custom_action_plugin branch from 48d1329 to 59210ad Compare January 11, 2021 09:11
@TSC21 TSC21 force-pushed the pr-add_custom_action_plugin branch from 9751214 to 7c5a713 Compare January 11, 2021 12:12
@TSC21 TSC21 force-pushed the pr-add_custom_action_plugin branch 2 times, most recently from deaa377 to e598363 Compare January 11, 2021 14:49
Copy link
Contributor

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That has made a lot of progress! 🚀

src/core/mavlink_commands.cpp Outdated Show resolved Hide resolved
src/integration_tests/action_goto.cpp Show resolved Hide resolved
src/integration_tests/custom_action.cpp Outdated Show resolved Hide resolved
src/integration_tests/custom_action.cpp Show resolved Hide resolved
src/integration_tests/custom_action.cpp Show resolved Hide resolved
src/plugins/custom_action/custom_action_impl.cpp Outdated Show resolved Hide resolved
src/plugins/custom_action/custom_action_impl.cpp Outdated Show resolved Hide resolved
src/integration_tests/CMakeLists.txt Show resolved Hide resolved
src/integration_tests/follow_me.cpp Show resolved Hide resolved
Copy link
Contributor

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@TSC21
Copy link
Contributor Author

TSC21 commented Jan 14, 2021

LGTM! Thanks!

Took some time but I am happy with the results! Thanks for the help, review and patience @JonasVautherin and @julianoes!

We should eventually inspect what's causing those weird issues on the CI testing (causing it to fail). It's curious this is happening here where we are triggering the execution of Python scripts, because I am seeing similar problems on, for example, px4_ros_com, where I am executing Python testing scripts (also in Github Actions - this wasn't happening in Travis). I am merging this for now but this needs further investigation.

@TSC21 TSC21 merged commit 834b931 into develop Jan 14, 2021
@TSC21 TSC21 deleted the pr-add_custom_action_plugin branch January 14, 2021 11:12
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.

2 participants