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

mavsdk: add mavlink and mavsdk recipes #26136

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Dec 8, 2024

Summary

Changes to recipe: mavsdk/2.13.0

Motivation

MAVSDK is a set of libraries providing a high-level API to MAVLink.
MAVLink is a very lightweight messaging protocol for communicating with drones (and between onboard drone components).

Packaging status

Details


@valgur valgur changed the title [mavsdk] add mab [mavsdk] add mavlink and mavsdk recipes Dec 8, 2024
@valgur valgur changed the title [mavsdk] add mavlink and mavsdk recipes mavsdk: add mavlink and mavsdk recipes Dec 8, 2024
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

I don't think this can be moved forward until there is some way to install dynamically Python pip dependencies on custom virtualenvs on the fly, but that will take time. Otherwise the requirements of pymavlink won't be there and it would fail.

pymavlink:
url: "https://github.com/ArduPilot/pymavlink/archive/refs/tags/v2.4.42.tar.gz"
sha256: "bbe1b78759211597c98214e31b6dfc9cc42b3cb4548c813674463cb664b56a9f"
"1.0.12.cci.20240530":
Copy link
Member

Choose a reason for hiding this comment

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

Why this specific commit back in May?
For a new recipe, without upstream release, I think starting with just a current commit would be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's the mavlink version used by the latest mavsdk. The latest mavlink version (which is also included in the recipe) was causing issues, if I remember correctly.

cmake_layout(self, src_folder="src")

def package_id(self):
self.info.clear()
Copy link
Member

Choose a reason for hiding this comment

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

This package is not independent of the options.dialect. Having different dialect means generating different headers, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Thanks! Limited it to just settings.

self.info.clear()

def build_requirements(self):
self.tool_requires("cpython/[>=3.12 <4]")
Copy link
Member

Choose a reason for hiding this comment

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

But pymavlink requires other transitive dependencies that will not be found: https://github.com/ArduPilot/pymavlink/blob/master/requirements.txt, this will most likely fail.

Copy link
Member

Choose a reason for hiding this comment

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

I have tested this and it indeed fails:

CUSTOMBUILD : error : Could not find a version that satisfies the requirement lxml>=3.6.0 (from versions: none) [C:\Users\memsharded\.conan2\p\b\mavli7342ae94e4fe c\b\build\generate_c_headers.vcxproj]

This seems quite a challenge to me.

Copy link
Contributor Author

@valgur valgur Dec 12, 2024

Choose a reason for hiding this comment

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

I replaced the pip install ... && python -m pymavlink.tools.mavgen ... call via CMake with a direct self.run() for a better control over the temporary Python env. A temporary site-packages folder is created in the build folder, and caching is disabled to not pollute ~/.cache/pip.

I have used the same pattern for Python build-time deps in a few other recipes and it has worked without issues, afaik:

@valgur valgur requested a review from memsharded December 12, 2024 15:44
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.

[request] MAVSDK/2.1.0
3 participants