Ensure only one instance of ros2 node is running (multi-machine setup)

asked 2020-09-09 07:30:16 -0500

aalexanderr gravatar image

I'm using ROS2 Eloquent in multi-machine environment. Each ROS2 instance with DOMAIN_ID set to same value take a bit of time to discover each other initially. This is expected. How can I access info about looking for and discovery in ROS2?

I want to ensure that only ONE instance of a node (specifically the first one to be brought up) is running in current DOMAIN_ID?

I'd like to do this both in cpp and python, if someone could point me in the right direction..

Thanks a lot in advance

edit retag flag offensive close merge delete

Comments

Did you ever figure this out? Trying to do the same thing

NotRoboticYet gravatar image NotRoboticYet  ( 2022-04-27 20:34:10 -0500 )edit