ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I have a suspicion that may be the service clients are returning prematurely (check http://docs.ros.org/api/roscpp/html/service__client_8h_source.html#l00081) because the service calls are issued before the services are actually up and ready. So adding
srvcl1.waitForExistence();
srvcl2.waitForExistence();
srvcl3.waitForExistence();
should solve this issue.
(I am assuming the service servers are working fine since the rosservice call commands are working fine. It would always help to post a more descriptive code than just snippets to provide a more authoritative answer :))
2 | No.2 Revision |
I have a suspicion that may be the service clients are returning prematurely (check http://docs.ros.org/api/roscpp/html/service__client_8h_source.html#l00081) because the service calls are issued before the services are actually up and ready. So adding
srvcl1.waitForExistence();
srvcl2.waitForExistence();
srvcl3.waitForExistence();
before the loop should solve this issue.
(I am assuming the service servers are working fine since the rosservice call commands are working fine. It would always help to post a more descriptive code than just snippets to provide a more authoritative answer :))