ros::master::check() block after several calls

asked 2013-12-19 22:37:42 -0600

Blink gravatar image

updated 2014-01-28 17:18:52 -0600

ngrennan gravatar image


I have a C++ programm where I want to check if the master is connected before starting the nodeHandle.

I first call ros::init() with the right arguments and then call : while(!ros::master::check()) to wait indefinitely until the master is connected.

Unfortunately my program freeze after only a few calls to the check() function. I also tried to wait a few seconds between each call but that didn't change anything.

Is there a way to fix this ? or to wait for the master to connect with a better method ?

edit retag flag offensive close merge delete