defining a service message with no return value
I want to create a service that doesn't return anything, but returning None or an Empty message considered an error.
Test.srv
string message
---
test.py
service = rospy.Service('test', my_msgs.srv.Test, callback)
def callback(request):
print(request.message)
return std_srvs.srv.Empty()
results in a ServiceException, service cannot process request: handler returned invalid value: Invalid number of arguments, args should be [] args are (std_srvs.srv._Empty.Empty object at 0xffasdassa)
What's the right way of defining a service with no return value?