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. How to use custom libmodal_pipe in MPA service

How to use custom libmodal_pipe in MPA service

Scheduled Pinned Locked Moved Ask your questions right here!
3 Posts 2 Posters 806 Views
  • 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.
  • Steve AriasS Offline
    Steve AriasS Offline
    Steve Arias
    Contributor
    wrote on last edited by Steve Arias
    #1

    I've forked libmodal_pipe (https://gitlab.com/SteveArias1/libmodal_pipe) and have made changes to this forked repo. I have generated and installed an ipk package of this custom libmodal_pipe via voxl-docker -i voxl-cross and the other usual commands that follow (./install_build_deps.sh stable, etc.). I'm able to install this custom version of libmodal_pipe on the VOXL board. It's running this custom libmodal_pipe on the board as we speak..

    I've made a new MPA service that uses libmodal_pipe. I've been using voxl-docker to build and install this service to the VOXL board. Specifically, I use the voxl-cross docker image and run a custom ./install_build_deps.sh script which downloads libmodal_pipe, libmodal_json and voxl-mavlink from the stable opkg repo (http://voxl-packages.modalai.com/stable).

    I want to use a custom function that I made in the custom libmodal_pipe library in my MPA service. How can I use the custom libmodal_pipe library that I have? I can't use opkg to get it since the stable repo only has the stable ipk packages that ModalAI provides by default.

    1 Reply Last reply
    0
    • James StrawsonJ Offline
      James StrawsonJ Offline
      James Strawson
      ModalAI Team
      wrote on last edited by
      #2

      Hi Steve,

      It's possible for you to host your own opkg repo and point opkg to two repositories simultaneously. You could also install the new ipk in your docker manually without the install_build_deps.sh script and then "commit" the docker image so it's still there next time you start it.

      I briefly checked out your fork and I would suggest two alternate routes:

      1. The simple helper does the same sort of raw read on the pipe that your new function does, but with additional checks and signal handlers to ensure safe start/stop behavior. This is extensively tested and took a while to be robust.

      2. There is an existing function called pipe_client_get_fd(int ch) in the library that will allow you to retrieve the pipe file descriptor and do any custom read behaviors you desire should the helper threads not over your specific use case. You can then have your raw_read function built into your custom project without needing to rebuild libmodal_pipe or worry about managing that separate dependency.

      I hope this helps,
      James

      Steve AriasS 1 Reply Last reply
      0
      • James StrawsonJ James Strawson

        Hi Steve,

        It's possible for you to host your own opkg repo and point opkg to two repositories simultaneously. You could also install the new ipk in your docker manually without the install_build_deps.sh script and then "commit" the docker image so it's still there next time you start it.

        I briefly checked out your fork and I would suggest two alternate routes:

        1. The simple helper does the same sort of raw read on the pipe that your new function does, but with additional checks and signal handlers to ensure safe start/stop behavior. This is extensively tested and took a while to be robust.

        2. There is an existing function called pipe_client_get_fd(int ch) in the library that will allow you to retrieve the pipe file descriptor and do any custom read behaviors you desire should the helper threads not over your specific use case. You can then have your raw_read function built into your custom project without needing to rebuild libmodal_pipe or worry about managing that separate dependency.

        I hope this helps,
        James

        Steve AriasS Offline
        Steve AriasS Offline
        Steve Arias
        Contributor
        wrote on last edited by
        #3

        @James-Strawson thanks for the suggestions!

        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

        • Don't have an account? Register

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