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. VOXL MPA_TO_ROS Topic publishing

VOXL MPA_TO_ROS Topic publishing

Scheduled Pinned Locked Moved Ask your questions right here!
10 Posts 3 Posters 1.3k Views 3 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.
  • Darshit DesaiD Offline
    Darshit DesaiD Offline
    Darshit Desai
    Regular
    wrote on last edited by
    #1

    Hi Is there a way to publish only a selected few topics using the voxl_mpa_to_ros_node, right now it publishes a lot of topics which I am not using and it might be slowing down the rest of my application. If there is either a way to block topics like hires_camera_image and other topics like /tof_ir, /tof_conf using cli or some code changes by modifying the package please let me know

    Eric KatzfeyE 1 Reply Last reply
    0
    • Darshit DesaiD Darshit Desai

      Hi Is there a way to publish only a selected few topics using the voxl_mpa_to_ros_node, right now it publishes a lot of topics which I am not using and it might be slowing down the rest of my application. If there is either a way to block topics like hires_camera_image and other topics like /tof_ir, /tof_conf using cli or some code changes by modifying the package please let me know

      Eric KatzfeyE Offline
      Eric KatzfeyE Offline
      Eric Katzfey
      ModalAI Team
      wrote on last edited by
      #2

      @Darshit-Desai Have you looked at the voxl_mpa_to_ros code? Can you see how it is setting these things up?

      Darshit DesaiD 1 Reply Last reply
      0
      • Eric KatzfeyE Eric Katzfey

        @Darshit-Desai Have you looked at the voxl_mpa_to_ros code? Can you see how it is setting these things up?

        Darshit DesaiD Offline
        Darshit DesaiD Offline
        Darshit Desai
        Regular
        wrote on last edited by
        #3

        @Eric-Katzfey I can have a look at the code and could also clone the package available on gitlab modify it in my loc catkin_ws and use that. My question was is there a direct way by changing some .conf file or maybe a launch file inside the mpa_to_ros package or do I need to delete the topic advertisements from the code

        Alex KushleyevA 1 Reply Last reply
        0
        • Darshit DesaiD Darshit Desai

          @Eric-Katzfey I can have a look at the code and could also clone the package available on gitlab modify it in my loc catkin_ws and use that. My question was is there a direct way by changing some .conf file or maybe a launch file inside the mpa_to_ros package or do I need to delete the topic advertisements from the code

          Alex KushleyevA Offline
          Alex KushleyevA Offline
          Alex Kushleyev
          ModalAI Team
          wrote on last edited by Alex Kushleyev
          #4

          @Darshit-Desai ,

          There is already some logic that monitors if number of ROS subscribers to a particular topic is zero or greater. If it is zero, the publishing of ROS messages should stop.

          Link Preview Image
          catkin_ws/src/src/interface_manager.cpp · master · voxl / VOXL SDK / Utilities / voxl-mpa-to-ros · GitLab

          rosnode to capture desired data from MPA

          favicon

          GitLab (gitlab.com)

          However, it seems, the MPA clients are still going to receive the data into the mpa callback (but exits before publishing, if there are no ROS clients):

          Link Preview Image
          catkin_ws/src/src/interfaces/camera_interface.cpp · master · voxl / VOXL SDK / Utilities / voxl-mpa-to-ros · GitLab

          rosnode to capture desired data from MPA

          favicon

          GitLab (gitlab.com)

          If you wanted to completely stop the data flow to the mpa_to_ros node, the existing interfaces in this project would need to close the pipe (using pipe_client_close() ) if there are no ROS clients for that particular interface. Then the pipe would need to be re-opened again once the ROS clients subscribe again.

          Darshit DesaiD 1 Reply Last reply
          0
          • Alex KushleyevA Alex Kushleyev

            @Darshit-Desai ,

            There is already some logic that monitors if number of ROS subscribers to a particular topic is zero or greater. If it is zero, the publishing of ROS messages should stop.

            Link Preview Image
            catkin_ws/src/src/interface_manager.cpp · master · voxl / VOXL SDK / Utilities / voxl-mpa-to-ros · GitLab

            rosnode to capture desired data from MPA

            favicon

            GitLab (gitlab.com)

            However, it seems, the MPA clients are still going to receive the data into the mpa callback (but exits before publishing, if there are no ROS clients):

            Link Preview Image
            catkin_ws/src/src/interfaces/camera_interface.cpp · master · voxl / VOXL SDK / Utilities / voxl-mpa-to-ros · GitLab

            rosnode to capture desired data from MPA

            favicon

            GitLab (gitlab.com)

            If you wanted to completely stop the data flow to the mpa_to_ros node, the existing interfaces in this project would need to close the pipe (using pipe_client_close() ) if there are no ROS clients for that particular interface. Then the pipe would need to be re-opened again once the ROS clients subscribe again.

            Darshit DesaiD Offline
            Darshit DesaiD Offline
            Darshit Desai
            Regular
            wrote on last edited by Darshit Desai
            #5

            @Alex-Kushleyev interesting, I will have a look there. I saw in the documentation that I can also subscribe to specific libmodal pipes, but it was mentioned only for C code, is there a possibility I could use the data streamed on those pipes directly in my c++ code, I would eliminate a whole lot of code debugging which I need to do with the mpa_to_ros node

            In my current setup, I only subscribe to /tflite_data (tflite uses hires_small_grey image internally) , /tof_pc.

            In this scenario I would still be using Ros to publish some data using the same c++ file

            Alex KushleyevA 1 Reply Last reply
            0
            • Darshit DesaiD Darshit Desai

              @Alex-Kushleyev interesting, I will have a look there. I saw in the documentation that I can also subscribe to specific libmodal pipes, but it was mentioned only for C code, is there a possibility I could use the data streamed on those pipes directly in my c++ code, I would eliminate a whole lot of code debugging which I need to do with the mpa_to_ros node

              In my current setup, I only subscribe to /tflite_data (tflite uses hires_small_grey image internally) , /tof_pc.

              In this scenario I would still be using Ros to publish some data using the same c++ file

              Alex KushleyevA Offline
              Alex KushleyevA Offline
              Alex Kushleyev
              ModalAI Team
              wrote on last edited by
              #6

              @Darshit-Desai ,

              You can use the MPA C interface directly in C++, for example the mpa_to_ros interface / node is written in C++.

              If you wanted to quickly disable some interfaces in the mpa_to_ros node, you can do it here: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros/-/blob/master/catkin_ws/src/src/interface_manager.cpp?ref_type=heads#L118 - this part of the code queries the list of all available pipes and creates interfaces for all the pipes that have ROS interfaces written for them. You can just comment out the ones that you don't need.

              What other data would you want to stream via MPA directly (and where would you want to send it? is it within VOXL2 or external PC?)

              Darshit DesaiD 1 Reply Last reply
              0
              • Alex KushleyevA Alex Kushleyev

                @Darshit-Desai ,

                You can use the MPA C interface directly in C++, for example the mpa_to_ros interface / node is written in C++.

                If you wanted to quickly disable some interfaces in the mpa_to_ros node, you can do it here: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros/-/blob/master/catkin_ws/src/src/interface_manager.cpp?ref_type=heads#L118 - this part of the code queries the list of all available pipes and creates interfaces for all the pipes that have ROS interfaces written for them. You can just comment out the ones that you don't need.

                What other data would you want to stream via MPA directly (and where would you want to send it? is it within VOXL2 or external PC?)

                Darshit DesaiD Offline
                Darshit DesaiD Offline
                Darshit Desai
                Regular
                wrote on last edited by
                #7

                @Alex-Kushleyev so essentially everything inside the switch case from line#191 to #205 in the file you linked above

                Everything is supposed to be processed on voxl2 no external PC is involved yet. That's why I was thinking if I could directly just get the tof_pc and the tflite_data. Also the AI detection interface also publishes the bounding box draw on the image to Ros topic and the voxl-portal using the hires_small_grey image what if I want to disable that too, since I have validated my Neural net functionality already and for the functioning of my algorithm I just need the bbox coordinates.

                Also the pointcloudinterface would still publish the /tof_conf, /tof_depth and /tof_ir images, that is also extra processing being done by the node which I don't need

                Alex KushleyevA 1 Reply Last reply
                0
                • Darshit DesaiD Darshit Desai

                  @Alex-Kushleyev so essentially everything inside the switch case from line#191 to #205 in the file you linked above

                  Everything is supposed to be processed on voxl2 no external PC is involved yet. That's why I was thinking if I could directly just get the tof_pc and the tflite_data. Also the AI detection interface also publishes the bounding box draw on the image to Ros topic and the voxl-portal using the hires_small_grey image what if I want to disable that too, since I have validated my Neural net functionality already and for the functioning of my algorithm I just need the bbox coordinates.

                  Also the pointcloudinterface would still publish the /tof_conf, /tof_depth and /tof_ir images, that is also extra processing being done by the node which I don't need

                  Alex KushleyevA Offline
                  Alex KushleyevA Offline
                  Alex Kushleyev
                  ModalAI Team
                  wrote on last edited by
                  #8

                  @Darshit-Desai , you should take a look at the source code of the inspect tools that we have written :

                  Link Preview Image
                  tools · master · voxl / VOXL SDK / Utilities / voxl-mpa-tools · GitLab

                  Tools and utilities specific to MPA.

                  favicon

                  GitLab (gitlab.com)

                  They provide many examples of simple MPA clients. You can make your own tools based on these, the easiest way is just to utilize this project (build environment, etc), just add a new executable that does what you need and add a few lines to CMakeLists.txt to build it.

                  Darshit DesaiD 1 Reply Last reply
                  0
                  • Alex KushleyevA Alex Kushleyev

                    @Darshit-Desai , you should take a look at the source code of the inspect tools that we have written :

                    Link Preview Image
                    tools · master · voxl / VOXL SDK / Utilities / voxl-mpa-tools · GitLab

                    Tools and utilities specific to MPA.

                    favicon

                    GitLab (gitlab.com)

                    They provide many examples of simple MPA clients. You can make your own tools based on these, the easiest way is just to utilize this project (build environment, etc), just add a new executable that does what you need and add a few lines to CMakeLists.txt to build it.

                    Darshit DesaiD Offline
                    Darshit DesaiD Offline
                    Darshit Desai
                    Regular
                    wrote on last edited by
                    #9

                    @Alex-Kushleyev Hi I have been trying to build my modified mpa to ros package in voxl-cross but it seems like it isn't installting dependencies properly Here is the terminal output

                    voxl-cross(2.7):~((sdk-1.1.0))(0.3.7)$ ./install_build_deps.sh qrb5165 sdk-1.
                    sdk-1.0  sdk-1.1  
                    voxl-cross(2.7):~((sdk-1.1.0))(0.3.7)$ ./install_build_deps.sh qrb5165 sdk-1.1 
                    using qrb5165 sdk-1.1 debian repo
                    Ign:1 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ InRelease
                    Ign:2 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ Release
                    Get:3 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ Packages [23.0 kB]
                    Fetched 23.0 kB in 0s (59.7 kB/s)
                    Reading package lists... Done
                    installing: 
                    libmodal-json
                    libmodal-pipe
                    libvoxl-cutils
                    Reading package lists... Done
                    Building dependency tree       
                    Reading state information... Done
                    The following NEW packages will be installed:
                      libmodal-json:arm64 libmodal-pipe:arm64 libvoxl-cutils:arm64
                    0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
                    Need to get 136 kB of archives.
                    After this operation, 0 B of additional disk space will be used.
                    Get:1 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ libmodal-json 0.4.3 [43.8 kB]
                    Get:2 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ libmodal-pipe 2.9.2 [85.9 kB]
                    Get:3 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ libvoxl-cutils 0.1.1 [6228 B]
                    Fetched 136 kB in 0s (299 kB/s)                
                    Selecting previously unselected package libmodal-json:arm64.
                    (Reading database ... 30777 files and directories currently installed.)
                    Preparing to unpack .../libmodal-json_0.4.3_arm64.deb ...
                    Unpacking libmodal-json:arm64 (0.4.3) ...
                    Selecting previously unselected package libmodal-pipe:arm64.
                    Preparing to unpack .../libmodal-pipe_2.9.2_arm64.deb ...
                    Unpacking libmodal-pipe:arm64 (2.9.2) ...
                    Selecting previously unselected package libvoxl-cutils:arm64.
                    Preparing to unpack .../libvoxl-cutils_0.1.1_arm64.deb ...
                    Unpacking libvoxl-cutils:arm64 (0.1.1) ...
                    Setting up libvoxl-cutils:arm64 (0.1.1) ...
                    Setting up libmodal-json:arm64 (0.4.3) ...
                    Setting up libmodal-pipe:arm64 (2.9.2) ...
                    Processing triggers for libc-bin (2.27-3ubuntu1.6) ...
                    
                    Done installing dependencies
                    
                    voxl-cross(2.7):~((sdk-1.1.0))(0.3.7)$ ./clean.sh 
                    voxl-cross(2.7):~((sdk-1.1.0))(0.3.7)$ ./build.sh qrb5165 
                    ./build.sh: line 46: /opt/ros/melodic/setup.bash: No such file or directory
                    voxl-cross(2.7):~((sdk-1.1.0))(0.3.7)$
                    

                    On the readme it does say to use sudo voxl-docker -i voxl-emulator this command but I don't have the emulator installed so I am using voxl-cross instead

                    Alex KushleyevA 1 Reply Last reply
                    0
                    • Darshit DesaiD Darshit Desai

                      @Alex-Kushleyev Hi I have been trying to build my modified mpa to ros package in voxl-cross but it seems like it isn't installting dependencies properly Here is the terminal output

                      voxl-cross(2.7):~((sdk-1.1.0))(0.3.7)$ ./install_build_deps.sh qrb5165 sdk-1.
                      sdk-1.0  sdk-1.1  
                      voxl-cross(2.7):~((sdk-1.1.0))(0.3.7)$ ./install_build_deps.sh qrb5165 sdk-1.1 
                      using qrb5165 sdk-1.1 debian repo
                      Ign:1 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ InRelease
                      Ign:2 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ Release
                      Get:3 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ Packages [23.0 kB]
                      Fetched 23.0 kB in 0s (59.7 kB/s)
                      Reading package lists... Done
                      installing: 
                      libmodal-json
                      libmodal-pipe
                      libvoxl-cutils
                      Reading package lists... Done
                      Building dependency tree       
                      Reading state information... Done
                      The following NEW packages will be installed:
                        libmodal-json:arm64 libmodal-pipe:arm64 libvoxl-cutils:arm64
                      0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
                      Need to get 136 kB of archives.
                      After this operation, 0 B of additional disk space will be used.
                      Get:1 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ libmodal-json 0.4.3 [43.8 kB]
                      Get:2 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ libmodal-pipe 2.9.2 [85.9 kB]
                      Get:3 http://voxl-packages.modalai.com ./dists/qrb5165/sdk-1.1/binary-arm64/ libvoxl-cutils 0.1.1 [6228 B]
                      Fetched 136 kB in 0s (299 kB/s)                
                      Selecting previously unselected package libmodal-json:arm64.
                      (Reading database ... 30777 files and directories currently installed.)
                      Preparing to unpack .../libmodal-json_0.4.3_arm64.deb ...
                      Unpacking libmodal-json:arm64 (0.4.3) ...
                      Selecting previously unselected package libmodal-pipe:arm64.
                      Preparing to unpack .../libmodal-pipe_2.9.2_arm64.deb ...
                      Unpacking libmodal-pipe:arm64 (2.9.2) ...
                      Selecting previously unselected package libvoxl-cutils:arm64.
                      Preparing to unpack .../libvoxl-cutils_0.1.1_arm64.deb ...
                      Unpacking libvoxl-cutils:arm64 (0.1.1) ...
                      Setting up libvoxl-cutils:arm64 (0.1.1) ...
                      Setting up libmodal-json:arm64 (0.4.3) ...
                      Setting up libmodal-pipe:arm64 (2.9.2) ...
                      Processing triggers for libc-bin (2.27-3ubuntu1.6) ...
                      
                      Done installing dependencies
                      
                      voxl-cross(2.7):~((sdk-1.1.0))(0.3.7)$ ./clean.sh 
                      voxl-cross(2.7):~((sdk-1.1.0))(0.3.7)$ ./build.sh qrb5165 
                      ./build.sh: line 46: /opt/ros/melodic/setup.bash: No such file or directory
                      voxl-cross(2.7):~((sdk-1.1.0))(0.3.7)$
                      

                      On the readme it does say to use sudo voxl-docker -i voxl-emulator this command but I don't have the emulator installed so I am using voxl-cross instead

                      Alex KushleyevA Offline
                      Alex KushleyevA Offline
                      Alex Kushleyev
                      ModalAI Team
                      wrote on last edited by
                      #10

                      @Darshit-Desai , if you don't have the emulator docker, the next best thing to do is to build the package right on target, using ./build.sh native option. please try.

                      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