Ask Your Question

Revision history [back]

Roscpp doesn't support passing error messages to the caller as far as I know. If that's possible for you, you can change the service definition to include an error code in the result. Then, instead of returning false from the service callback, you can fill in the error code and return true.

When using rospy, you can raise a ServiceException which contains an error message. That message is passed to a rospy client. You can find more information on that here.