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

ModalAI Forum

  1. ModalAI Support Forum
  2. Software Development
  3. ROS
  4. Unable to echo ros2 topic from drone to a computer

Unable to echo ros2 topic from drone to a computer

Scheduled Pinned Locked Moved ROS
14 Posts 2 Posters 4.9k 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.
  • AniruddhaA Aniruddha

    Hello, I was trying to use subscribe to ros2 topics from drone to my computer. I can see the ros2 topics lists from drone on to the computer. But when it try to use ros2 topic echo command from computer I am getting following error.

    terminate called after throwing an instance of 'std::bad_alloc'
    what(): std::bad_alloc

    If I use echo on drone I can see topics printing. but can't do it on computer. can anyone help me with this.

    A Offline
    A Offline
    ApoorvThapliyal
    Contributor
    wrote on last edited by
    #2

    Hey @Aniruddha,
    Thanks for reaching out, could you provide more information about your setup and how things are communicating?

    AniruddhaA 1 Reply Last reply
    0
    • A ApoorvThapliyal

      Hey @Aniruddha,
      Thanks for reaching out, could you provide more information about your setup and how things are communicating?

      AniruddhaA Offline
      AniruddhaA Offline
      Aniruddha
      Contributor
      wrote on last edited by
      #3

      @ApoorvThapliyal, Hi, I set ros domain id on both drone and the pc. they are connected it through the access point. I can ping both drone and pc from one and another and I can even connect drone to qgroundcontrol. That is why I am thinking it might be the ros side issue. I also check for micro dds agent and it was enable and running. I have setup the static ip on drone. I added following command in /etc/dhcpcd.conf file

      interface wlan0
      static ip_address=192.168.x.xx/24
      static routers=192.168.x.xx
      static domain_name_servers=8.8.8.8

      Let me know if you need anything else you need.

      A 1 Reply Last reply
      0
      • AniruddhaA Aniruddha

        @ApoorvThapliyal, Hi, I set ros domain id on both drone and the pc. they are connected it through the access point. I can ping both drone and pc from one and another and I can even connect drone to qgroundcontrol. That is why I am thinking it might be the ros side issue. I also check for micro dds agent and it was enable and running. I have setup the static ip on drone. I added following command in /etc/dhcpcd.conf file

        interface wlan0
        static ip_address=192.168.x.xx/24
        static routers=192.168.x.xx
        static domain_name_servers=8.8.8.8

        Let me know if you need anything else you need.

        A Offline
        A Offline
        ApoorvThapliyal
        Contributor
        wrote on last edited by
        #4

        Hey @Aniruddha
        As I understand it, you are able to see the topics on your computer but cant echo them. Which topic are you trying to echo so I can try to recreate it on my end?

        AniruddhaA 2 Replies Last reply
        0
        • A ApoorvThapliyal

          Hey @Aniruddha
          As I understand it, you are able to see the topics on your computer but cant echo them. Which topic are you trying to echo so I can try to recreate it on my end?

          AniruddhaA Offline
          AniruddhaA Offline
          Aniruddha
          Contributor
          wrote on last edited by
          #5

          @ApoorvThapliyal I was trying to echo /imu_apps

          1 Reply Last reply
          0
          • A ApoorvThapliyal

            Hey @Aniruddha
            As I understand it, you are able to see the topics on your computer but cant echo them. Which topic are you trying to echo so I can try to recreate it on my end?

            AniruddhaA Offline
            AniruddhaA Offline
            Aniruddha
            Contributor
            wrote on last edited by
            #6

            @ApoorvThapliyal I forgot to mention that the error occurred on drone side for voxl_mpa_to_ros2_node. While on computer it is not printing anything

            A 1 Reply Last reply
            0
            • AniruddhaA Aniruddha

              @ApoorvThapliyal I forgot to mention that the error occurred on drone side for voxl_mpa_to_ros2_node. While on computer it is not printing anything

              A Offline
              A Offline
              ApoorvThapliyal
              Contributor
              wrote on last edited by
              #7

              Hey @Aniruddha
              I tried recreating the issue on my setup using a Starling V2 Max connected to my computer over Wi-Fi. On my end, I’m able to echo ROS 2 topics both on the drone and from the computer without any issues. I even added the same static IP configuration you used, and I was still able to echo my topics without any errors.

              You also mentioned seeing an error on the drone side for the voxl_mpa_to_ros2_node, could you clarify what the exact error is? Are you unable to run ros2 topic echo directly on the drone as well, or is the problem only when echoing from your computer? Additionally, which drone model are you using?

              AniruddhaA 1 Reply Last reply
              0
              • A ApoorvThapliyal

                Hey @Aniruddha
                I tried recreating the issue on my setup using a Starling V2 Max connected to my computer over Wi-Fi. On my end, I’m able to echo ROS 2 topics both on the drone and from the computer without any issues. I even added the same static IP configuration you used, and I was still able to echo my topics without any errors.

                You also mentioned seeing an error on the drone side for the voxl_mpa_to_ros2_node, could you clarify what the exact error is? Are you unable to run ros2 topic echo directly on the drone as well, or is the problem only when echoing from your computer? Additionally, which drone model are you using?

                AniruddhaA Offline
                AniruddhaA Offline
                Aniruddha
                Contributor
                wrote on last edited by Aniruddha
                #8

                @ApoorvThapliyal

                Screenshot from 2026-04-24 12-10-18.png

                This is how its being showing

                A 1 Reply Last reply
                0
                • AniruddhaA Aniruddha

                  @ApoorvThapliyal

                  Screenshot from 2026-04-24 12-10-18.png

                  This is how its being showing

                  A Offline
                  A Offline
                  ApoorvThapliyal
                  Contributor
                  wrote on last edited by
                  #9

                  @Aniruddha
                  What version SDK are you using? What are the versions of voxl-mpa-to-ros2, voxl-microdds-agent , voxl-ros2-foxy and voxl-px4. You can find it with the command: voxl-version
                  My suspicion is that the ros2 message being published is of a different size than what ros2 subscriber is expecting, and that's causing the break
                  Here are the versions I used that worked for me:
                  voxl-mpa-to-ros2 0.0.7-202511100959
                  voxl-microdds-agent 3.0.0-0-202511141239
                  voxl-ros2-foxy 0.0.1-202511141235
                  voxl-px4 1.14.0-2.0.134

                  AniruddhaA 1 Reply Last reply
                  0
                  • A ApoorvThapliyal

                    @Aniruddha
                    What version SDK are you using? What are the versions of voxl-mpa-to-ros2, voxl-microdds-agent , voxl-ros2-foxy and voxl-px4. You can find it with the command: voxl-version
                    My suspicion is that the ros2 message being published is of a different size than what ros2 subscriber is expecting, and that's causing the break
                    Here are the versions I used that worked for me:
                    voxl-mpa-to-ros2 0.0.7-202511100959
                    voxl-microdds-agent 3.0.0-0-202511141239
                    voxl-ros2-foxy 0.0.1-202511141235
                    voxl-px4 1.14.0-2.0.134

                    AniruddhaA Offline
                    AniruddhaA Offline
                    Aniruddha
                    Contributor
                    wrote on last edited by
                    #10

                    @ApoorvThapliyal sorry for the late reply. my drone got bricked so I had to reinstall everything. I am still facing the same issue.

                    here are the sdk versions
                    voxl-sdk is 1.6.3
                    voxl-mpa-to-ros2 0.0.7
                    voxl-microdds-agent 3.0.0-0
                    voxl-ros2-foxy 0.0.1
                    voxl-px4 1.14.0-2.0.133

                    also one more thing I forgot to mention before was I was initially was not able to see ros2 topics from drone on my computer but when I install netcat on drone then I was able to see those topics. but I still can't echo them

                    A 1 Reply Last reply
                    0
                    • AniruddhaA Aniruddha

                      @ApoorvThapliyal sorry for the late reply. my drone got bricked so I had to reinstall everything. I am still facing the same issue.

                      here are the sdk versions
                      voxl-sdk is 1.6.3
                      voxl-mpa-to-ros2 0.0.7
                      voxl-microdds-agent 3.0.0-0
                      voxl-ros2-foxy 0.0.1
                      voxl-px4 1.14.0-2.0.133

                      also one more thing I forgot to mention before was I was initially was not able to see ros2 topics from drone on my computer but when I install netcat on drone then I was able to see those topics. but I still can't echo them

                      A Offline
                      A Offline
                      ApoorvThapliyal
                      Contributor
                      wrote on last edited by
                      #11

                      @Aniruddha
                      Even after matching the versions, I am not able to recreate your error
                      I will try relfashing my voxl2, to start from a clean slate similar to your setup right now.
                      Since you reflashed the voxl2, is there something you changed on the voxl2 for your goals? I assume that after a reflash, I should have the same setup as you

                      AniruddhaA 1 Reply Last reply
                      0
                      • A ApoorvThapliyal

                        @Aniruddha
                        Even after matching the versions, I am not able to recreate your error
                        I will try relfashing my voxl2, to start from a clean slate similar to your setup right now.
                        Since you reflashed the voxl2, is there something you changed on the voxl2 for your goals? I assume that after a reflash, I should have the same setup as you

                        AniruddhaA Offline
                        AniruddhaA Offline
                        Aniruddha
                        Contributor
                        wrote on last edited by
                        #12

                        @ApoorvThapliyal does my ros2 version on my computer could be an issue. I have ros2 jazzy running on my computer where drone has foxy

                        A 1 Reply Last reply
                        0
                        • AniruddhaA Aniruddha

                          @ApoorvThapliyal does my ros2 version on my computer could be an issue. I have ros2 jazzy running on my computer where drone has foxy

                          A Offline
                          A Offline
                          ApoorvThapliyal
                          Contributor
                          wrote on last edited by
                          #13

                          Hey @Aniruddha
                          I was able to recreate your issue with ROS2 jazzy, seems like there is a mismatch between topic size between the versions.
                          I use humble on my laptop and havent faced any issues, try using it and let me know your results

                          I'll investigate this issue further

                          AniruddhaA 1 Reply Last reply
                          0
                          • A ApoorvThapliyal

                            Hey @Aniruddha
                            I was able to recreate your issue with ROS2 jazzy, seems like there is a mismatch between topic size between the versions.
                            I use humble on my laptop and havent faced any issues, try using it and let me know your results

                            I'll investigate this issue further

                            AniruddhaA Offline
                            AniruddhaA Offline
                            Aniruddha
                            Contributor
                            wrote on last edited by
                            #14

                            @ApoorvThapliyal Thank you for your help. also I was able to work with jazzy by only subscribing and printing with node. since error only occurred when I tried to echo the topic and not when another node is subscribing it. but using docker seems like most viable option to me since I m using ubuntu 24.04. Thank you for your help again

                            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