Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
Invalid number of arguments, args should be ['success', 'message'] args are(False,)

I agree rospy's Service server implementation doesn't do super great job with this error message. The 2nd "args" part is what you're passing while the 1st "args" is what the Server expects.

From this, we can tell that the Server is getting False,. I can assume that is what the line return False,"thruster is off" generates. The string portion is somehow cut off (which I have no idea why). Anyways, you're not passing in the format Server expects.

In rospy Service client implementation, you must use the specific class for the response. As you see in the tutorial where the Server returns AddTwoIntsResponse while the Server's instantion declares AddTwoInts. Service name + Response is Python class auto-generated by the build system (i.e. Catkin etc.)