PR2 / pr2_mechanism

Infrastructure to control the PR2 robot in a hard realtime control loop.
Other
29 stars 27 forks source link

pr2_mechanism/spawner should wait for the services it calls. (ros ticket #4879) #306

Closed ahendrix closed 11 years ago

ahendrix commented 11 years ago

I recently made a mechanism controller manager for our robot rosie, which I want to start in the same launch file as the spawner that loads the controllers themselves.

However, there is a race condition: The spawner calls 3 services which it assumes to be up. The spawner crashes if the controller manager starts later. The attached patch makes the spawner wait for these services.

trac data:

ahendrix commented 11 years ago

[wim] What version of pr2_mechanism are you using? The cturtle version of spawner already has the wait_for_service methods (lines 92-94). I can run this version of spawner without the services being available; it just waits and does not crash.

ahendrix commented 11 years ago

[kresse] Oops, found the lines. I searched my logs (no success, this output went to screen), and tried to reproduce it a dozen times under several user accounts - it's all okay. The only explanation that remains for me is that there was an interfering zombie process.

Anyway, thanks for the quick reply!

And never mind!