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

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL Compute & Autopilot
  3. VOXL 2
  4. ROS_DOMAIN_ID Change

ROS_DOMAIN_ID Change

Scheduled Pinned Locked Moved VOXL 2
6 Posts 2 Posters 527 Views 1 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.
  • Y Offline
    Y Offline
    yunwool
    wrote on last edited by
    #1

    Dear Researchers and Developers,

    I can see PX4-related ROS 2 messages even without explicitly running any ROS 2 nodes myself.
    It looks like these messages are visible under ROS_DOMAIN_ID=0.
    Could you please share guidance on how to change the ROS 2 domain ID for these PX4-related messages?
    PX4ROSMSG.png

    A 1 Reply Last reply
    0
    • Y yunwool

      Dear Researchers and Developers,

      I can see PX4-related ROS 2 messages even without explicitly running any ROS 2 nodes myself.
      It looks like these messages are visible under ROS_DOMAIN_ID=0.
      Could you please share guidance on how to change the ROS 2 domain ID for these PX4-related messages?
      PX4ROSMSG.png

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

      Hey @yunwool
      I would recommend writing export ROS_DOMAIN_ID=1 in your ~/.bashrc and then restarting all terminals so the change takes effect. This should prevent other ROS 2 messages from appearing in your environment, since you’ll effectively be using your own domain.

      Optionally, you may want to look into the ROS_LOCALHOST_ONLY variable as well, since I do believe if someone else sets their domain ID to 1, you would see their messages.

      Y 1 Reply Last reply
      0
      • A ApoorvThapliyal

        Hey @yunwool
        I would recommend writing export ROS_DOMAIN_ID=1 in your ~/.bashrc and then restarting all terminals so the change takes effect. This should prevent other ROS 2 messages from appearing in your environment, since you’ll effectively be using your own domain.

        Optionally, you may want to look into the ROS_LOCALHOST_ONLY variable as well, since I do believe if someone else sets their domain ID to 1, you would see their messages.

        Y Offline
        Y Offline
        yunwool
        wrote on last edited by
        #3

        @ApoorvThapliyal
        Thank you for the reply.
        Did you happen to add export ROS_DOMAIN_ID=1 to your ~/.bashrc?
        When I do that, ROS 2 topics disappear in the VOXL shell.
        However, on my laptop where ROS_DOMAIN_ID=0, I can see the ROS topics.
        That’s why I posted this.

        A 1 Reply Last reply
        0
        • Y yunwool

          @ApoorvThapliyal
          Thank you for the reply.
          Did you happen to add export ROS_DOMAIN_ID=1 to your ~/.bashrc?
          When I do that, ROS 2 topics disappear in the VOXL shell.
          However, on my laptop where ROS_DOMAIN_ID=0, I can see the ROS topics.
          That’s why I posted this.

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

          Hey @yunwool
          Did you try setting the ROS_LOCALHOST_ONLY variable to limit the topics to your local device?

          Y 1 Reply Last reply
          0
          • A ApoorvThapliyal

            Hey @yunwool
            Did you try setting the ROS_LOCALHOST_ONLY variable to limit the topics to your local device?

            Y Offline
            Y Offline
            yunwool
            wrote on last edited by
            #5

            @ApoorvThapliyal
            Thank you again for the reply!
            We are setting up a multi-robot system, so we are using ROS_LOCALHOST_ONLY=0.
            For example, we want to set the ROS_DOMAIN_ID of drone 1 to 1 and the ROS_DOMAIN_ID of drone 2 to 2.
            However, for both drones, PX4-related messages still appear under domain ID 0.
            Have you tried this with two or more drones?

            A 1 Reply Last reply
            0
            • Y yunwool

              @ApoorvThapliyal
              Thank you again for the reply!
              We are setting up a multi-robot system, so we are using ROS_LOCALHOST_ONLY=0.
              For example, we want to set the ROS_DOMAIN_ID of drone 1 to 1 and the ROS_DOMAIN_ID of drone 2 to 2.
              However, for both drones, PX4-related messages still appear under domain ID 0.
              Have you tried this with two or more drones?

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

              Hey @yunwool
              Just to be clear, consider only your first drone, if you run export ROS_DOMAIN_ID=1, then run ros2 topic list, you aren't seeing any topics right?

              After you set the ROS_DOMAIN_ID of a drone to 1, to get the PX4 topics to show up, on QGC > Analyze Tools > MAVLink Console, run the following commands:

              param set XRCE_DDS_DOM_ID 1
              param save
              

              Then power cycle the drone, give it like 15s after boot up, then the topics should come up directly when running ros2 topic list on that drone.

              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

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups