ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    ModalAI uORB topic file handle location

    VOXL 2
    2
    12
    696
    Loading More Posts
    • 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.
    • Eric KatzfeyE
      Eric Katzfey ModalAI Team @Dan
      last edited by Eric Katzfey

      @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 PX4 listener command?

      D 2 Replies Last reply Reply Quote 0
      • D
        Dan @Eric Katzfey
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • D
          Dan
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • D
            Dan @Eric Katzfey
            last edited by

            @Eric-Katzfey
            Re: ModalAI uORB topic file handle location

            Hi 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?

            Eric KatzfeyE 1 Reply Last reply Reply Quote 0
            • Eric KatzfeyE
              Eric Katzfey ModalAI Team @Dan
              last edited by

              @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.

              D 1 Reply Last reply Reply Quote 1
              • D
                Dan @Eric Katzfey
                last edited by

                @Eric-Katzfey

                OK great. Thanks Eric. I'll take a look and come back here if I have any further questions.

                Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                • Eric KatzfeyE
                  Eric Katzfey ModalAI Team @Dan
                  last edited by

                  @Dan BTW: MUORB stands for multiprocessor UORB just in case you were wondering.

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    Dan @Eric Katzfey
                    last edited by

                    @Eric-Katzfey

                    I was actually. That's useful - Thanks!

                    1 Reply Last reply Reply Quote 0
                    • D
                      Dan
                      last edited by

                      @Eric-Katzfey

                      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() calling orb_advertise() which ends up calling uORB::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 into node_open() which should create a file descriptor using px4_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.

                      Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                      • Eric KatzfeyE
                        Eric Katzfey ModalAI Team @Dan
                        last edited by

                        @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

                        D 1 Reply Last reply Reply Quote 1
                        • D
                          Dan @Eric Katzfey
                          last edited by

                          @Eric-Katzfey

                          Thanks again Eric. Looks like that was the part I was missing. I'll take a look.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Powered by NodeBB | Contributors