ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The return value of client.call(srv)?

Then the return value is always 1 (true - boolean) when the service succeeded in calling it. If for example the node for the service would have been stopped for any reason, the service would fail to call, because it does not exist, then you should get a 0 (false).


The return value of the else statement?

The return value of the else statement would be for your node or a function, anything else than 1 would indicate another process/calling function checking your programs/functions return and see if it is not 0 that something went wrong with it.

0 normally indicates, all right, sometimes it is the other way round ...