-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
base: master
Are you sure you want to change the base?
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.
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": |
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.
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.
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.
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.
recipes/mavlink/all/conanfile.py
Outdated
cmake_layout(self, src_folder="src") | ||
|
||
def package_id(self): | ||
self.info.clear() |
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.
This package is not independent of the options.dialect
. Having different dialect means generating different headers, isn't it?
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.
Good point. Thanks! Limited it to just settings
.
self.info.clear() | ||
|
||
def build_requirements(self): | ||
self.tool_requires("cpython/[>=3.12 <4]") |
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.
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.
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 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.
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 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:
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).
Details