Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. Add thrid party library to voxl-cross

Add thrid party library to voxl-cross

Scheduled Pinned Locked Moved Ask your questions right here!
4 Posts 3 Posters 516 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    remill
    wrote on last edited by
    #1

    Hi,

    I would like to use a third party library to interface my sensor with voxl2, but I don't find the documentation on how to add a new library on voxl-cross.

    I assume to be able to run on voxl2 it need to be compile with voxl-cross. Am I correct ? I also try and build directly on the voxl2 with cmake over adb but the performance are much lower than using voxl-cross (I run a c programme that compute the 50th first pi decimal just for test).

    What would be the best path to make it work ?

    The library I look to use is libcaer for inivation sensor. https://gitlab.com/inivation/dv/libcaer

    Thank for your help.

    Eric KatzfeyE 1 Reply Last reply
    0
    • R remill

      Hi,

      I would like to use a third party library to interface my sensor with voxl2, but I don't find the documentation on how to add a new library on voxl-cross.

      I assume to be able to run on voxl2 it need to be compile with voxl-cross. Am I correct ? I also try and build directly on the voxl2 with cmake over adb but the performance are much lower than using voxl-cross (I run a c programme that compute the 50th first pi decimal just for test).

      What would be the best path to make it work ?

      The library I look to use is libcaer for inivation sensor. https://gitlab.com/inivation/dv/libcaer

      Thank for your help.

      Eric KatzfeyE Offline
      Eric KatzfeyE Offline
      Eric Katzfey
      ModalAI Team
      wrote on last edited by
      #2

      @remill Normally what we do is build these libraries and create a Debian package to install them. Then, when building the application that depends on the library it is installed at build time using the install_build_deps.sh script. An example of this is: https://gitlab.com/voxl-public/voxl-sdk/third-party/voxl-jpeg-turbo/-/tree/dev?ref_type=heads which creates a package for the jpeg-turbo library. Then an application that uses it, like voxl-portal, will list that as a dependency in the script: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-portal/-/blob/dev/install_build_deps.sh?ref_type=heads#L16

      R 1 Reply Last reply
      0
      • Eric KatzfeyE Eric Katzfey

        @remill Normally what we do is build these libraries and create a Debian package to install them. Then, when building the application that depends on the library it is installed at build time using the install_build_deps.sh script. An example of this is: https://gitlab.com/voxl-public/voxl-sdk/third-party/voxl-jpeg-turbo/-/tree/dev?ref_type=heads which creates a package for the jpeg-turbo library. Then an application that uses it, like voxl-portal, will list that as a dependency in the script: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-portal/-/blob/dev/install_build_deps.sh?ref_type=heads#L16

        R Offline
        R Offline
        remill
        wrote on last edited by
        #3

        @Eric-Katzfey

        Ok thanks for you clarification, I will try it and see how it goes.

        zauberflote1Z 1 Reply Last reply
        0
        • R remill

          @Eric-Katzfey

          Ok thanks for you clarification, I will try it and see how it goes.

          zauberflote1Z Online
          zauberflote1Z Online
          zauberflote1
          ModalAI Team
          wrote on last edited by
          #4

          @remill
          You can also add a FetchContent CMake declaration that will build your library during compilation. Here is an example for yaml-cpp

          include(FetchContent)
          
          # Fetch yaml-cpp from GitHub
          FetchContent_Declare(
            yaml-cpp
            GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
            GIT_TAG yaml-cpp-0.6.3
          )
          
          # Disable yaml-cpp tests
          set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "" FORCE)
          set(YAML_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE) #cross 4.0 quits the chat if building static
          FetchContent_MakeAvailable(yaml-cpp)
          # Confirm target exists
          if (TARGET yaml-cpp)
              add_library(yaml-cpp::yaml-cpp ALIAS yaml-cpp)
          endif()
          
          install(FILES
              ${yaml-cpp_BINARY_DIR}/libyaml-cpp.so
              ${yaml-cpp_BINARY_DIR}/libyaml-cpp.so.0.6
              ${yaml-cpp_BINARY_DIR}/libyaml-cpp.so.0.6.3
              DESTINATION ${CMAKE_INSTALL_LIBDIR}
          )
          
          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          ModalAI
          Categories Recent Tags ModalAI.com Docs
          © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups