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

ModalAI Forum

  1. ModalAI Support Forum
  2. Software Development
  3. ROS
  4. Setting up Voxl2 MicroDDS Communication with PX4

Setting up Voxl2 MicroDDS Communication with PX4

Scheduled Pinned Locked Moved ROS
8 Posts 3 Posters 2.2k Views
  • 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.
  • James KDHJ Offline
    James KDHJ Offline
    James KDH
    wrote on last edited by
    #1

    Hello, I tried following this guide to set up Voxl2 MicroDDS Communication with PX4. After running the two commands given in the documentation:

    1. apt install -y voxl-microdds-agent
    2. voxl-configure-microdds

    I don't see any uORB topics published in ROS2. I have tried using voxl-inspect-services and the micro-dds-agent is indeed running in the voxl2. Am I missing something here? Thanks!
    2fcb5fb6-d37c-4bd5-816e-9f4b0bc7f9bb-image.png

    1 Reply Last reply
    0
    • James KDHJ Offline
      James KDHJ Offline
      James KDH
      wrote on last edited by
      #2

      I am running SDK version 1.35 on starling 2.

      1 Reply Last reply
      0
      • Zachary Lowell 0Z Offline
        Zachary Lowell 0Z Offline
        Zachary Lowell 0
        ModalAI Team
        wrote on last edited by
        #3

        Hi @James-KDH - just to confirm have you installed ros2 foxy and the mpa-to-ros2 deb's on there as well? Those packages contain all the prebuilt ros2 messages that allow you to see the topics.

        apt-get install voxl-ros2-foxy && apt-get install voxl-mpa-to-ros2

        followed by voxl-configure-mpa-to-ros2 - then please do a reboot o nthe entire system and then check the output of the dds via ros2 topic list and if nothing is there please paste the following:

        systemctl status voxl-microdds-agent and paste the output here.

        Thanks!

        James KDHJ 1 Reply Last reply
        0
        • Zachary Lowell 0Z Zachary Lowell 0

          Hi @James-KDH - just to confirm have you installed ros2 foxy and the mpa-to-ros2 deb's on there as well? Those packages contain all the prebuilt ros2 messages that allow you to see the topics.

          apt-get install voxl-ros2-foxy && apt-get install voxl-mpa-to-ros2

          followed by voxl-configure-mpa-to-ros2 - then please do a reboot o nthe entire system and then check the output of the dds via ros2 topic list and if nothing is there please paste the following:

          systemctl status voxl-microdds-agent and paste the output here.

          Thanks!

          James KDHJ Offline
          James KDHJ Offline
          James KDH
          wrote on last edited by
          #4

          @Zachary-Lowell-0 Yes I have installed ros2 foxy and the mpa-to-ros2 deb. Running the command:

          systemctl status voxl-microdds-agent
          

          Gives this output:
          ca7e0437-0050-4014-93b4-694f0e42da53-image.png

          Meanwhile running :

          ros2 topic list
          

          Still gives nothing:
          c58fe8da-ff79-4a68-8866-0b41b13112f2-image.png

          1 Reply Last reply
          0
          • James KDHJ Offline
            James KDHJ Offline
            James KDH
            wrote on last edited by
            #5

            Hello, I managed to fix this issue. Turns out the ROS domain ID needs to be 0 (by default), I set it to 1 previously and could not echo out the fmu topics. By simply setting it to 0 again i am able to see the /fmu topics now.

            export ROS_DOMAIN_ID=0
            

            However I encounter another issue where I am unable to see the /fmu out topics in an external computer but voxl2 can see topics that are being published by the computer as shown in the image below.
            f4f99c1a-c7a5-4bce-9682-0cafe3457062-fmu_topics_not_found_on_external_computer.png

            Also is there a way to remap the topic names ? i.e from /fmu to /drone_1.

            To give some context, me and my lab is trying to experiment with indoor swarming. Thus it is essential for the drones to be able to communicate with each other (such as via ROS2).

            1 Reply Last reply
            0
            • B Offline
              B Offline
              brahim
              Contributor
              wrote on last edited by
              #6

              Make sure these variables are set on the voxl2 and external pc:

              ROS_DOMAIN_ID = 0
              ROS_LOCALHOST_ONLY = 0

              You can check if multicast is enabled on both sides with this command (assuming external pc is linux):

              ifconfig | grep -i multicast
              

              This should show multicast enabled for the interface (wifi or ethernet) connected to the external pc via network.

              James KDHJ 1 Reply Last reply
              0
              • B brahim

                Make sure these variables are set on the voxl2 and external pc:

                ROS_DOMAIN_ID = 0
                ROS_LOCALHOST_ONLY = 0

                You can check if multicast is enabled on both sides with this command (assuming external pc is linux):

                ifconfig | grep -i multicast
                

                This should show multicast enabled for the interface (wifi or ethernet) connected to the external pc via network.

                James KDHJ Offline
                James KDHJ Offline
                James KDH
                wrote on last edited by
                #7

                @brahim I tried setting on both the voxl2 and external PC

                ROS_DOMAIN_ID = 0
                ROS_LOCALHOST_ONLY = 0
                

                and I am still unable to see the /fmu topics on the external pc. Running

                ifconfig | grep -i multicast
                

                Results in something like in both the external pc and voxl2.

                bond0: flags=5123<UP,BROADCAST,MASTER,MULTICAST>  mtu 1500
                docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
                wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
                

                Which indicates that multicast enabled on both the external pc and voxl2.

                1 Reply Last reply
                0
                • James KDHJ Offline
                  James KDHJ Offline
                  James KDH
                  wrote on last edited by
                  #8

                  Okay I managed to solve the problem. The reason why my external pc is unable to see the /fmu topics is probably due to the voxl-microdds-agent service starting before the network is fully "set up". From this stack overflow topic, I edited my /etc/systemd/system/voxl-microdds-agent.service file to include the line ExecStartPre=/bin/sh -c 'until ping -c1 google.com; do sleep 1; done; (this is the only "hacky" method that somehow worked). My entire service file is:

                  [Unit]
                  Description=voxl-microdds-agent
                  SourcePath=/usr/bin/MicroXRCEAgent
                  After=network.target
                  After=multi-user.target
                  
                  # After=network-online.target
                  # Wants=network-online.target
                  
                  [Service]
                  User=root
                  Type=simple
                  ExecStartPre=/bin/sh -c 'until ping -c1 google.com; do sleep 1; done;'
                  ExecStart=/usr/bin/MicroXRCEAgent udp4 -p 8888
                  
                  [Install]
                  WantedBy=multi-user.target
                  

                  After modifying the service file and rebooting the voxl2, the external computer can now see and echo topics from the /fmu. This will obviously not work if the voxl2 is not connected to the internet.. However you can still manually fix this by ssh or adb shell into the voxl2 and restart the service using the commands:

                  systemctl stop voxl-microdds-agent
                  systemctl start voxl-microdds-agent
                  

                  and the external computer should be able to see /fmu topics.

                  On a side note, to customize & add a prefix to the /fmu topic such that it is /drone1/fmu/ in ROS2, edit the px4 start up script /usr/bin/voxl-px4-start. There is a line that starts the microdds_client for px4 where:

                  # Start microdds_client for ros2 offboard messages from agent over localhost
                  microdds_client start -t udp -h 127.0.0.1 -p 8888 
                  

                  Simply add -n <desired _name> such that it becomes:

                  # Start microdds_client for ros2 offboard messages from agent over localhost
                  microdds_client start -t udp -h 127.0.0.1 -p 8888 -n drone2
                  
                  1 Reply Last reply
                  1
                  • T teddy.zaremba referenced this topic on

                  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