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

    ROS_DOMAIN_ID Change

    VOXL 2
    2
    2
    28
    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.
    • Y
      yunwool
      last edited by

      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 Reply Quote 0
      • A
        ApoorvThapliyal @yunwool
        last edited by

        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.

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