ModalAI uORB topic file handle location
-
@Dan I'm not familiar with the
/obj
directory. That must be a Nuttx specific thing. What exactly are you trying to find out? Can you use the PX4listener
command? -
This post is deleted! -
This post is deleted! -
@Eric-Katzfey
Re: ModalAI uORB topic file handle locationHi Eric. Thanks for getting back to me.
Quite possibly this is a Nuttx thing. I can use the listener just fine however I'm interested to dive a bit deeper into how you ship this data comes across from the DSP and whether I can potentially access that data directly without using uORB. I know I can use uORB to subscribe and get a file descriptor but I thought I'd ask and see if there are alternatives.
Is there documentation on ModalAI uORB implementation for the DSP?
-
@Dan It's not really documented anywhere other than the source code. The best place to look is at the muorb module code. That is what implements the uorb communicator interface to allow advertisements, subscription requests, and topic data to flow between the DSP and the Linux side.
-
OK great. Thanks Eric. I'll take a look and come back here if I have any further questions.
-
@Dan BTW: MUORB stands for multiprocessor UORB just in case you were wondering.
-
I was actually. That's useful - Thanks!
-
Please correct me if my understanding is wrong. I just want to catch you whilst our time zones overlap.
I've just briefly looked through the code for MuORB and uORB. It seems that MuORB registers as a communicator with the uORB Manager and provides a bunch of callbacks that eventually invoke particular functions in the manager when the respective action happens (subscribe, callback, advertise, unsubscribe). I see
process_remote_topic()
callingorb_advertise()
which ends up callinguORB::Utils::node_mkpath(nodepath, messageName)
which in the implementation is://----------------------------------------------------------------------------- //----------------------------------------------------------------------------- int uORB::Utils::node_mkpath(char *buf, const char *orbMsgName) { unsigned len; unsigned index = 0; len = snprintf(buf, orb_maxpath, "/%s/%s%d", "obj", orbMsgName, index); if (len >= orb_maxpath) { return -ENAMETOOLONG; } return OK; }
This path (notice the
/obj
) then goes intonode_open()
which should create a file descriptor usingpx4_open()
with the name/obj/<topic_name><index>
.Can you see point me to where I'm going wrong in my understanding as we've discussed before this directory doesn't exist on VOXL2.
-
@Dan You have to look for the definition of the px4_open function. On Nuttx it is defined as the OS open function. Otherwise it is defined as an external function. Look at src/lib/cdev/posix/cdev_platform.cpp
-
Thanks again Eric. Looks like that was the part I was missing. I'll take a look.