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

ModalAI Forum

  1. ModalAI Support Forum
  2. Software Development
  3. Modal Pipe Architecture (MPA)
  4. Reading data from '/run/mpa/qvio' using python

Reading data from '/run/mpa/qvio' using python

Scheduled Pinned Locked Moved Modal Pipe Architecture (MPA)
4 Posts 2 Posters 1.3k 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.
  • N Offline
    N Offline
    Nishkala
    Contributor
    wrote on last edited by
    #1

    How can we read data from the pipe /run/mpa/qvio in python

    1 Reply Last reply
    0
    • modaltbM Offline
      modaltbM Offline
      modaltb
      ModalAI Team
      wrote on last edited by
      #2

      Hi @Nishkala ,

      I haven't tried this yet, but it's just a file that you are reading from basically (a named pipe), so something like this may get you reading? --> https://stackoverflow.com/questions/39089776/python-read-named-pipe

      In order to parse what you are reading, you will need to use the C headers to see what bytes are what, which is shown here: https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-pipe/-/blob/master/library/include/modal_pipe_interfaces.h#L880

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Nishkala
        Contributor
        wrote on last edited by
        #3

        @modaltb, the links provided were insightful

        Before running a python script similar to the one provided in the link, I executed the commands

        1. 'cat run/mpa/qvio/info': I was able to see information pertaining to qvio.
        2. 'cat run/mpa/qvio/control': I was able to see the message continuously printed related to 'reset_hard_qvio'
        3. 'cat run/mpa/qvio/request': It was blank

        Which pipe should be read to get data in the form of 'vio_data_t'?

        1 Reply Last reply
        0
        • modaltbM Offline
          modaltbM Offline
          modaltb
          ModalAI Team
          wrote on last edited by
          #4

          Hi @Nishkala ,

          With the warning that I've not yet tried in python but I'm sure it will work 😉

          This is the source code for our voxl-inspect-qvio tool, and from there we can see it's looking for a pipe QVIO_EXTENDED_LOCATION
          https://gitlab.com/voxl-public/voxl-sdk/services/voxl-qvio-server/-/blob/master/clients/voxl-inspect-qvio.c#L51

          That's defined here:
          https://gitlab.com/voxl-public/voxl-sdk/services/voxl-qvio-server/-/blob/master/common/voxl_qvio_server.h#L64

          The other place to look for defines is in libmodal-pipe:
          https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-pipe/-/blob/master/library/include

          This is where the inspect tool consumes data:
          https://gitlab.com/voxl-public/voxl-sdk/services/voxl-qvio-server/-/blob/master/clients/voxl-inspect-qvio.c#L259

          Here's where we parse and print the info:
          https://gitlab.com/voxl-public/voxl-sdk/services/voxl-qvio-server/-/blob/master/clients/voxl-inspect-qvio.c#L184

          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