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

[FEAT] Support conan-based installation of librealuvc dependencies #11

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

vabrador
Copy link

@vabrador vabrador commented Dec 31, 2020

Work-in-progress. Do not merge. Works great! -John

Hi platforms team! This is Nick from the tracking team (they/them). I wanted to have librealuvc set up for easy building so I could get low-level access to the Rigel camera & images for some hacking/experimental projects.

This PR sets up a conanfile.py for conan to install these dependencies. You can contrast these version numbers against the numbers in build.sh; these were picked to be as close as possible while still pulling from the conan-center repository:

  • "boost/1.70.0",
  • "eigen/3.3.7",
  • "opencv/4.5.0",
  • "protobuf/3.9.1"

It also modifies the readme to start with conan-based dependency installation instructions. I don't know for sure if my local machine is already set up for other dependencies, but if that's the case, we should just be able to add more libraries to the conanfile to have a proper build configuration.

It also modifies the central CMakeLists.txt to:

  • Have some explicit structure, added while I was trying to understand what was going on
  • Add and document the necessary invocations that tie in to the conan setup

I currently think this branch is essentially "done" for having a basic conan build setup; running the commands in the readme now, I can quickly build and successfully run viewer.exe and get Rigel images out. From the readme:

conan install . --install-folder build -r conan-center
conan build . --build-folder build

The -r conan-center part is necessary if you've modified your conan remote setup for building e.g. libtrack by changing your default remote to gitlab. If you don't have conan-center defined you may need to add it:

conan remote add conan-center https://conan.bintray.com

However, librealuvc is important to the libtrack stack, so I expect we'll want to sync a bit before accepting a change like this, since it changes some of the pulled-in dependency versions in order to easily reference available versions in the conan-center package repository.


Hi, this is John from the Tracking Team. I just added Github Actions Continuous Integration to this PR to help everyone verify that it works (on Windows). This should make it easier to test and merge new PRs coming down the pipeline.

Specifically sets up a conanfile for conan to install these dependencies:
    "boost/1.70.0",
    "eigen/3.3.7",
    "opencv/4.5.0",
    "protobuf/3.9.1"
@vabrador vabrador added the enhancement New feature or request label Dec 31, 2020
@zalo zalo requested review from Niram7777 and TomHeyUL March 3, 2021 02:31
@zalo zalo changed the title [WIP] Support conan-based installation of librealuvc dependencies [FEAT] Support conan-based installation of librealuvc dependencies Mar 3, 2021
@zalo zalo self-assigned this Mar 3, 2021
Copy link

@Niram7777 Niram7777 left a comment

Choose a reason for hiding this comment

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

  1. Darren already implemented the conan recipe in gitlab (for Windows/Linux/Android)

  2. Otherwise if we want to go the Open Source way, I would go with https://github.com/conan-io/conan-center-index/blob/master/docs/how_to_add_packages.md (not touching this repo)

  3. If you are not satisfied with some config of the gitlab::conan-librealuvc, I would suggest you add your settings on top.
    So that you don't miss fixes like CONAN_OPENCV_ROOT for Android, or replacing CONAN_PKG::opencv in some CMake.

  4. libusb could be taken from conan.io but that may be outside the scope of this PR (and wasn't done either in gitlab)

  5. Your CI could build/publish for Windows/Linux/Android

@zalo
Copy link

zalo commented Mar 3, 2021

Thank you, Marin; I hadn't seen the Gitlab Recipes, these are indeed super helpful.

Given that they're all in the private Gitlab space, I see two options:

  • Have the Github Action pull the gitlab::conan-librealuvc repo, and execute it via secret tokens.
  • Move the meat of the Gitlab CI process into the public repo, and have the Gitlab process be a thin-shell for executing that.

or I suppose:

  • Leave it as is and close this since there's already adequate Conan-based CI in Gitlab 😁

(The primary casualty of this being public access/convenience)

@nickjbenson How do you feel about these options?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants