Reading data from '/run/mpa/qvio' using python
-
How can we read data from the pipe /run/mpa/qvio in python
-
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
-
@modaltb, the links provided were insightful
Before running a python script similar to the one provided in the link, I executed the commands
- 'cat run/mpa/qvio/info': I was able to see information pertaining to qvio.
- 'cat run/mpa/qvio/control': I was able to see the message continuously printed related to 'reset_hard_qvio'
- 'cat run/mpa/qvio/request': It was blank
Which pipe should be read to get data in the form of 'vio_data_t'?
-
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-qviotool, and from there we can see it's looking for a pipeQVIO_EXTENDED_LOCATION
https://gitlab.com/voxl-public/voxl-sdk/services/voxl-qvio-server/-/blob/master/clients/voxl-inspect-qvio.c#L51That's defined here:
https://gitlab.com/voxl-public/voxl-sdk/services/voxl-qvio-server/-/blob/master/common/voxl_qvio_server.h#L64The other place to look for defines is in libmodal-pipe:
https://gitlab.com/voxl-public/voxl-sdk/core-libs/libmodal-pipe/-/blob/master/library/includeThis 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#L259Here'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
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